--- /dev/null
+Just a monitor - if it's red, please inform Jurek.
--- /dev/null
+Just a monitor - if it's red, it's in the responsibility of the FW operator, please inform them.
$plot->{titles}->[3] = "RPC";
$plot->{titles}->[4] = "Rich";
$plot->{titles}->[5] = "TOF";
-$plot->{titles}->[6] = "Wall";
+$plot->{titles}->[6] = "STS";
$plot->{titles}->[7] = "Cts";
$plot->{titles}->[8] = "Start";
# $plot->{titles}->[9] = "Pion";
HPlot::PlotInit({
name => "BusyTimeBars",
file => "files/BusyTimeBars",
- curves => 8,
+ curves => 1,
type => HPlot::TYPE_BARGRAPH,
output => HPlot::OUT_PNG,
ylabel => "Deadtime (%)",
sizex => 520,
sizey => 265,
nokey => 1,
- entries => 10,
+ entries => 9,
ymin => -1,
ymax => 101,
- bartitle => ["M12","M34","ECa","RPC","Ric1","Ric2","TOF","FW","Cts","St"],
+ bartitle => ["M12","M34","ECa","RPC","Rich","TOF","STS","Cts","St"],
buffer => 1,
storable => 0,
bargap => 5,
while (1) {
my $o;
- foreach my $b (0x8000,0x8012,0x8013,0x8015,0x8016,0x8017,0x8018) {
+ foreach my $b (0x8000, 0x8018){#,0x8012,0x8013,0x8015,0x8016,0x8017,0x8018) {
my $t = trb_registertime_read_mem($b,0x4030,0,10);
$o->{$b} = $t->{$b};
}
}
}
- my $rich1max = max($diff->{0x8017}->[0],$diff->{0x8017}->[1],$diff->{0x8017}->[2],$diff->{0x8017}->[3],$diff->{0x8017}->[4],$diff->{0x8017}->[5]);
- my $rich2max = max($diff->{0x8018}->[0],$diff->{0x8018}->[1],$diff->{0x8018}->[2],$diff->{0x8018}->[3],$diff->{0x8018}->[4],$diff->{0x8018}->[5]);
-
+
HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[5],0); #MDC12
HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[6],1); #MDC34
HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[3],2); #ECal
- HPlot::PlotAdd('BusyTimes',max($diff->{0x8012}->[2],$diff->{0x8012}->[3]),3); #RPC
+ HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[1],3); #RPC
HPlot::PlotAdd('BusyTimes',max($diff->{0x8000}->[7],$diff->{0x8000}->[8]),4); #Rich
- HPlot::PlotAdd('BusyTimes',$diff->{0x8012}->[1],5); #Tof
- HPlot::PlotAdd('BusyTimes',$diff->{0x8012}->[0],6); #Wall
- HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[1],7); #Cts
+ HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[2],5); #Tof
+ HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[4],6); #STS
+ HPlot::PlotAdd('BusyTimes',$diff->{0x8000}->[0],7); #Cts
HPlot::PlotAdd('BusyTimes',$diff->{0x8018}->[6],8); #Start TRB3
# HPlot::PlotAdd('BusyTimes',max($diff->{0x8003}->[1],$diff->{0x8003}->[2]),9); #Pion
HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[5],0); #MDC12
HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[6],1); #MDC34
HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[3],2); #ECal
- HPlot::PlotFill('BusyTimeBars',max($diff->{0x8012}->[2],$diff->{0x8012}->[3]),3); #RPC
- HPlot::PlotFill('BusyTimeBars',$rich1max,4); #Rich
- HPlot::PlotFill('BusyTimeBars',$rich2max,5); #Rich
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8012}->[1],6); #Tof
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8012}->[0],7); #Wall
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[1],8); #Cts
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[6],9); #Start TRB3
+ HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[1],3); #RPC
+ HPlot::PlotFill('BusyTimeBars',max($diff->{0x8000}->[7],$diff->{0x8000}->[8]),4); #Rich
+ HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[2],5); #Tof
+ HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[4],6); #STS
+ HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[0],7); #Cts
+ HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[6],8); #Start TRB3
# HPlot::PlotAdd('BusyTimes',max($diff->{0x8003}->[1],$diff->{0x8003}->[2]),9); #Pion
-#Extended view
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8015}->[0],0,6); #MDC12
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8015}->[1],0,5); #MDC12
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8015}->[2],0,4); #MDC12
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8015}->[3],0,3); #MDC12
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8015}->[4],0,2); #MDC12
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8015}->[5],0,1); #MDC12
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8016}->[0],1,6); #MDC34
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8016}->[1],1,5); #MDC34
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8016}->[2],1,4); #MDC34
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8016}->[3],1,3); #MDC34
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8016}->[4],1,2); #MDC34
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8016}->[5],1,1); #MDC34
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8013}->[0],2,6); #ECal
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8013}->[1],2,5); #ECal
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8013}->[2],2,4); #ECal
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8013}->[3],2,3); #ECal
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8013}->[4],2,2); #ECal
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8013}->[5],2,1); #ECal
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8012}->[2],3,5); #RPC
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8012}->[3],3,4); #RPC
-# HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[7],4,5); #Rich
-# HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[8],4,4); #Rich
-
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8017}->[0],4,6); #Rich
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8017}->[1],4,5); #Rich
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8017}->[2],4,4); #Rich
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8017}->[3],4,3); #Rich
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8017}->[4],4,2); #Rich
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8017}->[5],4,1); #Rich
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[0],5,6); #Rich
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[1],5,5); #Rich
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[2],5,4); #Rich
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[3],5,3); #Rich
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[4],5,2); #Rich
- HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[5],5,1); #Rich
+# #Extended view
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8015}->[0],0,6); #MDC12
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8015}->[1],0,5); #MDC12
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8015}->[2],0,4); #MDC12
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8015}->[3],0,3); #MDC12
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8015}->[4],0,2); #MDC12
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8015}->[5],0,1); #MDC12
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8016}->[0],1,6); #MDC34
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8016}->[1],1,5); #MDC34
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8016}->[2],1,4); #MDC34
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8016}->[3],1,3); #MDC34
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8016}->[4],1,2); #MDC34
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8016}->[5],1,1); #MDC34
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8013}->[0],2,6); #ECal
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8013}->[1],2,5); #ECal
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8013}->[2],2,4); #ECal
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8013}->[3],2,3); #ECal
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8013}->[4],2,2); #ECal
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8013}->[5],2,1); #ECal
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8012}->[2],3,5); #RPC
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8012}->[3],3,4); #RPC
+# # HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[7],4,5); #Rich
+# # HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[8],4,4); #Rich
+#
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8017}->[0],4,6); #Rich
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8017}->[1],4,5); #Rich
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8017}->[2],4,4); #Rich
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8017}->[3],4,3); #Rich
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8017}->[4],4,2); #Rich
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8017}->[5],4,1); #Rich
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[0],5,6); #Rich
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[1],5,5); #Rich
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[2],5,4); #Rich
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[3],5,3); #Rich
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[4],5,2); #Rich
+# HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[5],5,1); #Rich
# HPlot::PlotFill('BusyTimeBars',$diff->{0x8018}->[6],7,5); #Start
# HPlot::PlotFill('BusyTimeBars',$diff->{0x8000}->[1],9,5); #Cts
noinit => 0,
showvalues => 0, });
}
+
+HPlot::PlotInit({
+name => "EcalRate",
+file => "files/EcalRate",
+title => "ECal Rate",
+entries => 48,
+curves => 60,
+type => HPlot::TYPE_HEATMAP,
+output => HPlot::OUT_PNG,
+zlabel => "Hitrate",
+sizex => 470,
+sizey => 420,
+nokey => 1,
+buffer => 1,
+ymin => 59.5,
+ymax => -0.5,
+xmin => -0.5,
+xmax => 47.5,
+cbmax => "100<*<1E5",
+cbmin => 0,
+noinit => 1,
+additional => "set logscale cb;",
+showvalues => 0, });
my $str = Hmon::MakeTitle(16, 20, "ECal Hit Rate",0);
for my $i (0..5) {
Hmon::WriteFile("ECalRate",$str);
+my $str = Hmon::MakeTitle(6, 9, "ECal Hit Rate",0);
+$str .= qq@<img src="%ADDPNG files/EcalRate.png%" type="image/png"><br>\n@;
+
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("EcalSimpleRate",$str);
+
+
my $old;
my $oldtime = time();
my $time = time();
my $tdiff = (time() - $oldtime||0) || 1;
foreach my $b (keys %$o) {
my $sec = ($b>>4) & 0x7;
+ my $simpxpos = (($b>>4)&0xF)*10 + ($b&0xF);
for my $v (0..23) {
my $xpos = ($b&0xF)*3 + int($v/8);
HPlot::PlotFill('EcalRateFast'.$sec,$diff->{$b}->[$v*2+1],$xpos,$v % 8);
HPlot::PlotFill('EcalRateSlow'.$sec,$diff->{$b}->[$v*2+2],$xpos,$v % 8);
HPlot::PlotFill('EcalRateDiff'.$sec,$ratio,$xpos,$v % 8);
+
+ HPlot::PlotFill('EcalRate',$diff->{$b}->[$v*2+1],$v*2,$simpxpos);
+ HPlot::PlotFill('EcalRate',$diff->{$b}->[$v*2+2],$v*2+1,$simpxpos);
+
}
}
for my $i (0..5) {
HPlot::PlotDraw('EcalRateSlow'.$i);
HPlot::PlotDraw('EcalRateDiff'.$i);
}
+ HPlot::PlotDraw('EcalRate');
}
$old = $o;
$oldtime = time();
my @names = qw(5.8V 5V 3.8V 3.3V 1.8V 1.2V 3V -3V);
my @minimum = (5.5, 4.75, 3.5, 3.15, 1.4, 1.15, 2.90, -3.05);
-my @maximum = (6.1, 5.1, 4.0, 3.4, 2.0, 1.25, 3.10, -2.95);
+my @maximum = (6.2, 5.1, 4.0, 3.4, 2.0, 1.25, 3.10, -2.95);
my $fqa = QA::OpenQAFile();
--- /dev/null
+#!/usr/bin/perl -w
+
+use warnings;
+use strict;
+use Data::Dumper;
+use Data::TreeDumper;
+use Hmon;
+use QA;
+use HADES::TrbNet;
+use HPlot;
+use Time::HiRes qw(usleep time);
+use List::Util qw[min max];
+
+use Encode qw(encode from_to);
+use JSON::XS;
+
+
+my $plot1 = {
+name => "RpcRate",
+file => "files/RpcRate",
+title => "RPC Rate",
+entries => 48,
+curves => 60,
+type => HPlot::TYPE_HEATMAP,
+output => HPlot::OUT_PNG,
+zlabel => "Hitrate",
+sizex => 470,
+sizey => 420,
+nokey => 1,
+buffer => 1,
+ymin => 59.5,
+ymax => -0.5,
+xmin => -0.5,
+xmax => 47.5,
+cbmax => "100<*<1E5",
+cbmin => 0,
+noinit => 1,
+additional => "set logscale cb;",
+showvalues => 0, };
+HPlot::PlotInit($plot1);
+
+
+my $str = Hmon::MakeTitle(6, 9, "RPC Hit Rate",0);
+$str .= qq@<img src="%ADDPNG files/RpcRate.png%" type="image/png"><br>\n@;
+
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("RpcRate",$str);
+
+
+my $old;
+my $oldtime = time();
+my $time = time();
+my $diff;
+my $iter = 0;
+
+
+
+trb_init_ports() or die trb_strerror();
+
+
+while(1) {
+ #my $data;
+ #my $max = 0 ;
+ #my $min = 5E9;
+
+ my $o = trb_register_read_mem(0xfe73,0xc000,0,49) or die trb_strerror() or sleep 5 and next;
+
+ if (defined $old) {
+ my $tdiff = (time() - $oldtime)|1;
+ foreach my $b (keys %$o) {
+ #my $ratesum = 0;
+ next unless ($b>=0x5800 && $b<=0x58ff);
+ my $xpos = (($b>>4)&0xF)*10 + ($b&0xF);
+
+ for my $v (0..47) {
+ my $vdiff = ($o->{$b}->[$v+1]&0xfffffff) - ($old->{$b}->[$v+1]&0xfffffff);
+
+ if ($vdiff < 0) { $vdiff += 2**28;}
+ $diff->{$b}->[$v+1] = $vdiff/$tdiff;
+ #$ratesum += $diff->{$b}->[$v+1];
+ HPlot::PlotFill('RpcRate',$diff->{$b}->[$v+1],$v,$xpos);
+ }
+ #my $s = sprintf("0x%04x",$b);
+ #$data->{$s}= int(100*($ratesum / 32) +0.5) /100;
+
+ #$min = $data->{$s} if $data->{$s} < $min;
+ #$max = $data->{$s} if $data->{$s}> $max;
+ }
+ HPlot::PlotDraw('RpcRate');
+
+
+
+ # $data->{max} = $max;
+ # $data->{min} = $min;
+ # $data->{symbol} = " Hits/s";
+ # $data->{title} = "Mean DiRICH TDC Rate";
+
+
+ # $data->{updatetime} = getTimeString;
+
+ # my $fh;
+ # open($fh, ">", Hmon::HMONDIR."/files/richMeanRateDiRICH.json");
+ # print $fh encode_json($data);
+ # close $fh;
+ }
+
+ $old = $o;
+ $oldtime = time();
+ sleep 2;
+ }
--- /dev/null
+#!/usr/bin/perl -w
+
+use warnings;
+use Time::HiRes qw(usleep);
+use Data::Dumper;
+use Hmon;
+use QA;
+use HADES::TrbNet;
+use HPlot;
+
+
+HPlot::PlotInit({
+ name => "RpcTofSectorRate",
+ file => "files/RpcTofSectorRate",
+ entries => 6,
+ curves => 2,
+ type => HPlot::TYPE_BARGRAPH,
+ output => HPlot::OUT_PNG,
+ titles => ["TOF","RPC"],
+ xlabel => "Sectors",
+ ylabel => "Counts [Hz]",
+ sizex => 370,
+ sizey => 370,
+ xmin => -0.3,
+ xmax => 5.8,
+ ymax => "500<*<1E5",
+ ymin => 0,
+ nokey => 0,
+ buffer => 1,
+ bargap => 0.4,
+ curvewidth => 1,
+ storable=> 1}
+ );
+
+HPlot::PlotInit({
+ name => "RpcTofSectorRateHist",
+ file => "files/RpcTofSectorRateHist",
+ entries => 60,
+ curves => 12,
+ type => HPlot::TYPE_HISTORY,
+ output => HPlot::OUT_PNG,
+ titles => ["R0","R1","R2","R3","R4","R5","T0","T1","T2","T3","T4","T5"],
+ xlabel => "Time [s]",
+ ylabel => "Counts [Hz]",
+ sizex => 550,
+ sizey => 370,
+# nokey => 1,
+ buffer => 1,
+ storable=> 1}
+ );
+
+my $str = Hmon::MakeTitle(12,8,"RpcTofSectorRate",0);
+ $str .= qq@<img src="%ADDPNG files/RpcTofSectorRate.png%" type="image/png">\n@;
+ $str .= qq@<img src="%ADDPNG files/RpcTofSectorRateHist.png%" type="image/png">@;
+ $str .= Hmon::MakeFooter();
+ Hmon::WriteFile("RpcTofSectorRate",$str);
+
+# my $fqa = QA::OpenQAFile() or die "No connection to QA Logfile";
+
+trb_init_ports() or die trb_strerror();
+
+my @values;
+my $oldrpc;
+my $oldtof;
+
+while (1) {
+ my $rpcsum = 0;
+ my $tofsum = 0;
+
+ my $o = trb_register_read(0xfe60,0xdfe6);
+ foreach my $b (keys %{$o}) {
+ next unless defined $oldrpc->{$b};
+ my $diff = $o->{$b} - $oldrpc->{$b};
+ $diff += 2**24 if $diff < 0;
+ if ($b >= 0x84c0 && $b <= 0x84c5) {
+ HPlot::PlotFill('RpcTofSectorRate',$diff,$b&0xF,1);
+ HPlot::PlotAdd( 'RpcTofSectorRateHist',$diff,$b&0xF);
+ }
+ }
+ $oldrpc = $o;
+
+ $o = trb_register_read(0xfe60,0xdfe6);
+ foreach my $b (keys %{$o}) {
+ next unless defined $oldtof->{$b};
+ my $diff = $o->{$b} - $oldtof->{$b};
+ $diff += 2**24 if $diff < 0;
+ if ($b >= 0x86c0 && $b <= 0x86c5) {
+ HPlot::PlotFill('RpcTofSectorRate',$diff,$b&0xF,0);
+ HPlot::PlotAdd( 'RpcTofSectorRateHist',$diff,($b&0xF)+6);
+ }
+ }
+ $oldtof = $o;
+
+
+ HPlot::PlotDraw('RpcTofSectorRate');
+ HPlot::PlotDraw('RpcTofSectorRateHist');
+ sleep(1);
+ }
+
--- /dev/null
+#!/usr/bin/perl -w
+
+use warnings;
+use strict;
+use Data::Dumper;
+use Data::TreeDumper;
+use Hmon;
+use QA;
+use HADES::TrbNet;
+use HPlot;
+use Time::HiRes qw(usleep time);
+use List::Util qw[min max];
+
+use Encode qw(encode from_to);
+use JSON::XS;
+
+
+my $plot1 = {
+name => "StsRate",
+file => "files/StsRate",
+title => "STS Rate",
+entries => 48,
+curves => 80,
+type => HPlot::TYPE_HEATMAP,
+output => HPlot::OUT_PNG,
+zlabel => "Hitrate",
+sizex => 470,
+sizey => 420,
+nokey => 1,
+buffer => 1,
+ymin => 79.5,
+ymax => -0.5,
+xmin => -0.5,
+xmax => 47.5,
+cbmax => "100<*<1E5",
+cbmin => 0,
+noinit => 1,
+additional => "set logscale cb;",
+showvalues => 0, };
+HPlot::PlotInit($plot1);
+
+
+my $str = Hmon::MakeTitle(6, 9, "STS Hit Rate",0);
+$str .= qq@<img src="%ADDPNG files/StsRate.png%" type="image/png"><br>\n@;
+
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("StsRate",$str);
+
+
+my $old;
+my $oldtime = time();
+my $time = time();
+my $diff;
+my $iter = 0;
+
+
+
+trb_init_ports() or die trb_strerror();
+
+
+while(1) {
+ #my $data;
+ #my $max = 0 ;
+ #my $min = 5E9;
+
+ my $o = trb_register_read_mem(0xfe4c,0xc000,0,49) or die trb_strerror() or sleep 5 and next;
+
+ if (defined $old) {
+ my $tdiff = (time() - $oldtime)|1;
+ foreach my $b (keys %$o) {
+ #my $ratesum = 0;
+ next unless ($b>=0x6400 && $b<=0x64ff);
+ my $xpos = (($b>>4)&0xF)*10 + ($b&0xF);
+
+ for my $v (0..47) {
+ my $vdiff = ($o->{$b}->[$v+1]&0xfffffff) - ($old->{$b}->[$v+1]&0xfffffff);
+
+ if ($vdiff < 0) { $vdiff += 2**28;}
+ $diff->{$b}->[$v+1] = $vdiff/$tdiff;
+ #$ratesum += $diff->{$b}->[$v+1];
+ HPlot::PlotFill('StsRate',$diff->{$b}->[$v+1],$v,$xpos);
+ }
+ #my $s = sprintf("0x%04x",$b);
+ #$data->{$s}= int(100*($ratesum / 32) +0.5) /100;
+
+ #$min = $data->{$s} if $data->{$s} < $min;
+ #$max = $data->{$s} if $data->{$s}> $max;
+ }
+ HPlot::PlotDraw('StsRate');
+
+
+
+ # $data->{max} = $max;
+ # $data->{min} = $min;
+ # $data->{symbol} = " Hits/s";
+ # $data->{title} = "Mean DiRICH TDC Rate";
+
+
+ # $data->{updatetime} = getTimeString;
+
+ # my $fh;
+ # open($fh, ">", Hmon::HMONDIR."/files/richMeanRateDiRICH.json");
+ # print $fh encode_json($data);
+ # close $fh;
+ }
+
+ $old = $o;
+ $oldtime = time();
+ sleep 2;
+ }
--- /dev/null
+#!/usr/bin/perl -w
+
+use warnings;
+use strict;
+use Data::Dumper;
+use Data::TreeDumper;
+use Hmon;
+use QA;
+use HADES::TrbNet;
+use HPlot;
+use Time::HiRes qw(usleep time);
+use List::Util qw[min max];
+
+use Encode qw(encode from_to);
+use JSON::XS;
+
+
+my $plot1 = {
+name => "TofRate",
+file => "files/TofRate",
+title => "TOF Rate",
+entries => 32,
+curves => 70,
+type => HPlot::TYPE_HEATMAP,
+output => HPlot::OUT_PNG,
+zlabel => "Hitrate",
+sizex => 470,
+sizey => 420,
+nokey => 1,
+buffer => 1,
+ymin => 69.5,
+ymax => -0.5,
+xmin => -0.5,
+xmax => 31.5,
+cbmax => "100<*<1E5",
+cbmin => 0,
+noinit => 1,
+additional => "set logscale cb;",
+showvalues => 0, };
+HPlot::PlotInit($plot1);
+
+
+my $str = Hmon::MakeTitle(6, 9, "TOF Hit Rate",0);
+$str .= qq@<img src="%ADDPNG files/TofRate.png%" type="image/png"><br>\n@;
+
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("TofRate",$str);
+
+
+my $old;
+my $oldtime = time();
+my $time = time();
+my $diff;
+my $iter = 0;
+
+
+
+trb_init_ports() or die trb_strerror();
+
+
+while(1) {
+ #my $data;
+ #my $max = 0 ;
+ #my $min = 5E9;
+
+ my $o = trb_register_read_mem(0xfe73,0xc000,0,33) or die trb_strerror() or sleep 5 and next;
+
+ if (defined $old) {
+ my $tdiff = (time() - $oldtime)|1;
+ foreach my $b (keys %$o) {
+ #my $ratesum = 0;
+ next unless ($b>=0x5c00 && $b<=0x5cff);
+ my $xpos = (($b>>4)&0xF)*10 + ($b&0xF);
+
+ for my $v (0..31) {
+ my $vdiff = ($o->{$b}->[$v+1]&0xfffffff) - ($old->{$b}->[$v+1]&0xfffffff);
+
+ if ($vdiff < 0) { $vdiff += 2**28;}
+ $diff->{$b}->[$v+1] = $vdiff/$tdiff;
+ #$ratesum += $diff->{$b}->[$v+1];
+ HPlot::PlotFill('TofRate',$diff->{$b}->[$v+1],$v,$xpos);
+ }
+ #my $s = sprintf("0x%04x",$b);
+ #$data->{$s}= int(100*($ratesum / 32) +0.5) /100;
+
+ #$min = $data->{$s} if $data->{$s} < $min;
+ #$max = $data->{$s} if $data->{$s}> $max;
+ }
+ HPlot::PlotDraw('TofRate');
+
+
+
+ # $data->{max} = $max;
+ # $data->{min} = $min;
+ # $data->{symbol} = " Hits/s";
+ # $data->{title} = "Mean DiRICH TDC Rate";
+
+
+ # $data->{updatetime} = getTimeString;
+
+ # my $fh;
+ # open($fh, ">", Hmon::HMONDIR."/files/richMeanRateDiRICH.json");
+ # print $fh encode_json($data);
+ # close $fh;
+ }
+
+ $old = $o;
+ $oldtime = time();
+ sleep 2;
+ }
</ul></div>
<div class="linkbox" style="width:730px;"><h4>Operator Monitor - the "must-have" windows</h4><ul>
-<li style="width:600px;"><a href="monitor.cgi?1-window-QA">Main Screen 0</a>
-<li style="width:600px;"><a href="monitor.cgi?1-window9x27-busyhist-eventratelong-eventrateshort-StartBars">Main Screen 1</a>
-<li style="width:600px;"><a href="monitor.cgi?1-window8x26-busy-DutyFactor-Pt3AcceptRatio-EvtsPerSpill-StartCountSpill">Main Screen 2</a>
-<li style="width:600px;"><a href="monitor.cgi?1-window14x14-EBSummary-hldlast-CTSRates">Main Screen 3</a></li>
+<li style="width:600px;"><a href="monitor.cgi?1-window-QA">Main Screen 0</a> Tactical Overview
+<li style="width:600px;"><a href="monitor.cgi?1-window9x27-busyhist-eventratelong-eventrateshort-StartBars">Main Screen 1</a> Eventrate & Busy
+<li style="width:600px;"><a href="monitor.cgi?1-window8x26-busy-DutyFactor-Pt3AcceptRatio-EvtsPerSpill-StartCountSpill">Main Screen 2</a> Spill Info
+<li style="width:600px;"><a href="monitor.cgi?1-window14x14-EBSummary-hldlast-CTSRates">Main Screen 3</a> EBs</li>
+<li style="width:600px;"><a href="monitor.cgi?2-window13x18-TofRate-RpcRate-StsRate-EcalSimpleRate">Main Screen 4</a> Tof Rpc STS Ecal rates</li>
</ul></div>
<div class="linkbox" style="clear:both"><h4>DAQ Network</h4><ul>
TRB_8800 => "CentralCTS",
TRB_8400 =>"RPC123 ",
TRB_8410 =>"RPC456 ",
+TRB_84C0 =>"RPCnew1",
+TRB_84C1 =>"RPCnew2",
+TRB_84C2 =>"RPCnew3",
+TRB_84C3 =>"RPCnew4",
+TRB_84C4 =>"RPCnew5",
+TRB_84C5 =>"RPCnew6",
TRB_8600 =>"TOF ",
+TRB_86C0 =>"TOFnew1",
+TRB_86C1 =>"TOFnew2",
+TRB_86C2 =>"TOFnew3",
+TRB_86C3 =>"TOFnew4",
+TRB_86C4 =>"TOFnew5",
+TRB_86C5 =>"TOFnew6",
+TRB_86C6 =>"TOFnew7",
TRB_8700 =>"FW ",
TRB_8880 => "StartTRB3",
TRB_8890 => "VetoTRB3",
TRB_1130 => "MDC34sec4",
TRB_1140 => "MDC34sec5",
TRB_1150 => "MDC34sec6",
-TRB_8a00 => "ECal0 ",
-TRB_8a01 => "ECal1 ",
-TRB_8a02 => "ECal2 ",
-TRB_8a03 => "ECal3 ",
-TRB_8a04 => "ECal4 ",
-TRB_8a05 => "ECal5 ",
-TRB_83c0 => "RICH0 ",
-TRB_83c1 => "RICH1 ",
-TRB_83c2 => "RICH2 ",
-TRB_83c3 => "RICH3 ",
-TRB_83c4 => "RICH4 ",
-TRB_83c5 => "RICH5 ",
-TRB_83c6 => "RICH6 ",
-TRB_83c7 => "RICH7 ",
-TRB_83c8 => "RICH8 ",
-TRB_83c9 => "RICH9 ",
-TRB_83ca => "RICHa ",
-TRB_83cb => "RICHb "
+TRB_8A00 => "ECal0 ",
+TRB_8A01 => "ECal1 ",
+TRB_8A02 => "ECal2 ",
+TRB_8A03 => "ECal3 ",
+TRB_8A04 => "ECal4 ",
+TRB_8A05 => "ECal5 ",
+TRB_83C0 => "RICH0 ",
+TRB_83C1 => "RICH1 ",
+TRB_83C2 => "RICH2 ",
+TRB_83C3 => "RICH3 ",
+TRB_83C4 => "RICH4 ",
+TRB_83C5 => "RICH5 ",
+TRB_83C6 => "RICH6 ",
+TRB_83C7 => "RICH7 ",
+TRB_83C8 => "RICH8 ",
+TRB_83C9 => "RICH9 ",
+TRB_83CA => "RICHa ",
+TRB_83CB => "RICHb ",
+TRB_8B10 => "STS2-0",
+TRB_8B11 => "STS2-1",
+TRB_8B12 => "STS2-2",
+TRB_8B13 => "STS2-3",
+TRB_8B14 => "STS2-4",
+TRB_8B15 => "STS2-5"
};
+
+
my @bits = qw(OK Collision WordMissing ChecksumMismatch DontUnderstand BufferMismatch AnswerMissing 7 8 9 10 11 12 13 14 15 EventNumberMismatch TriggerCodeMismatch WrongLength AnswerMissing NotFound PartiallyMissing SevereProblem BrokenEvent EthernetLinkError SubEventBufferFull EthernetError TimingTriggerError 28 29 30 31);
use HPlot;
-my @names = qw( reflowPressureAthm:average reflowPressureCompr reflowInO2 reflowRatioIsob opensysFreshARGON
-opensysFreshCO2 reflowFreshArgon reflowFreshIsob pipePressureIsoB CO2:concentration CO2:concentration2 reflowPressureLP);
-my @namesLABEL = qw( AtmosphericPressure reflowPressureCompressor reflow_O2_concentration
-reflow_Isobutane_fraction planeI_argon_fresh planeI_CO2_frsh reflowFreshArgon reflowFreshIsobutane pipePressureIsobutane CO2-P1 CO2-P2 LP-pressure);
-my @names2 = qw(waage_1_net waage_2_net);
-my @names2LABEL = qw(Scale_1 Scale_2);
+my @names = qw( reflowPressureAthm:average reflowPressureCompr reflowInO2 opensysFreshARGON opensysFreshCO2 reflowFreshArgon reflowFreshIsob CO2:concentration CO2:concentration2 reflowPressureLP );
+my @namesLABEL = qw( AtmosphericPressure reflowPressureCompressor reflow_O2_concentration planeI_argon_fresh planeI_CO2_frsh reflowFreshArgon reflowFreshCO2 CO2-P1 CO2-P2 LP-pressure );
+my @names2 = qw( MDC:P4:S1:M6:temp MDC:P4:S2:M6:temp MDC:P4:S6:M6:temp MDC:P5:S1:M1:temp MDC:cooling:water:temp MDC:cooling:air:temp);
+my @names2LABEL = qw(airTemperatureSector1 airTemperatureSector2 airTemperatureSector6 Temperature_avuum_pump coolingWaterTemp coolingAirTemp );
my @names3 = qw(targetVakPressure);
my $presserr = 0;
my $plot2 = ();
$plot2->{name} = "MdcScales";
$plot2->{file} = "files/MdcScales";
-$plot2->{entries} = 2880;
+$plot2->{entries} = 10800;
$plot2->{type} = HPlot::TYPE_HISTORY;
$plot2->{output} = HPlot::OUT_PNG;
-$plot2->{titles}->[0] = "Scale_1";
-$plot2->{titles}->[1] = "Scale_2";
+$plot2->{titles}->[0] = "air S2";
+$plot2->{titles}->[1] = "air S6";
+$plot2->{titles}->[2] = "air S1";
+$plot2->{titles}->[3] = "cooling water";
+$plot2->{titles}->[4] = "cooling air";
$plot2->{xlabel} = "Minutes";
-$plot2->{ylabel} = "kg";
+$plot2->{ylabel} = "°C";
+#$plot2->{ymin} = 15;
$plot2->{sizex} = 630;
$plot2->{sizey} = 220;
$plot2->{nokey} = 0;
-$plot2->{curves} = 2;
+$plot2->{curves} = 5;
$plot2->{buffer} = 1;
$plot2->{storable} = 1;
HPlot::PlotInit($plot2);
Perl2Epics::Connect($n,"HAD:".$n);
}
Perl2Epics::Connect("reflowPressureAthmaverage","HAD:MDC:GAS:reflowPressureAthm:average");
+Perl2Epics::Connect("airTempS2","HAD:MDC:P4:S2:M6:temp");
+Perl2Epics::Connect("airTempS6","HAD:MDC:P4:S6:M6:temp");
+Perl2Epics::Connect("airTempS1","HAD:MDC:P4:S1:M6:temp");
+Perl2Epics::Connect("coolingAirTemp","HAD:MDC:cooling:water:temp");
+Perl2Epics::Connect("coolingWaterTemp","HAD:MDC:cooling:air:temp");
+
Perl2Epics::Connect("p1CO2","HAD:MDC:GAS:CO2:concentration:average");
Perl2Epics::Connect("p2CO2","HAD:MDC:GAS:CO2:concentration2:average");
$str = Hmon::MakeTitle(8, 18, "MDC Reflow & Scales", 1, "");
$str .= "<h4>Atmospheric Pressure</h4>\n";
$str .= qq@<img src="%ADDPNG files/AtmosPress.png%" type="image/png">\n@;
- $str .= "<h4>Isobutane scales</h4>";
+ $str .= "<h4>air Temperature</h4>";
$str .= qq@<img src="%ADDPNG files/MdcScales.png%" type="image/png">\n@;
$str .= "<h4>Gas System</h4>";
Hmon::WriteFile("MDCReflow", $str);
if(!($timer%6)) {
- HPlot::PlotAdd("MdcScales",$data->{waage_1_net}->{val},0);
- HPlot::PlotAdd("MdcScales",$data->{waage_2_net}->{val},1);
+ HPlot::PlotAdd("MdcScales",$data->{airTempS2}->{val},0);
+ HPlot::PlotAdd("MdcScales",$data->{airTempS6}->{val},1);
+ HPlot::PlotAdd("MdcScales",$data->{airTempS1}->{val},2);
+ HPlot::PlotAdd("MdcScales",$data->{coolingAirTemp}->{val},3);
+ HPlot::PlotAdd("MdcScales",$data->{coolingWaterTemp}->{val},4);
HPlot::PlotDraw("MdcScales");
}
body>div>div {
float:left;
- margin: 0px 8px 0px 0;
+ margin: 0px 5px 5px 0;
padding: 0 0 0 0 ;
border: 1px solid #777;
border-width:0 1px 1px 1px;