OUT_SVG => 2, #n/a
OUT_SCREEN => 3}; #n/a
-my @color= ('#2222dd','#dd2222','#22dd22','#dd8822','#dd22dd','#22dddd','#dddd22','#8888dd','#8822bb','#444444');
+my @color= ('#2222dd','#dd2222','#22dd22','#dd8822','#dd22dd','#22dddd','#dddd22','#8888dd','#8822bb','#444444','#2222dd','#dd2222','#22dd22','#dd8822','#dd22dd','#22dddd','#dddd22','#8888dd','#8822bb','#444444',);
sub plot_write {
my ($file,$str,$no) = @_;
plot_write($fh,"set xlabel \"".$p->{$name}->{xlabel}."\"") if $p->{$name}->{xlabel};
plot_write($fh,"set ylabel \"".$p->{$name}->{ylabel}."\"") if $p->{$name}->{ylabel};
+ plot_write($fh,"set cblabel \"".$p->{$name}->{cblabel}."\"") if $p->{$name}->{cblabel};
setranges($fh,'xrange',$p->{$name}->{xmin},$p->{$name}->{xmax});
setranges($fh,'yrange',$p->{$name}->{ymin},$p->{$name}->{ymax});
plot_write($fh, $p->{$name}->{plot_string});
}
elsif ($p->{$name}->{type} == TYPE_BARGRAPH) {
- my $stacked = $p->{$name}{stacked}?' rowstacked':'';
- plot_write($fh,"set style fill solid 1.00 border -1");
+ my $stacked = $p->{$name}{stacked}?'rowstacked':'';
+ plot_write($fh,"set style fill solid 1.00 ");
plot_write($fh,"set grid noxtics ytics");
plot_write($fh,"set boxwidth ".($p->{$name}->{curvewidth}||4)." absolute");
- plot_write($fh,"set style histogram gap ".($p->{$name}->{bargap}||1).' '.$stacked);
+ plot_write($fh,"set style histogram ".$stacked." gap ".($p->{$name}->{bargap}||1));
if (defined $p->{$name}->{bartitle} && scalar @{$p->{$name}->{bartitle}}) {
plot_write($fh,"set xtics (",1);
for (my $j=0; $j<scalar @{$p->{$name}->{bartitle}};$j++) {
}
plot_write($fh,") offset ".($p->{$name}->{xtickoffset}//0).",0 scale 0");
}
- plot_write($fh,"set style histogram title offset character 0, 0, 0");
+# plot_write($fh,"set style histogram title offset character 0, 0, 0");
plot_write($fh,"set style data histograms");
plot_write($fh,$p->{$name}{additional});
#plot_write($fh,"plot ",1);
our @MdcVoltageLimits = (50, 60, 100);
our @MdcLockLimits = (0, 3, 5);
our @MdcTempLimits = (75, 80, 85);
-our @RichInnerTempLimits = (31,32,33);
+our @RichInnerTempLimits = (32.5,33,34);
our @TrgErrLimits = (100, 1000, 10000);
our @CPULimits = (95, 100, 100);
our @TimeoutLimits = (0, 0, 1);
our @LinkErrLimits = (50, 500, 1000);
our @MdcEndpMissingLimits = (0, 1, 2);
-our @RichEndpMissingLimits = (0, 2, 4); #!!!!
+our @RichEndpMissingLimits = (23, 24, 25); #!!!!
our @TofEndpMissingLimits = (0, 0, 0);
our @RpcEndpMissingLimits = (0, 0, 1);
our @OtherEndpMissingLimits = (0, 0, 0);#!!!
while (1) {
trb_register_setbit(0x8880,0xcf8f,1);
- my $a = trb_register_read(0x8880,0xcf82);
+ my $a = trb_register_read(0x8800,0xcf82);
my $length = $a->{0x8880};
$length = 0 if(!defined $length);
if($length > 0 && $length < 1E6) {
$state = QA::OK;
$shorttext = QA::SciNotation($store{0xa029})." / ".getCorrected($store{0xa029},$offset->{0xa029});
- $longtext = sprintf("Trigger Rate from Hodoscope %i Hz / %i Hz after offset correction",$store{0xa029}, getCorrectedValue($store{0xa029},$offset->{0xa029}) );
+ $longtext = sprintf("Trigger Rate from PT6 %i Hz / %i Hz after offset correction",$store{0xa029}, getCorrectedValue($store{0xa029},$offset->{0xa029}) );
QA::WriteQALog($fqa, "rate", "hodo", 10,
- $state, 'Hodo Rate', $shorttext, $longtext);
+ $state, 'PT6 Rate', $shorttext, $longtext);
$state = QA::OK;
$shorttext = QA::SciNotation($store{0xa02a})." / ".getCorrected($store{0xa02a},$offset->{0xa02a});
- $longtext = sprintf("Trigger Rate from Pion 2: %i Hz / %i Hz after offset correction",$store{0xa02a}, getCorrectedValue($store{0xa02a},$offset->{0xa02a}) );
- QA::WriteQALog($fqa, "rate", "pion2", 10,
- $state, 'Pion2 Rate', $shorttext, $longtext);
+ $longtext = sprintf("Trigger Rate from PT7: %i Hz / %i Hz after offset correction",$store{0xa02a}, getCorrectedValue($store{0xa02a},$offset->{0xa02a}) );
+ QA::WriteQALog($fqa, "rate", "pion1", 10,
+ $state, 'PT7 Rate', $shorttext, $longtext);
$state = QA::OK;
$shorttext = QA::SciNotation($store{0xa02b})." / ".getCorrected($store{0xa02b},$offset->{0xa02b});
- $longtext = sprintf("Trigger Rate from Pion 1: %i Hz / %i Hz after offset correction",$store{0xa02b}, getCorrectedValue($store{0xa02b},$offset->{0xa02b}) );
- QA::WriteQALog($fqa, "rate", "pion1", 10,
- $state, 'Pion1 Rate', $shorttext, $longtext);
+ $longtext = sprintf("Trigger Rate from PT8: %i Hz / %i Hz after offset correction",$store{0xa02b}, getCorrectedValue($store{0xa02b},$offset->{0xa02b}) );
+ QA::WriteQALog($fqa, "rate", "pion2", 10,
+ $state, 'PT8 Rate', $shorttext, $longtext);
$state = QA::OK;
$shorttext = QA::SciNotation($store{0xa024})." / ".getCorrected($store{0xa024},$offset->{0xa024});
--- /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];
+
+
+#my $flog = Hmon::OpenLogfile();
+#my $fqa = QA::OpenQAFile();
+
+use HADES::TrbNet;
+
+my $plot1 = {
+name => "RichMagnet",
+file => "files/RichMagnet",
+title => "RICH MagnetSensors",
+entries => 6,
+curves => 4,
+type => HPlot::TYPE_HEATMAP,
+output => HPlot::OUT_PNG,
+zlabel => "B [uT]",
+sizex => 500,
+sizey => 400,
+nokey => 1,
+buffer => 1,
+xmin => -0.5,
+xmax => 5.5,
+xlabel => "RICH Arm number",
+ylabel => "Sensor Number on Board",
+ymin => -0.5,
+ymax => 3.5,
+cbmax => "100<*<1E5",
+cbmin => 0,
+cblabel => "B [uT]",
+noinit => 1,
+additional => "",
+showvalues => 0, };
+HPlot::PlotInit($plot1);
+
+my $str = Hmon::MakeTitle(7, 9, "RICH Magnet",0);
+$str .= qq@<img src="%ADDPNG files/RichMagnet.png%" type="image/png"><br>\n@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("RichMagnet",$str);
+
+
+trb_init_ports() or die trb_strerror();
+
+my @calib = (((65.000,34.500,245.024),(-78.500,-20.000,-33.046),(-17.000,-33.000,-112.034),(2.5000,-24.000,43.524)),((106.000,-24.500,210.366),(-34.000,-60.500,-142.662),(114.000,-59.000,5.642),(73.000,-84.000,166.036)),((-31.000,-120.500,-156.364),(8.500,-85.000,-14.508),(54.500,-60.000,-96.790),(60.500,-108.500,-27.404)),(0,1,2,3),(0,1,2,3),(0,1,2,3));
+while(1){
+ my $count = 0;
+ my $data;
+ my $rich = trb_register_read_mem(0x0110, 0xe010,0,0x60) or sleep 5 and next;
+ print Dumper $rich;
+
+ foreach my $b (@{$rich->{0x0110}}) {
+ my $t;
+ my $val;
+
+ if (($count % 4) == 0) {
+ $t = ($b & 0x3ffffff) / 100;
+ if ((($b >> 27)&0x1) == 1) {$t = $t * -1;}
+ $val = 0;
+ } else {
+ $t = ($b & 0x3ffffff) / 1000;
+ if ((($b >> 27)&0x1) == 1) {$t = $t * -1;}
+ $val += $t*$t;
+ }
+ printf("%.3f\n",$t);
+ if (($count % 4) == 3 ) {
+ my $sens = ($count % 16) / 4;
+ my $board = ($count / 16);
+
+ my $s = sprintf("%1x%1x",$board,$sens);
+ $data->{$s}=sqrt($val);
+
+ HPlot::PlotFill('RichMagnet',sqrt($val),$board,$sens);#
+ }
+
+
+
+ $count ++;
+ }
+
+ HPlot::PlotDraw('RichMagnet');
+
+ sleep 10;
+}
#-------Interlock workaround-------#
#var $Interlock = 0;
- if ($max > 35.0 ) {
+ if ($max > 38.0 ) {
#printf "Off\n";
#my $s = sprintf("HADES:RICH:HV:CR1:0:1000:PowerOn");
my $s = sprintf("HAD:RICH:PS:17:SETONOFF");
if($plots) {
my $i = 0;
- $str = Hmon::MakeTitle(10,8,"Hodo Fine Histogram",0);
+ $str = Hmon::MakeTitle(10,8,"Mux A/B Histogram",0);
$str .= qq@
<img src="%ADDPNG files/hodofinehist.png%" type="image/png">
@;
$str .= Hmon::MakeFooter();
- Hmon::WriteFile("HodoFineHist",$str);
+ Hmon::WriteFile("MuxABHist",$str);
-#
-# while(1) {
-# my $binning = trb_register_read(3,0xa0c8) or sleep 5 and next;
-# my $offset = trb_register_read(3,0xa0c6) or sleep 5 and next;
-# my $select = trb_register_read(3,0xa0da) or sleep 5 and next;
-#
-# # print $binning->{3}."\n";
-# $binning = $binning->{3}*100E-9;
-# # print $binning."\n";
-# $binning = QA::SciNotation($binning);
-# # print $binning."\n";
-# $offset = QA::SciNotation($offset->{3}*100E-9);
-# my $selx = "err";
-# my $sely = "err";
-# $selx = "X 0-7" if ($select->{3} & 0x3) == 0;
-# $selx = "X 4-11" if ($select->{3} & 0x3) == 1;
-# $selx = "X 8-15" if ($select->{3} & 0x3) == 2;
-# $sely = "Y 0-7" if ($select->{3} & 0xC) == 0;
-# $sely = "Y 4-11" if ($select->{3} & 0xC) == 4;
-# $sely = "Y 8-15" if ($select->{3} & 0xC) == 8;
-#
-#
-#
-# $str = Hmon::MakeTitle(10,16,"Start Histogram",0);
-# $str .= qq@
-# Offset: @.$offset.qq@s - Binning: @.$binning.qq@s - Inputs: $selx, $sely
-# <br><img src="%ADDPNG files/starthistx0.png%" type="image/png">
-# <img src="%ADDPNG files/starthisty0.png%" type="image/png">
-# @;
-# $str .= Hmon::MakeFooter();
-# Hmon::WriteFile("Starthist",$str);
-#
-# $str = Hmon::MakeTitle(10,16,"Start Histogram",0);
-# $str .= qq@
-# Offset: @.$offset.qq@s - Binning: @.$binning.qq@s - Inputs: $selx, $sely
-# <br><img src="%ADDPNG files/starthiststackedx0.png%" type="image/png">
-# <img src="%ADDPNG files/starthiststackedy0.png%" type="image/png">
-# @;
-# $str .= Hmon::MakeFooter();
-# Hmon::WriteFile("StarthistStacked",$str);
-#
-# sleep(5);
-# }
+
+ while(1) {
+ my $binning = trb_register_read(3,0xa0c8) or sleep 5 and next;
+ my $offset = trb_register_read(3,0xa0c6) or sleep 5 and next;
+ my $select = trb_register_read(3,0xa0da) or sleep 5 and next;
+
+# print $binning->{3}."\n";
+ $binning = $binning->{3}*100E-9;
+# print $binning."\n";
+ $binning = QA::SciNotation($binning);
+# print $binning."\n";
+ $offset = QA::SciNotation($offset->{3}*100E-9);
+ my $selx = "err";
+ my $sely = "err";
+ $selx = "X 0-7" if ($select->{3} & 0x3) == 0;
+ $selx = "X 4-11" if ($select->{3} & 0x3) == 1;
+ $selx = "X 8-15" if ($select->{3} & 0x3) == 2;
+ $sely = "Y 0-7" if ($select->{3} & 0xC) == 0;
+ $sely = "Y 4-11" if ($select->{3} & 0xC) == 4;
+ $sely = "Y 8-15" if ($select->{3} & 0xC) == 8;
+
+
+
+ $str = Hmon::MakeTitle(10,16,"Start Histogram",0);
+ $str .= qq@
+ Offset: @.$offset.qq@s - Binning: @.$binning.qq@s - Inputs: $selx, $sely
+ <br><img src="%ADDPNG files/starthistx0.png%" type="image/png">
+ <img src="%ADDPNG files/starthisty0.png%" type="image/png">
+ @;
+ $str .= Hmon::MakeFooter();
+ Hmon::WriteFile("Starthist",$str);
+
+ $str = Hmon::MakeTitle(10,16,"Start Histogram",0);
+ $str .= qq@
+ Offset: @.$offset.qq@s - Binning: @.$binning.qq@s - Inputs: $selx, $sely
+ <br><img src="%ADDPNG files/starthiststackedx0.png%" type="image/png">
+ <img src="%ADDPNG files/starthiststackedy0.png%" type="image/png">
+ @;
+ $str .= Hmon::MakeFooter();
+ Hmon::WriteFile("StarthistStacked",$str);
+
+ sleep(5);
+ }
}
else {
- qx(./hmon_hadplot_old.sh -d 3000 \\
- -a 0x0003 -r 41216 -m 500 -p 0 -w 32 -t "MuxA" \\
- -a 0x0003 -r 41716 -m 500 -p 0 -w 32 -t "MuxB" \\
- -ytitle "Hits / bin" \\
- -output "PNG.files/hodofinehist.760.365" -curvestyle steps -key genreg 2>/dev/null &
- );
+ qx(
+
+ ./hmon_hadplot.sh -d 3000 \\
+ -a 0x0003 -r 42216 -m 500 -p 0 -w 32 -t "X 1" \\
+ -a 0x0003 -r 42716 -m 500 -p 0 -w 32 -t "X 2" \\
+ -a 0x0003 -r 43216 -m 500 -p 0 -w 32 -t "X 3" \\
+ -a 0x0003 -r 43716 -m 500 -p 0 -w 32 -t "X 4" \\
+ -a 0x0003 -r 44216 -m 500 -p 0 -w 32 -t "X 5" \\
+ -a 0x0003 -r 44716 -m 500 -p 0 -w 32 -t "X 6" \\
+ -a 0x0003 -r 45216 -m 500 -p 0 -w 32 -t "X 7" \\
+ -a 0x0003 -r 45716 -m 500 -p 0 -w 32 -t "X 8" \\
+ -output "PNG.files/starthistx0.760.365" -curvestyle steps -key genreg 2>/dev/null &
+
+./hmon_hadplot.sh -d 3000 \\
+ -a 0x0003 -r 46216 -m 500 -p 0 -w 32 -t "Y 1" \\
+ -a 0x0003 -r 46716 -m 500 -p 0 -w 32 -t "Y 2" \\
+ -a 0x0003 -r 47216 -m 500 -p 0 -w 32 -t "Y 3" \\
+ -a 0x0003 -r 47716 -m 500 -p 0 -w 32 -t "Y 4" \\
+ -a 0x0003 -r 48216 -m 500 -p 0 -w 32 -t "Y 5" \\
+ -a 0x0003 -r 48716 -m 500 -p 0 -w 32 -t "Y 6" \\
+ -a 0x0003 -r 49216 -m 500 -p 0 -w 32 -t "Y 7" \\
+ -a 0x0003 -r 49716 -m 500 -p 0 -w 32 -t "Y 8" \\
+-output "PNG.files/starthisty0.760.365" -curvestyle steps -key genreg 2>/dev/null &
-# qx(./hmon_hadplot_old.sh -d 3000 \\
-# -a 0x0003 -r 42216 -m 500 -p 0 -w 32 -t "X 1" \\
-# -a 0x0003 -r 42716 -m 500 -p 0 -w 32 -t "X 2" \\
-# -a 0x0003 -r 43216 -m 500 -p 0 -w 32 -t "X 3" \\
-# -a 0x0003 -r 43716 -m 500 -p 0 -w 32 -t "X 4" \\
-# -a 0x0003 -r 44216 -m 500 -p 0 -w 32 -t "X 5" \\
-# -a 0x0003 -r 44716 -m 500 -p 0 -w 32 -t "X 6" \\
-# -a 0x0003 -r 45216 -m 500 -p 0 -w 32 -t "X 7" \\
-# -a 0x0003 -r 45716 -m 500 -p 0 -w 32 -t "X 8" \\
-# -output "PNG.files/starthistx0.760.365" -curvestyle steps -key genreg 2>/dev/null &
-#
-# ./hmon_hadplot_old.sh -d 3000 \\
-# -a 0x0003 -r 46216 -m 500 -p 0 -w 32 -t "Y 1" \\
-# -a 0x0003 -r 46716 -m 500 -p 0 -w 32 -t "Y 2" \\
-# -a 0x0003 -r 47216 -m 500 -p 0 -w 32 -t "Y 3" \\
-# -a 0x0003 -r 47716 -m 500 -p 0 -w 32 -t "Y 4" \\
-# -a 0x0003 -r 48216 -m 500 -p 0 -w 32 -t "Y 5" \\
-# -a 0x0003 -r 48716 -m 500 -p 0 -w 32 -t "Y 6" \\
-# -a 0x0003 -r 49216 -m 500 -p 0 -w 32 -t "Y 7" \\
-# -a 0x0003 -r 49716 -m 500 -p 0 -w 32 -t "Y 8" \\
-# -output "PNG.files/starthisty0.760.365" -curvestyle steps -key genreg 2>/dev/null &
-#
-# ./hmon_hadplot_old.sh -d 3000 \\
-# -a 0x0003 -r 42216 -m 500 -p 0 -w 32 -t "X 1" \\
-# -a 0x0003 -r 42716 -m 500 -p 0 -w 32 -t "X 2" \\
-# -a 0x0003 -r 43216 -m 500 -p 0 -w 32 -t "X 3" \\
-# -a 0x0003 -r 43716 -m 500 -p 0 -w 32 -t "X 4" \\
-# -a 0x0003 -r 44216 -m 500 -p 0 -w 32 -t "X 5" \\
-# -a 0x0003 -r 44716 -m 500 -p 0 -w 32 -t "X 6" \\
-# -a 0x0003 -r 45216 -m 500 -p 0 -w 32 -t "X 7" \\
-# -a 0x0003 -r 45716 -m 500 -p 0 -w 32 -t "X 8" \\
-# -output "PNG.files/starthiststackedx0.760.365" -curvestyle histostacked -key genreg 2>/dev/null &
-#
-# ./hmon_hadplot_old.sh -d 3000 \\
-# -a 0x0003 -r 46216 -m 500 -p 0 -w 32 -t "Y 1" \\
-# -a 0x0003 -r 46716 -m 500 -p 0 -w 32 -t "Y 2" \\
-# -a 0x0003 -r 47216 -m 500 -p 0 -w 32 -t "Y 3" \\
-# -a 0x0003 -r 47716 -m 500 -p 0 -w 32 -t "Y 4" \\
-# -a 0x0003 -r 48216 -m 500 -p 0 -w 32 -t "Y 5" \\
-# -a 0x0003 -r 48716 -m 500 -p 0 -w 32 -t "Y 6" \\
-# -a 0x0003 -r 49216 -m 500 -p 0 -w 32 -t "Y 7" \\
-# -a 0x0003 -r 49716 -m 500 -p 0 -w 32 -t "Y 8" \\
-# -output "PNG.files/starthiststackedy0.760.365" -curvestyle histostacked -key genreg 2>/dev/null &
-#
-# );
- }
+./hmon_hadplot.sh -d 3000 \\
+ -a 0x0003 -r 42216 -m 500 -p 0 -w 32 -t "X 1" \\
+ -a 0x0003 -r 42716 -m 500 -p 0 -w 32 -t "X 2" \\
+ -a 0x0003 -r 43216 -m 500 -p 0 -w 32 -t "X 3" \\
+ -a 0x0003 -r 43716 -m 500 -p 0 -w 32 -t "X 4" \\
+ -a 0x0003 -r 44216 -m 500 -p 0 -w 32 -t "X 5" \\
+ -a 0x0003 -r 44716 -m 500 -p 0 -w 32 -t "X 6" \\
+ -a 0x0003 -r 45216 -m 500 -p 0 -w 32 -t "X 7" \\
+ -a 0x0003 -r 45716 -m 500 -p 0 -w 32 -t "X 8" \\
+ -output "PNG.files/starthiststackedx0.760.365" -curvestyle histostacked -key genreg 2>/dev/null &
+
+./hmon_hadplot.sh -d 3000 \\
+ -a 0x0003 -r 46216 -m 500 -p 0 -w 32 -t "Y 1" \\
+ -a 0x0003 -r 46716 -m 500 -p 0 -w 32 -t "Y 2" \\
+ -a 0x0003 -r 47216 -m 500 -p 0 -w 32 -t "Y 3" \\
+ -a 0x0003 -r 47716 -m 500 -p 0 -w 32 -t "Y 4" \\
+ -a 0x0003 -r 48216 -m 500 -p 0 -w 32 -t "Y 5" \\
+ -a 0x0003 -r 48716 -m 500 -p 0 -w 32 -t "Y 6" \\
+ -a 0x0003 -r 49216 -m 500 -p 0 -w 32 -t "Y 7" \\
+ -a 0x0003 -r 49716 -m 500 -p 0 -w 32 -t "Y 8" \\
+-output "PNG.files/starthiststackedy0.760.365" -curvestyle histostacked -key genreg 2>/dev/null &
+ );
+ }
+# ./hmon_hadplot.sh -d 3000 \\
+# -a 0x0003 -r 41216 -m 500 -p 0 -w 32 -t "MuxA" \\
+# -a 0x0003 -r 41716 -m 500 -p 0 -w 32 -t "MuxB" \\
+# -ytitle "Hits / bin" \\
+# -output "PNG.files/hodofinehist.760.365" -curvestyle steps -key genreg 2>/dev/null &
--- /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);
+use List::Util qw[min max];
+
+trb_init_ports() or die trb_strerror();
+
+HPlot::PlotInit({
+ name => "StartRateXhistbar",
+ file => "files/StartRateXhistbar",
+ entries => 500,
+ type => HPlot::TYPE_BARGRAPH,
+ output => HPlot::OUT_PNG,
+ titles => ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
+ xlabel => "Time / 200 ms",
+ ylabel => "Hits",
+ sizex => 950,
+ sizey => 330,
+ xmin => 0,
+ xmax => 500,
+ ymin => "0",
+ ymax => "100<*",
+ curves => 16,
+ xscale => 5,
+ buffer => 1,
+ stacked => 1,
+ curvewidth => .9,
+ });
+
+HPlot::PlotInit({
+ name => "StartRateYhistbar",
+ file => "files/StartRateYhistbar",
+ entries => 500,
+ type => HPlot::TYPE_BARGRAPH,
+ output => HPlot::OUT_PNG,
+ titles => ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
+ xlabel => "Time / 200 ms",
+ ylabel => "Hits",
+ sizex => 950,
+ sizey => 330,
+ xmin => 0,
+ xmax => 500,
+ ymin => "0",
+ ymax => "100<*",
+ curves => 16,
+ xscale => 5,
+ buffer => 1,
+ stacked => 1,
+ curvewidth => .9,
+ });
+
+HPlot::PlotInit({
+ name => "VetoRatehistbar",
+ file => "files/VetoRatehistbar",
+ entries => 500,
+ type => HPlot::TYPE_BARGRAPH,
+ output => HPlot::OUT_PNG,
+ titles => ["0","1","2","3","4","5","6","7"],
+ xlabel => "Time / 200 ms",
+ ylabel => "Hits",
+ sizex => 950,
+ sizey => 330,
+ xmin => 0,
+ xmax => 500,
+ ymin => "0",
+ ymax => "100<*",
+ curves => 8,
+ xscale => 5,
+ buffer => 1,
+ stacked => 1,
+ curvewidth => .9,
+
+ });
+
+HPlot::PlotInit({
+ name => "StartRateXhist",
+ file => "files/StartRateXhist",
+ entries => 500,
+ type => HPlot::TYPE_HISTORY,
+ output => HPlot::OUT_PNG,
+ titles => ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
+ xlabel => "Seconds",
+ ylabel => "Hits",
+ sizex => 950,
+ sizey => 330,
+ ymin => "0",
+ ymax => "100<*",
+ curves => 16,
+ xscale => 5,
+ buffer => 1,
+ });
+
+HPlot::PlotInit({
+ name => "StartRateYhist",
+ file => "files/StartRateYhist",
+ entries => 500,
+ type => HPlot::TYPE_HISTORY,
+ output => HPlot::OUT_PNG,
+ titles => ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
+ xlabel => "Seconds",
+ ylabel => "Hits",
+ sizex => 950,
+ sizey => 330,
+ ymin => "0",
+ ymax => "100<*",
+ curves => 16,
+ xscale => 5,
+ buffer => 1,
+ });
+
+HPlot::PlotInit({
+ name => "VetoRatehist",
+ file => "files/VetoRatehist",
+ entries => 500,
+ type => HPlot::TYPE_HISTORY,
+ output => HPlot::OUT_PNG,
+ titles => ["0","1","2","3","4","5","6","7"],
+ xlabel => "Seconds",
+ ylabel => "Hits",
+ sizex => 950,
+ sizey => 330,
+ ymin => "0",
+ ymax => "100<*",
+ curves => 8,
+ xscale => 5,
+ buffer => 1,
+ });
+
+HPlot::PlotInit({
+ name => "StartXbar",
+ file => "files/StartXbar",
+ entries => 16,
+ type => HPlot::TYPE_BARGRAPH,
+ output => HPlot::OUT_PNG,
+ titles => ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
+ ylabel => "Hits",
+ nokey => 1,
+ sizex => 340,
+ sizey => 330,
+ xmin => -0.5,
+ xmax => 15.5,
+ ymin => "0",
+ ymax => "100<*",
+ curves => 1,
+ buffer => 1,
+ curvewidth => 2,
+ });
+
+HPlot::PlotInit({
+ name => "StartYbar",
+ file => "files/StartYbar",
+ entries => 16,
+ type => HPlot::TYPE_BARGRAPH,
+ output => HPlot::OUT_PNG,
+ titles => ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"],
+ ylabel => "Hits",
+ nokey => 1,
+ sizex => 340,
+ sizey => 330,
+ xmin => -0.5,
+ xmax => 15.5,
+ ymin => "0",
+ ymax => "100<*",
+ curves => 1,
+ buffer => 1,
+ curvewidth => 2,
+ });
+
+HPlot::PlotInit({
+ name => "Vetobar",
+ file => "files/Vetobar",
+ entries => 8,
+ type => HPlot::TYPE_BARGRAPH,
+ output => HPlot::OUT_PNG,
+ titles => ["0","1","2","3","4","5","6","7"],
+ ylabel => "Hits",
+ nokey => 1,
+ sizex => 340,
+ sizey => 330,
+ xmin => -0.5,
+ xmax => 7.5,
+ ymin => "0",
+ ymax => "100<*",
+ curves => 1,
+ buffer => 1,
+ curvewidth => 2,
+ });
+
+
+my $str = Hmon::MakeTitle(13, 22, "Start / Veto Rate",0);
+$str .= qq@<h3>Start X</h3><img src="%ADDPNG files/StartRateXhist.png%" type="image/png"><br>\n@;
+$str .= qq@<h3>Start Y</h3><img src="%ADDPNG files/StartRateYhist.png%" type="image/png"><br>\n@;
+$str .= qq@<h3>Veto</h3><img src="%ADDPNG files/VetoRatehist.png%" type="image/png"><br>\n@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("StartRate",$str);
+
+$str = Hmon::MakeTitle(13, 22, "Start / Veto Rate",0);
+$str .= qq@<h3>Start X</h3><img src="%ADDPNG files/StartRateXhistbar.png%" type="image/png"><br>\n@;
+$str .= qq@<h3>Start Y</h3><img src="%ADDPNG files/StartRateYhistbar.png%" type="image/png"><br>\n@;
+$str .= qq@<h3>Veto</h3><img src="%ADDPNG files/VetoRatehistbar.png%" type="image/png"><br>\n@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("StartRateBars",$str);
+
+$str = Hmon::MakeTitle(14, 8, "Start-X / Start-Y / Veto Rate",0);
+$str .= qq@<img src="%ADDPNG files/StartXbar.png%" type="image/png">\n@;
+$str .= qq@<img src="%ADDPNG files/StartYbar.png%" type="image/png">\n@;
+$str .= qq@<img src="%ADDPNG files/Vetobar.png%" type="image/png"><br>\n@;
+$str .= Hmon::MakeFooter();
+Hmon::WriteFile("StartBars",$str);
+
+my $old;
+my $diff;
+my $oldtime;
+my $iter = 0;
+my @chan = qw(0 0 2 4 6 8 10 12 14 15 13 11 9 7 5 3 1);
+my @chanveto = qw(0 2 7 3 4 0 5 1 6);
+
+while(1) {
+
+ my $o = trb_registertime_read_mem(0xfe48,0xc000,0,17); # or die trb_strerror() or sleep 5 and next;
+# print Dumper $o;
+ if (defined $old) {
+ foreach my $b (keys %$o) {
+ my $tdiff = $o->{$b}{time}->[0] - ($oldtime->{$b}||0);
+ $tdiff += 2**16 if $tdiff < 0;
+ $tdiff *= 16;
+ for my $v (0..16) {
+ my $vdiff = ($o->{$b}{value}[$v]&0xfffffff) - ($old->{$b}{value}[$v]&0xfffffff);
+ $vdiff += 2**28 if $vdiff < 0;
+ $diff->{$b}[$v] = $vdiff/($tdiff||1E6)*1E6;
+ }
+ $oldtime->{$b} = $o->{$b}{time}[0];
+ }
+
+ for my $c (1..16) {
+ HPlot::PlotAdd("StartRateXhist",$diff->{0x5000}[$c],$chan[$c]);
+ HPlot::PlotAdd("StartRateYhist",$diff->{0x5001}[$c],$chan[$c]);
+ HPlot::PlotAdd("StartRateXhistbar",$diff->{0x5000}[$c],$chan[$c]);
+ HPlot::PlotAdd("StartRateYhistbar",$diff->{0x5001}[$c],$chan[$c]);
+ HPlot::PlotFill("StartXbar",$diff->{0x5000}[$c],$chan[$c]);
+ HPlot::PlotFill("StartYbar",$diff->{0x5001}[$c],$chan[$c]);
+ }
+
+ for my $c (1..8) {
+ HPlot::PlotAdd("VetoRatehist",$diff->{0x5002}[$c],$chanveto[$c]);
+ HPlot::PlotAdd("VetoRatehistbar",$diff->{0x5002}[$c],$chanveto[$c]);
+ HPlot::PlotFill("Vetobar",$diff->{0x5002}[$c],$chanveto[$c]);
+ }
+
+ HPlot::PlotDraw('StartRateXhist') if ($iter == 0);
+ HPlot::PlotDraw('StartRateYhist') if ($iter == 1);
+ HPlot::PlotDraw('VetoRatehist') if ($iter == 2);
+ HPlot::PlotDraw('StartRateXhistbar') if ($iter == 3);
+ HPlot::PlotDraw('StartRateYhistbar') if ($iter == 4);
+ HPlot::PlotDraw('VetoRatehistbar') if ($iter == 5);
+ HPlot::PlotDraw('StartXbar') if ($iter == 6);
+ HPlot::PlotDraw('StartYbar') if ($iter == 7);
+ HPlot::PlotDraw('Vetobar') if ($iter == 8);
+ $iter = 0 if ($iter++ == 8)
+
+ }
+
+
+ $old = $o;
+ usleep(200000);
+ }
\ No newline at end of file
$spillsum = 0;
}
$startmsg = sprintf("%s / %s",QA::SciNotation($startsum),QA::SciNotation($lastspillsum));
- $startlongmsg = sprintf("Start counts per second %s/s - Start counts per spill %s",QA::SciNotation($startsum),QA::SciNotation($lastspillsum));
- QA::WriteQALog($fqa, "trg", "start", 10, $qastatstart, "Hodo Count", $startmsg, $startlongmsg);
+ $startlongmsg = sprintf("counts per second %s/s - counts per spill %s",QA::SciNotation($startsum),QA::SciNotation($lastspillsum));
+ QA::WriteQALog($fqa, "trg", "start", 10, $qastatstart, "PT6 Count", $startmsg, $startlongmsg);
<li><a href="monitor.cgi?2-window-datarate">Data rate histogram</a></li>
</ul></div>
-<div class="linkbox" style="float:right"><h4>Pion</h4><ul>
-<!--<li><a href="monitor.cgi?1-window-DiamondRate">Rate on Start Diamond</a></li>-->
-<li><a href="monitor.cgi?1-window-pion1rate">Rate on Pion 1</a></li>
-<li><a href="monitor.cgi?1-window-pion2rate">Rate on Pion 2</a></li>
-<li><a href="monitor.cgi?1-window-pion1adc">ADC values on Pion 1</a></li>
-<li><a href="monitor.cgi?1-window-pion2adc">ADC values on Pion 2</a></li>
-<li><a href="monitor.cgi?5-window-PionSupplies">Pion Power & Cooling</a></li>
-<li><a href="monitor.cgi?1-window-DiamondRate">Rate on the Diamond</a></li>
-<li><a href="monitor.cgi?2-window-HodoHist">Spill Shape from Hodoscope</a></li>
-<li><a href="monitor.cgi?1-window-HodoRate">Rate on Hodoscope (heatmap)</a></li>
-<li><a href="monitor.cgi?2-window-HodoRatePlot">Rate on Hodoscope (curve)</a></li>
-<li><a href="monitor.cgi?1-window-HitRatios">Hit Ratio Pion/Hodo (current)</a></li>
-<li><a href="monitor.cgi?2-window-HitRatioHist">Hit Ratio Pion/Hodo (history)</a></li>
-<li><a href="monitor.cgi?2-window-HitSumHist">Hit Rate Summary</a></li>
-</ul></div>
-
-
-<div class="linkbox" style="float:left"><h4>Trigger</h4><ul>
+<div class="linkbox" style="float:right"><h4>Trigger</h4><ul>
<li><a href="monitor.cgi?1-window-CTSRates">Rates on CTS Trigger I/O</a></li>
<li><a href="monitor.cgi?1-window-eventrateshort">Eventrate histogram (10s)</a></li>
<li><a href="monitor.cgi?1-window-eventrate">Eventrate histogram (60s)</a></li>
<li><a href="monitor.cgi?10-window-StartCountSpill">Start counts per spill</a></li>
<li><a href="monitor.cgi?10-window-Pt3AcceptRatio">Ratio of accepted PT3 per spill</a></li>
<li><a href="monitor.cgi?10-window-EvtsPerSpill">Recorded events per spill</a></li>
-<li><a href="monitor.cgi?1-window-SpillStructure">Spill Structure from Start</a></li>
<!--<li><a href="monitor.cgi?5-window-Vetohist">Veto hit count histograms</a></li>-->
<li><a href="monitor.cgi?5-window-Muxhist">CTS mux output histograms</a></li>
<li><a href="monitor.cgi?5-window-CtsMuxRatio">CTS mux output ratio histo.</a></li>
</ul></div>
+<!-- <div class="linkbox" style="float:right"><h4>Pion</h4><ul> -->
+<!--<li><a href="monitor.cgi?1-window-DiamondRate">Rate on Start Diamond</a></li>-->
+<!-- <li><a href="monitor.cgi?1-window-pion1rate">Rate on Pion 1</a></li> -->
+<!-- <li><a href="monitor.cgi?1-window-pion2rate">Rate on Pion 2</a></li> -->
+<!-- <li><a href="monitor.cgi?1-window-pion1adc">ADC values on Pion 1</a></li> -->
+<!-- <li><a href="monitor.cgi?1-window-pion2adc">ADC values on Pion 2</a></li> -->
+<!-- <li><a href="monitor.cgi?5-window-PionSupplies">Pion Power & Cooling</a></li> -->
+<!-- <li><a href="monitor.cgi?1-window-DiamondRate">Rate on the Diamond</a></li> -->
+<!-- <li><a href="monitor.cgi?2-window-HodoHist">Spill Shape from Hodoscope</a></li> -->
+<!-- <li><a href="monitor.cgi?1-window-HodoRate">Rate on Hodoscope (heatmap)</a></li> -->
+<!-- <li><a href="monitor.cgi?2-window-HodoRatePlot">Rate on Hodoscope (curve)</a></li> -->
+<!-- <li><a href="monitor.cgi?1-window-HitRatios">Hit Ratio Pion/Hodo (current)</a></li> -->
+<!-- <li><a href="monitor.cgi?2-window-HitRatioHist">Hit Ratio Pion/Hodo (history)</a></li> -->
+<!-- <li><a href="monitor.cgi?2-window-HitSumHist">Hit Rate Summary</a></li> -->
+<!-- </ul></div> -->
+
+<div class="linkbox" style="float:left"><h4>Start</h4><ul>
+<li><a href="monitor.cgi?1-window-StartRate">Rates for all Start / Veto (histo)</a></li>
+<li><a href="monitor.cgi?1-window-StartRateBars">Rates for all Start / Veto (histo,bargraph)</a></li>
+<li><a href="monitor.cgi?1-window-StartBars">Rates for all Start / Veto (bargraph)</a></li>
+<li><a href="monitor.cgi?1-window-SpillStructure">Spill Structure from Start</a></li>
+</ul></div>
+
+<div class="linkbox" style="float:left"><h4>ECal</h4><ul>
+<li><a href="monitor.cgi?1-window-ECalRate">Rate Summary for ECal</a></li>
+</ul></div>
+
<div class="linkbox" style="float:right"><h4>MDC</h4><ul>
<li><a href="monitor.cgi?10-MDCRates-MDCBusy-MDCTemperature-MDCRetransmission-MDCTriggerError-MDCTokenMiss">MDC Overview</a></li>
<li><a target="_blank" href="rich_drawing.htm#rich2V5">DiRich 2.5V</a></li>
<li><a href="monitor.cgi?10-richvolt">Voltage & Current</a></li>
<li><a href="monitor.cgi?2-RichRate">Rates on all channels</a></li>
+<li><a href="monitor.cgi?10-window-RichMagnet">Rich Inner Magnet fields</a></li>
</ul></div>
xmlhttp.onreadystatechange = function() {
if(xmlhttp.readyState == 4) {
if(!document.getElementById("footer")) {
- document.getElementById("content").style.visibility="hidden";
+ document.getElementById("content").style.opacity="0";
document.getElementById("content").innerHTML=xmlhttp.responseText;
- setTimeout('document.getElementById("content").style.visibility="visible"',100);
+ setTimeout('document.getElementById("content").style.opacity="1"',100);
}
else {
document.getElementById("content").innerHTML=xmlhttp.responseText;
next if ($a =~ /Create/i);
next if ($a =~ /datamover/);
next if ($a =~ /Transmitter/);
+ next if ($a =~ /has closed file/);
+ next if ($a =~ /conne?cted LTSM/);
+ next if ($a =~ /connect retries/);
next if ($a =~ /HADAQ/);
next if ($a =~ /DropAllInputBuffers/);
next if ($a =~ /Lost\sEvent\srate/);
}
- next if ($a =~ /30 boards complain: Event not found: 3000/);
- next if ($a =~ /30 boards complain: frontend not configured: 3000/);
- next if ($a =~ /30 boards complain: error: 3000/);
- next if ($a =~ /30 boards complain: serious error: 3000/);
- $a =~ s/3000 3001 3002 3003 3004 3010 3011 3012 3013 3014 3020 3021 3022 3023 3024 3030 3031 3032 3033 3034 3040 3041 3042 3043 3044 3050 3051 3052 3053 3054/RICH, /;
+# next if ($a =~ /30 boards complain: Event not found: 3000/);
+# next if ($a =~ /30 boards complain: frontend not configured: 3000/);
+# next if ($a =~ /30 boards complain: error: 3000/);
+# next if ($a =~ /30 boards complain: serious error: 3000/);
+# $a =~ s/3000 3001 3002 3003 3004 3010 3011 3012 3013 3014 3020 3021 3022 3023 3024 3030 3031 3032 3033 3034 3040 3041 3042 3043 3044 3050 3051 3052 3053 3054/RICH, /;
$a =~ s/0x2000 0x2001 0x2002 0x2003 0x2004 0x2005 0x2006 0x2007 0x2008 0x2009 0x200a 0x200b 0x200c 0x200d 0x2010 0x2011 0x2012 0x2013 0x2014 0x2015 0x2016 0x2017 0x2018 0x2019 0x201a 0x201b 0x201c 0x201d 0x2020 0x2021 0x2022 0x2023 0x2024 0x2025 0x2026 0x2027 0x2028 0x2029 0x202a 0x202b 0x202c 0x202d 0x2030 0x2031 0x2032 0x2033 0x2034 0x2035 0x2036 0x2037 0x2038 0x2039 0x203a 0x203b 0x203c 0x203d 0x2040 0x2041 0x2042 0x2043 0x2044 0x2045 0x2046 0x2047 0x2048 0x2049 0x204a 0x204b 0x204c 0x204d 0x2050 0x2051 0x2052 0x2053 0x2054 0x2055 0x2056 0x2057 0x2058 0x2059 0x205a 0x205b 0x205c 0x205d 0x2100 0x2101 0x2102 0x2103 0x2104 0x2105 0x2106 0x2107 0x2108 0x2109 0x210a 0x210b 0x210c 0x210d 0x210e 0x210f 0x2110 0x2111 0x2112 0x2113 0x2114 0x2115 0x2116 0x2117 0x2118 0x2119 0x211a 0x211b 0x211c 0x211d 0x211e 0x211f 0x2120 0x2121 0x2122 0x2123 0x2124 0x2125 0x2126 0x2127 0x2128 0x2129 0x212a 0x212b 0x212c 0x212d 0x212e 0x212f 0x2130 0x2131 0x2132 0x2133 0x2134 0x2135 0x2136 0x2137 0x2138 0x2139 0x213a 0x213b/
MDC missing/;
if (($month,$day,$time,$PC,$who,$level,$message) = $a =~ m/(\w+)\s+(\d+)\s+(\d\d:\d\d:\d\d)\s+(\w+)\s+\w+.?\w?.?:\s+(\w+-?\w?\w?-?\d?\d?)\s+.(\w).\s+(.*)/) {
sizey => 220,
xmin => 0,
xmax => 96,
- ymin => '0',
curves => 1,
countup => 1,
xscale => 1,
sizey => 220,
xmin => 0,
xmax => 96,
- ymin => '0',
curves => 1,
countup => 1,
xscale => 1,
output => HPlot::OUT_PNG,
titles => ["Resistance"],
xlabel => "Channel",
- ylabel => 'Ohm',
+ ylabel => 'kOhm',
sizex => 850,
sizey => 220,
- xmin => -1,
+ xmin => 0,
xmax => 96,
- ymin => '0',
+ ymin => '600',
curves => 1,
countup => 1,
xscale => 1,
nokey => 0,
buffer => 1,
bargap => 0.4,
- curvewidth => 1};
+ curvewidth => 1,
+ additional => "
+ set obj 1 rect from -1, 750 to 100, 850 fc rgb '#ddffdd' behind\n"};
HPlot::PlotInit($plot3);
#$str = "<!DOCTYPE html>\n\n<html>\n<head>\n";
#$str .= "<style>\n.dot {\n height: 25px;\n width:25px;\n border-radius: 50%;\n display: inline-block;\n}\n \n ";
#$str .= "</style>\n</head>\n<body>\n";
- $str = Hmon::MakeTitle(13, 17, "RICH HV", 1, "");
+ $str = Hmon::MakeTitle(11, 18, "RICH HV", 1, "");
$str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
$str .= "<div style=\"text-align:left; margin-top: 10px;\">";
for (my $i = 0; $i <= 5;$i++){
for (my $j = 0; $j<=15; $j++) {
my $cnt = ($i*16)+$j;
- HPlot::PlotAdd("RichCurr",-($data->{"I$cnt"}->{val}||-1),);
- HPlot::PlotAdd("RichVolt",-($data->{"U$cnt"}->{val}||-1),);
- HPlot::PlotAdd("RichResist",$data->{"R$cnt"}->{val}||-1,);
+ HPlot::PlotAdd("RichCurr",$data->{"I$cnt"}->{val}||-1,);
+ HPlot::PlotAdd("RichVolt",$data->{"U$cnt"}->{val}||-1,);
+ HPlot::PlotAdd("RichResist",$data->{"R$cnt"}->{val}/1000||-1,);
}
}