From: hadaq Date: Sat, 23 Mar 2019 13:02:25 +0000 (+0100) Subject: some adjustments to Hmon scripts X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=5ae27c949f05c135062c4393dfc597b0414eb95a;p=hadesdaq.git some adjustments to Hmon scripts --- diff --git a/hmon/QA.pm b/hmon/QA.pm index 3f1220c..81807a7 100644 --- a/hmon/QA.pm +++ b/hmon/QA.pm @@ -97,17 +97,15 @@ our @Eventsbroken = (.5,2,5); our @MdcTokenMissLimits = (10,50,100); our @MdcNominalHV = (1750,1770,1900,2150); our $MdcHVOffsetLimits = [[5,10,55],[5,10,55],[5,10,55],[10,110,125]]; -our @EcalHvLimits = (326,325,320); -our @RpcHvLimits = (12,12,11); -our @TofHvLimits = (768,760,759); +our @EcalHvLimits = (493,325,320); +our @RpcHvLimits = (12,12,12); +our @TofHvLimits = (766,760,759); +our @FwHvLimits = (280,250,200); our @TdcCalibrationInterval = (320000,450000,600000); our @TdcCalibrationTemperature = (5,7,10); our @PionLvCurrLimits = (4,5,6); -our $MdcHvOff = 0; -our $RichHvOff = 0; -our $MagnetOff = 1; our $PadiwaECalNumber = 84; our @PadiwaEcalLimits = (0, 1, 2); @@ -116,6 +114,17 @@ our @LimitTriggerPerSpill = (1000, 0, 0); our $AcceleratorCycle = 7; use constant {CTSAddress => 0x0003}; +############################################################################### +# Switched off systems +############################################################################### +our $MdcHvOff = 0; +our $RichHvOff = 0; +our $TofHvOff = 0; +our $RpcHvOff = 0; +our $FwHvOff = 0; +our $MagnetOff = 1; + + ############################################################################### # Missing Boards ############################################################################### diff --git a/hmon/hmon_dutyfactor.pl b/hmon/hmon_dutyfactor.pl index f894785..c22325f 100755 --- a/hmon/hmon_dutyfactor.pl +++ b/hmon/hmon_dutyfactor.pl @@ -118,9 +118,9 @@ while(1) { #end of spill my $lastsum = 0; - for my $c (1..5) { $lastsum += $store[-$c]//0;} + for my $c (1..15) { $lastsum += $store[-$c]//0;} - if($lastsum < 100*5*$SPS && ($store[-6]//0) > 100*$SPS) { + if($lastsum < 100*15*$SPS && ($store[-16]//0) > 100*$SPS) { my $total = sum(@store)/$SPS; my $max = max(@store); diff --git a/hmon/hmon_endpoints.pl b/hmon/hmon_endpoints.pl index 9d8e172..77dcc42 100755 --- a/hmon/hmon_endpoints.pl +++ b/hmon/hmon_endpoints.pl @@ -260,17 +260,21 @@ while(1) { if ($num_rich_missing > 0) {$rich_longtext = "Endp @sorted_rich_results missing"}; if ($num_rich_mistake > 0) {$rich_longtext .= " Endp @{$rich_results[4]} not known";} - $qastate = QA::GetQAState('below',$num_rich_missing,@QA::RichEndpMissingLimits); - Hmon::Speak('richmissonce',"$num_rich_missing Rich Frontends missing") if($qastate > 60 && $qastate < QA::ERROR ); - Hmon::Speak('richmiss',"$num_rich_missing Rich Frontends missing") if($qastate >= QA::ERROR ); - - QA::WriteQALog($flog,"endp","rich",$waittime,$qastate, - $rich_title,$rich_value,$rich_longtext); if($qastate > 60) { system("logger -p local1.info -t DAQ Endp \\ $rich_longtext") unless (($timecnt->{rich}++)%$loggerperiod); } else {$timecnt->{rich} = 0;} + + + + $qastate = QA::GetQAState('below',$num_rich_missing,@QA::RichEndpMissingLimits); + Hmon::Speak('richmissonce',"$num_rich_missing Rich Frontends missing") if($qastate > 60 && $qastate < QA::ERROR ); + Hmon::Speak('richmiss',"$num_rich_missing Rich Frontends missing") if($qastate >= QA::ERROR ); + + + if($num_rich_missing > 20) {$rich_longtext = $num_rich_missing." boards missing";} + QA::WriteQALog($flog,"endp","rich",$waittime,$qastate, $rich_title,$rich_value,$rich_longtext); ###tof diff --git a/hmon/permanent/hmon_ecalhv.pl b/hmon/permanent/hmon_ecalhv.pl index 90a497b..a0d3022 100755 --- a/hmon/permanent/hmon_ecalhv.pl +++ b/hmon/permanent/hmon_ecalhv.pl @@ -16,7 +16,7 @@ use HPlot; my $flog = QA::OpenQAFile(); my @colors = ("#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd"); - +my $TOTALCHANS = 652; for my $i (0..5) { HPlot::PlotInit( { @@ -177,7 +177,7 @@ while(1) { for(my $j = 0; $j<=167; $j++) { my $cnt = ($i*168)+$j; if ($i==1 or $i==2 or $i==4 or $i==5){ - if (abs($data->{"U$cnt"}->{val})>1000 and $data->{"I$cnt"}->{val}>50) {$ChnlsOn++;} + if (abs($data->{"U$cnt"}->{val}//0)>1000 and ($data->{"I$cnt"}->{val}//0)>50) {$ChnlsOn++;} } } } @@ -190,17 +190,17 @@ while(1) { if ($ChnlsOn == 0) { $str .= "

Channels off ("; - } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { + } elsif ($ChnlsOn < $TOTALCHANS and $ChnlsOn >= 642) { $str .= "

Channels on ("; } elsif ($ChnlsOn < 642) { $str .= "

Channels on ("; - } elsif ($ChnlsOn > 652) { + } elsif ($ChnlsOn > $TOTALCHANS) { $str .= "

Channels on ("; } else { $str .= "

Channels on ("; } $str .= "$ChnlsOn"; - $str .= "/652)

"; + $str .= "/$TOTALCHANS)

"; $str .= "
\n\n"; @@ -226,17 +226,17 @@ while(1) { if ($ChnlsOn == 0) { $str .= "

Channels off ("; - } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { + } elsif ($ChnlsOn < $TOTALCHANS and $ChnlsOn >= 642) { $str .= "

Channels on ("; } elsif ($ChnlsOn < 642) { $str .= "

Channels on ("; - } elsif ($ChnlsOn > 652) { + } elsif ($ChnlsOn > $TOTALCHANS) { $str .= "

Channels on ("; } else { $str .= "

Channels on ("; } $str .= "$ChnlsOn"; - $str .= "/652)

"; + $str .= "/$TOTALCHANS)

"; $str .= "
\n\n"; @@ -265,17 +265,17 @@ while(1) { if ($ChnlsOn == 0) { $str .= "

Channels off ("; - } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { + } elsif ($ChnlsOn < $TOTALCHANS and $ChnlsOn >= 642) { $str .= "

Channels on ("; } elsif ($ChnlsOn < 642) { $str .= "

Channels on ("; - } elsif ($ChnlsOn > 652) { + } elsif ($ChnlsOn > $TOTALCHANS) { $str .= "

Channels on ("; } else { $str .= "

Channels on ("; } $str .= "$ChnlsOn"; - $str .= "/652)

"; + $str .= "/$TOTALCHANS)

"; $str .= "
\n\n\n\n\n\n\n"; @@ -305,17 +305,17 @@ while(1) { if ($ChnlsOn == 0) { $str .= "

Channels off ("; - } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { + } elsif ($ChnlsOn < $TOTALCHANS and $ChnlsOn >= 642) { $str .= "

Channels on ("; } elsif ($ChnlsOn < 642) { $str .= "

Channels on ("; - } elsif ($ChnlsOn > 652) { + } elsif ($ChnlsOn > $TOTALCHANS) { $str .= "

Channels on ("; } else { $str .= "

Channels on ("; } $str .= "$ChnlsOn"; - $str .= "/652)

"; + $str .= "/$TOTALCHANS)

"; $str .= "
\n\n
Sector 1Sector 2Sector 3
\n\n\n\n\n"; @@ -341,8 +341,8 @@ while(1) { my $qastate = QA::OK; - my $value = sprintf("%i/652",$ChnlsOn); - my $longtext = sprintf("HV channels On: %i/652",$ChnlsOn); + my $value = sprintf("%i/$TOTALCHANS",$ChnlsOn); + my $longtext = sprintf("HV channels On: %i/$TOTALCHANS",$ChnlsOn); $qastate = QA::GetQAState('above', $ChnlsOn, @QA::EcalHvLimits); if ($ChnlsOn == 0){ @@ -350,7 +350,7 @@ if ($ChnlsOn == 0){ $str = ""; if($timer%8 == 0) { - if ($ChnlsOn>0 and $ChnlsOn<652) { + if ($ChnlsOn>0 and $ChnlsOn<$TOTALCHANS and ($TOTALCHANS - $ChnlsOn) < 16) { #only report if a small number of channels is off for(my $i = 1; $i <=6; $i++) { if ($i==2 or $i==3 or $i==5 or $i==6){ for(my $j = 1; $j<=168; $j++) { @@ -362,8 +362,8 @@ if ($ChnlsOn == 0){ } } } -# $value = sprintf("%i/652",$ChnlsOn); - $longtext = sprintf("HV channels On: %i/652
Check the current and voltage monitoring plots!
%s",$ChnlsOn,$str); +# $value = sprintf("%i/$TOTALCHANS",$ChnlsOn); + $longtext = sprintf("HV channels On: %i/$TOTALCHANS
Check the current and voltage monitoring plots!
%s",$ChnlsOn,$str); } elsif($ChnlsOn==0) { $value = sprintf("HV is OFF"); @@ -409,5 +409,5 @@ if ($ChnlsOn == 0){ } } - usleep(250000); + usleep(2500000); } diff --git a/hmon/permanent/hmon_fwhv.pl b/hmon/permanent/hmon_fwhv.pl index 7635e41..6c99a3c 100755 --- a/hmon/permanent/hmon_fwhv.pl +++ b/hmon/permanent/hmon_fwhv.pl @@ -14,374 +14,87 @@ use HADES::TrbNet; use HPlot; my $flog = QA::OpenQAFile(); -my @colors = ("#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd"); - - -# -# for my $i (0..5) { -# HPlot::PlotInit( { -# name => "EcalCurr$i", -# file => "files/EcalCurr$i", -# entries => 168, -# type => HPlot::TYPE_BARGRAPH, -# output => HPlot::OUT_PNG, -# titles => [sprintf("Sector %i - current",$i+1)], -# xlabel => "Module number", -# ylabel => "uA", -# sizex => 430, -# sizey => 190, -# xmin => 0, -# xmax => 168, -# ymin => 0, -# ymax => 1600, -# curves => 1, -# countup => 1, -# xscale => 1, -# nokey => 0, -# buffer => 1, -# bargap => 0.4, -# curvewidth => 1,}); -# } -# -# for my $i (0..5) { -# HPlot::PlotInit( { -# name => "EcalVolt$i", -# file => "files/EcalVolt$i", -# entries => 168, -# type => HPlot::TYPE_BARGRAPH, -# output => HPlot::OUT_PNG, -# titles => [sprintf("Sector %i - voltage",$i+1)], -# xlabel => "Module number", -# ylabel => "V", -# sizex => 430, -# sizey => 190, -# xmin => 0, -# xmax => 168, -# ymin => 0, -# ymax => 2500, -# curves => 1, -# countup => 1, -# xscale => 1, -# nokey => 0, -# buffer => 1, -# bargap => 0.4, -# curvewidth => 1,}); -# } -# -# -# for my $i (0..5) { -# HPlot::PlotInit( { -# name => "EcalVMap$i", -# file => "files/EcalVMap$i", -# title => "", -# entries => 17, -# curves => 15, -# type => HPlot::TYPE_HEATMAP, -# output => HPlot::OUT_PNG, -# zlabel => "Voltage [V]", -# titles => ["Voltage [V]"], -# sizex => 255, -# sizey => 200, -# nokey => 0, -# buffer => 1, -# xmin => -0.5, -# xmax => 16.5, -# ymin => -0.5, -# ymax => 14.5, -# cbmax => "1.1<*<2500", -# cbmin => "0.1<*<0.9", -# noinit => 0, -# showvalues => 0, }); -# } -# -# for my $i (0..5) { -# HPlot::PlotInit( { -# name => "EcalCMap$i", -# file => "files/EcalCMap$i", -# title => "", -# entries => 17, -# curves => 15, -# type => HPlot::TYPE_HEATMAP, -# output => HPlot::OUT_PNG, -# zlabel => "Current [uA]", -# titles => ["Current [uA]"], -# sizex => 255, -# sizey => 200, -# nokey => 0, -# buffer => 1, -# xmin => -0.5, -# xmax => 16.5, -# ymin => -0.5, -# ymax => 14.5, -# cbmax => "1.1<*<2000", -# cbmin => "0.1<*<0.9", -# noinit => 0, -# showvalues => 0, }); -# } -# my $timer=0; -my $str = ""; my $s=""; +my @channels; +my $minvolt; + +for(my $i = 1; $i <= 144; $i++) { + next if ($i == 66 || $i == 67 || $i == 78 || $i == 79); + $s = "HAD:FWHV:S$i:vmon"; + Perl2Epics::Connect("VS$i",$s); + push(@channels,"VS$i"); + $minvolt->{"VS$i"} = 990; + } -#for(my $i = 1; $i <=6; $i++) { -# for(my $j = 1; $j<=2; $j++) { -# my $cnt = (($i-1)*2)+$j-1; -# $s = sprintf("HAD:RPC:HV:S%i:L%i:imon",$i,$j); -# Perl2Epics::Connect("I$cnt",$s); -# $s = sprintf("HAD:RPC:HV:S%i:L%i:vmon",$i,$j); -# Perl2Epics::Connect("U$cnt",$s); -# } -#} +for(my $i = 145; $i <= 208; $i++) { + $s = "HAD:FWHV:M$i:vmon"; + Perl2Epics::Connect("VM$i",$s); + push(@channels,"VM$i"); + $minvolt->{"VM$i"} = 1300; + } +for(my $i = 211; $i <= 302; $i++) { + next if ($i == 218 || $i == 219 || $i == 220 || $i == 230); + next if ($i == 283 || $i == 293 || $i == 294 || $i == 295); + $s = "HAD:FWHV:L$i:vmon"; + Perl2Epics::Connect("VL$i",$s); + push(@channels,"VL$i"); + $minvolt->{"VL$i"} = 1400; + } + + print "Connected.\n"; #OVERCURRENT variables -my $overcurrent_flag = 0; -my $OVERCURRENT_YELLOW = 200; -my $OVERCURRENT_RED = 300; - -my $OVERCURRENT_period = 3; -my $overcurrent_alarm_flag = 0; -my $current_average = 0; -my $current_sum = 0; +# my $overcurrent_flag = 0; +# my $OVERCURRENT_YELLOW = 200; +# my $OVERCURRENT_RED = 300; -my $errortimer = 0; +# my $OVERCURRENT_period = 3; +# my $overcurrent_alarm_flag = 0; +# my $current_average = 0; +# my $current_sum = 0; -# my @mod_tab=(0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 23, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 0, 0, 0, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 0, 0, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 0, 0, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 0, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163); -# -# my @x_tab=(10, 9, 8, 7, 6, 10, 9, 8, 7, 6, 11, 10, 9, 8, 7, 6, 5, 11, 10, 9, 8, 7, 6, 5, 12, 11, 10, 9, 8, 7, 6, 5, 4, 12, 11, 10, 9, 8, 7, 6, 5, 4, 12, 11, 10, 9, 8, 7, 6, 5, 4, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); -# -# my @y_tab=(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14); +# my $errortimer = 0; -my @i_integrated=(0,0,0,0,0,0,0,0,0,0,0,0); +# my @i_integrated=(0,0,0,0,0,0,0,0,0,0,0,0); my $ChnlsOn = 0; +my $cnt; while(1) { - my $min_v = -1E5; - my $max_v = 1E5; - my $min_i = -1E5; - my $max_i = 1E5; - # my $data = Perl2Epics::GetAll(); + my $data = Perl2Epics::GetAll(); + my $str = ""; + + $ChnlsOn=0; + foreach my $c (@channels) { + if( $data->{$c}->{val} >= $minvolt->{$c}) { + $ChnlsOn++; + } + else { + $str .= "$c off. "; + } + } - # for(my $i = 0; $i <=5; $i++) { - # for(my $j = 0; $j<=1; $j++) { - # my $cnt = ($i*2)+$j; - # $i_integrated[$cnt]=$i_integrated[$cnt]+$data->{"I$cnt"}->{val}; - # } - # } + + my $qastate = QA::OK; + my $value = sprintf("%i/%i",$ChnlsOn, scalar @channels); + if(scalar @channels - $ChnlsOn > 20) {$str = "";} -# $str = Hmon::MakeTitle(11, 18, "ECAL HV - Current", 1, ""); -# $str .= ""; -# -# $str .= "
"; -# -# if ($ChnlsOn == 0) { -# $str .= "

Channels off ("; -# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn < 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn > 652) { -# $str .= "

Channels on ("; -# } else { -# $str .= "

Channels on ("; -# } -# $str .= "$ChnlsOn"; -# $str .= "/652)

"; -# -# $str .= "
\n\n"; -# -# $str .= qq@
\n@; -# $str .= qq@\n@; -# $str .= qq@
\n@; -# $str .= qq@\n@; -# $str .= qq@
\n@; -# $str .= qq@
\n@; -# -# -# $str .= Hmon::MakeFooter(); -# $str .= ""; -# $str .= ""; -# Hmon::WriteFile("EcalHVCurr", $str); -# -# -# -# $str = Hmon::MakeTitle(11, 18, "ECAL HV - Voltage", 1, ""); -# $str .= ""; -# -# $str .= "
"; -# -# if ($ChnlsOn == 0) { -# $str .= "

Channels off ("; -# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn < 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn > 652) { -# $str .= "

Channels on ("; -# } else { -# $str .= "

Channels on ("; -# } -# $str .= "$ChnlsOn"; -# $str .= "/652)

"; -# -# $str .= "
\n\n"; -# -# -# $str .= qq@
\n@; -# $str .= qq@\n@; -# $str .= qq@
\n@; -# $str .= qq@\n@; -# $str .= qq@
\n@; -# $str .= qq@
\n@; -# -# -# $str .= Hmon::MakeFooter(); -# $str .= ""; -# $str .= ""; -# Hmon::WriteFile("EcalHVVolt", $str); -# -# -# -# -# -# $str = Hmon::MakeTitle(10, 13, "ECAL HV - Voltage Map", 1, ""); -# $str .= ""; -# -# $str .= "
"; -# -# if ($ChnlsOn == 0) { -# $str .= "

Channels off ("; -# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn < 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn > 652) { -# $str .= "

Channels on ("; -# } else { -# $str .= "

Channels on ("; -# } -# $str .= "$ChnlsOn"; -# $str .= "/652)

"; -# -# $str .= "
\n\n
Sector 1Sector 2Sector 3
\n\n\n\n\n"; -# -# -# $str .= qq@\n@; -# $str .= qq@\n@; -# $str .= qq@\n\n@; -# -# $str .= "\n\n\n\n\n"; -# -# $str .= qq@\n@; -# $str .= qq@\n@; -# $str .= qq@\n\n
Sector 1Sector 2Sector 3
Sector 4Sector 5Sector 6
\n@; -# -# -# $str .= Hmon::MakeFooter(); -# $str .= ""; -# $str .= ""; -# Hmon::WriteFile("EcalHVVMap", $str); -# -# -# -# $str = Hmon::MakeTitle(10, 13, "ECAL HV - Current Map", 1, ""); -# $str .= ""; -# -# $str .= "
"; -# -# if ($ChnlsOn == 0) { -# $str .= "

Channels off ("; -# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn < 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn > 652) { -# $str .= "

Channels on ("; -# } else { -# $str .= "

Channels on ("; -# } -# $str .= "$ChnlsOn"; -# $str .= "/652)

"; -# -# $str .= "
\n\n\n\n\n\n\n"; -# -# -# $str .= qq@\n@; -# $str .= qq@\n@; -# $str .= qq@\n\n@; -# -# $str .= "\n\n\n\n\n"; -# -# $str .= qq@\n@; -# $str .= qq@\n@; -# $str .= qq@\n\n
Sector 1Sector 2Sector 3
Sector 4Sector 5Sector 6
\n@; -# -# -# $str .= Hmon::MakeFooter(); -# $str .= ""; -# $str .= ""; -# Hmon::WriteFile("EcalHVCMap", $str); - - $timer++; - - my $qastate = QA::NOTE; - my $value = sprintf("Work in progress"); - my $longtext = sprintf("Work in progress"); - - #$qastate = QA::GetQAState('above', 12, @QA::RpcHvLimits); - #if ($ChnlsOn == 0){ - #$qastate = QA::NOTE;} + my $longtext = sprintf("HV channels On: %i/%i
%s",$ChnlsOn, scalar @channels,$str); + $qastate = QA::GetQAState('above', $ChnlsOn, @QA::FwHvLimits); + if ($ChnlsOn == 0){ $qastate = QA::WARN_2;} + if ($QA::FwHvOff == 1) { $qastate = QA::NOTE;} - $str = ""; - if($timer%8 == 0) { - QA::WriteQALog($flog,"misc","fwhv",30,$qastate,"FWALL HV",$value,$longtext); - - - } - + QA::WriteQALog($flog,"misc","fwhv",30,$qastate,"FW HV",$value,$longtext); -# for (my $i = 0; $i <= 5;$i++){ -# if($i==1 or $i==2 or $i==4 or $i==5){ -# for (my $j = 0; $j<=167; $j++) { -# my $cnt = ($i*168)+$j; -# HPlot::PlotAdd("EcalCurr$i",$data->{"I$cnt"}->{val}||-1,); -# HPlot::PlotAdd("EcalVolt$i",$data->{"U$cnt"}->{val}||-1,); -# } -# -# for(my $j=254;$j>=0;$j--){ -# my $cnt =-1; -# if($mod_tab[$j]!=0){ -# $cnt=($i*168)+$mod_tab[$j]-1; -# HPlot::PlotAdd("EcalVMap$i",$data->{"U$cnt"}->{val}||-1,$y_tab[$j],$x_tab[$mod_tab[$j]-1]); -# HPlot::PlotAdd("EcalCMap$i",$data->{"I$cnt"}->{val}||-1,$y_tab[$j],$x_tab[$mod_tab[$j]-1]); -# } -# if($mod_tab[$j]==0){ -# HPlot::PlotAdd("EcalVMap$i",$data->{"U$cnt"}->{val}||'NaN',$y_tab[$j],$x_tab[$mod_tab[$j]-1]); -# HPlot::PlotAdd("EcalCMap$i",$data->{"I$cnt"}->{val}||'NaN',$y_tab[$j],$x_tab[$mod_tab[$j]-1]); -# } -# } -# -# -# } -# } -# -# -# #print Dumper $data; -# if($timer%8 == 0) { -# for (my $i = 0; $i <= 5;$i++){ -# HPlot::PlotDraw("EcalCurr$i"); -# HPlot::PlotDraw("EcalVolt$i"); -# HPlot::PlotDraw("EcalVMap$i"); -# HPlot::PlotDraw("EcalCMap$i"); -# } -# } - usleep(250000); + + usleep(2500000); } diff --git a/hmon/permanent/hmon_mdchv.pl b/hmon/permanent/hmon_mdchv.pl index 27e8cbb..4ca880f 100755 --- a/hmon/permanent/hmon_mdchv.pl +++ b/hmon/permanent/hmon_mdchv.pl @@ -213,10 +213,14 @@ while(1) { $qastate = min($qastate,$QA::MdcHvOff?QA::NOTE:200); my $value = sprintf("%.1f/%.1f/%.1f/%.1f",$mdcHvMin[1]/1000.,$mdcHvMin[2]/1000.,$mdcHvMin[3]/1000.,$mdcHvMin[4]/1000.); - my $longtext = "MDC high voltage in all four planes". - "
Minimum [V]: ".$mdcHvMin[1]." / ".$mdcHvMin[2]." / ".$mdcHvMin[3]." / ".$mdcHvMin[4]. - "
Maximum [V]: ".$mdcHvMax[1]." / ".$mdcHvMax[2]." / ".$mdcHvMax[3]." / ".$mdcHvMax[4]. - "
Nominal [V]: ".$QA::MdcNominalHV[0]." / ".$QA::MdcNominalHV[1]." / ".$QA::MdcNominalHV[2]." / ".$QA::MdcNominalHV[3]; + my $longtext = sprintf("MDC high voltage in all four planes". + "
Minimum [V]: %i / %i / %i / %i". + "
Maximum [V]: %i / %i / %i / %i". + "
Nominal [V]: %i / %i / %i / %i", + $mdcHvMin[1],$mdcHvMin[2],$mdcHvMin[3],$mdcHvMin[4], + $mdcHvMax[1],$mdcHvMax[2],$mdcHvMax[3],$mdcHvMax[4], + $QA::MdcNominalHV[0],$QA::MdcNominalHV[1],$QA::MdcNominalHV[2],$QA::MdcNominalHV[3] + ); QA::WriteQALog($flog,"hv","mdchv",10,$qastate,"MDC HV",$value,$longtext); # print Dumper $QA::MdcHVOffsetLimits; diff --git a/hmon/permanent/hmon_richIsobutan.pl b/hmon/permanent/hmon_richIsobutan.pl index 94c3857..057f1a0 100755 --- a/hmon/permanent/hmon_richIsobutan.pl +++ b/hmon/permanent/hmon_richIsobutan.pl @@ -92,7 +92,9 @@ my $plotScale = { storable => 1, buffer => 1, colors => ["#00ff00","#ff0000"], - additional => "set offsets 0,0,2.5,2.5" + additional => "set offsets 0,0,2.5,5.0\n + set obj 1 rect from -61, 0 to 1, 40 fc rgb '#ff7b00' behind\n + set obj 2 rect from -61, 0 to 1, 37 fc rgb '#ff0000' behind\n" }; HPlot::PlotInit($plotScale); diff --git a/hmon/permanent/hmon_rpchv.pl b/hmon/permanent/hmon_rpchv.pl index fa79394..43e01a3 100755 --- a/hmon/permanent/hmon_rpchv.pl +++ b/hmon/permanent/hmon_rpchv.pl @@ -17,109 +17,6 @@ my $flog = QA::OpenQAFile(); my @colors = ("#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd"); -# -# for my $i (0..5) { -# HPlot::PlotInit( { -# name => "EcalCurr$i", -# file => "files/EcalCurr$i", -# entries => 168, -# type => HPlot::TYPE_BARGRAPH, -# output => HPlot::OUT_PNG, -# titles => [sprintf("Sector %i - current",$i+1)], -# xlabel => "Module number", -# ylabel => "uA", -# sizex => 430, -# sizey => 190, -# xmin => 0, -# xmax => 168, -# ymin => 0, -# ymax => 1600, -# curves => 1, -# countup => 1, -# xscale => 1, -# nokey => 0, -# buffer => 1, -# bargap => 0.4, -# curvewidth => 1,}); -# } -# -# for my $i (0..5) { -# HPlot::PlotInit( { -# name => "EcalVolt$i", -# file => "files/EcalVolt$i", -# entries => 168, -# type => HPlot::TYPE_BARGRAPH, -# output => HPlot::OUT_PNG, -# titles => [sprintf("Sector %i - voltage",$i+1)], -# xlabel => "Module number", -# ylabel => "V", -# sizex => 430, -# sizey => 190, -# xmin => 0, -# xmax => 168, -# ymin => 0, -# ymax => 2500, -# curves => 1, -# countup => 1, -# xscale => 1, -# nokey => 0, -# buffer => 1, -# bargap => 0.4, -# curvewidth => 1,}); -# } -# -# -# for my $i (0..5) { -# HPlot::PlotInit( { -# name => "EcalVMap$i", -# file => "files/EcalVMap$i", -# title => "", -# entries => 17, -# curves => 15, -# type => HPlot::TYPE_HEATMAP, -# output => HPlot::OUT_PNG, -# zlabel => "Voltage [V]", -# titles => ["Voltage [V]"], -# sizex => 255, -# sizey => 200, -# nokey => 0, -# buffer => 1, -# xmin => -0.5, -# xmax => 16.5, -# ymin => -0.5, -# ymax => 14.5, -# cbmax => "1.1<*<2500", -# cbmin => "0.1<*<0.9", -# noinit => 0, -# showvalues => 0, }); -# } -# -# for my $i (0..5) { -# HPlot::PlotInit( { -# name => "EcalCMap$i", -# file => "files/EcalCMap$i", -# title => "", -# entries => 17, -# curves => 15, -# type => HPlot::TYPE_HEATMAP, -# output => HPlot::OUT_PNG, -# zlabel => "Current [uA]", -# titles => ["Current [uA]"], -# sizex => 255, -# sizey => 200, -# nokey => 0, -# buffer => 1, -# xmin => -0.5, -# xmax => 16.5, -# ymin => -0.5, -# ymax => 14.5, -# cbmax => "1.1<*<2000", -# cbmin => "0.1<*<0.9", -# noinit => 0, -# showvalues => 0, }); -# } -# - my $timer=0; my $str = ""; my $s=""; @@ -149,12 +46,6 @@ my $current_sum = 0; my $errortimer = 0; -# my @mod_tab=(0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 23, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 0, 0, 0, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 0, 0, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 0, 0, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 0, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163); -# -# my @x_tab=(10, 9, 8, 7, 6, 10, 9, 8, 7, 6, 11, 10, 9, 8, 7, 6, 5, 11, 10, 9, 8, 7, 6, 5, 12, 11, 10, 9, 8, 7, 6, 5, 4, 12, 11, 10, 9, 8, 7, 6, 5, 4, 12, 11, 10, 9, 8, 7, 6, 5, 4, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); -# -# my @y_tab=(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14); - my @i_integrated=(0,0,0,0,0,0,0,0,0,0,0,0); my $ChnlsOn = 0; @@ -176,166 +67,14 @@ while(1) { } } - -# $str = Hmon::MakeTitle(11, 18, "ECAL HV - Current", 1, ""); -# $str .= ""; -# -# $str .= "
"; -# -# if ($ChnlsOn == 0) { -# $str .= "

Channels off ("; -# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn < 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn > 652) { -# $str .= "

Channels on ("; -# } else { -# $str .= "

Channels on ("; -# } -# $str .= "$ChnlsOn"; -# $str .= "/652)

"; -# -# $str .= "
\n\n"; -# -# $str .= qq@
\n@; -# $str .= qq@\n@; -# $str .= qq@
\n@; -# $str .= qq@\n@; -# $str .= qq@
\n@; -# $str .= qq@
\n@; -# -# -# $str .= Hmon::MakeFooter(); -# $str .= ""; -# $str .= ""; -# Hmon::WriteFile("EcalHVCurr", $str); -# -# -# -# $str = Hmon::MakeTitle(11, 18, "ECAL HV - Voltage", 1, ""); -# $str .= ""; -# -# $str .= "
"; -# -# if ($ChnlsOn == 0) { -# $str .= "

Channels off ("; -# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn < 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn > 652) { -# $str .= "

Channels on ("; -# } else { -# $str .= "

Channels on ("; -# } -# $str .= "$ChnlsOn"; -# $str .= "/652)

"; -# -# $str .= "
\n\n"; -# -# -# $str .= qq@
\n@; -# $str .= qq@\n@; -# $str .= qq@
\n@; -# $str .= qq@\n@; -# $str .= qq@
\n@; -# $str .= qq@
\n@; -# -# -# $str .= Hmon::MakeFooter(); -# $str .= ""; -# $str .= ""; -# Hmon::WriteFile("EcalHVVolt", $str); -# -# -# -# -# -# $str = Hmon::MakeTitle(10, 13, "ECAL HV - Voltage Map", 1, ""); -# $str .= ""; -# -# $str .= "
"; -# -# if ($ChnlsOn == 0) { -# $str .= "

Channels off ("; -# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn < 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn > 652) { -# $str .= "

Channels on ("; -# } else { -# $str .= "

Channels on ("; -# } -# $str .= "$ChnlsOn"; -# $str .= "/652)

"; -# -# $str .= "
\n\n\n\n\n\n\n"; -# -# -# $str .= qq@\n@; -# $str .= qq@\n@; -# $str .= qq@\n\n@; -# -# $str .= "\n\n\n\n\n"; -# -# $str .= qq@\n@; -# $str .= qq@\n@; -# $str .= qq@\n\n
Sector 1Sector 2Sector 3
Sector 4Sector 5Sector 6
\n@; -# -# -# $str .= Hmon::MakeFooter(); -# $str .= ""; -# $str .= ""; -# Hmon::WriteFile("EcalHVVMap", $str); -# -# -# -# $str = Hmon::MakeTitle(10, 13, "ECAL HV - Current Map", 1, ""); -# $str .= ""; -# -# $str .= "
"; -# -# if ($ChnlsOn == 0) { -# $str .= "

Channels off ("; -# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn < 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn > 652) { -# $str .= "

Channels on ("; -# } else { -# $str .= "

Channels on ("; -# } -# $str .= "$ChnlsOn"; -# $str .= "/652)

"; -# -# $str .= "
\n\n\n\n\n\n\n"; -# -# -# $str .= qq@\n@; -# $str .= qq@\n@; -# $str .= qq@\n\n@; -# -# $str .= "\n\n\n\n\n"; -# -# $str .= qq@\n@; -# $str .= qq@\n@; -# $str .= qq@\n\n
Sector 1Sector 2Sector 3
Sector 4Sector 5Sector 6
\n@; -# -# -# $str .= Hmon::MakeFooter(); -# $str .= ""; -# $str .= ""; -# Hmon::WriteFile("EcalHVCMap", $str); + my $qastate = QA::OK; my $value = sprintf("%i/12",$ChnlsOn); my $longtext = sprintf("HV channels On: %i/12",$ChnlsOn); $qastate = QA::GetQAState('above', $ChnlsOn, @QA::RpcHvLimits); - if ($ChnlsOn == 0){ - $qastate = QA::NOTE;} + if ($ChnlsOn == 0){ $qastate = QA::WARN_2;} + if ($QA::RpcHvOff == 1) { $qastate = QA::NOTE;} $timer++; @@ -377,41 +116,5 @@ $timer++; } - -# for (my $i = 0; $i <= 5;$i++){ -# if($i==1 or $i==2 or $i==4 or $i==5){ -# for (my $j = 0; $j<=167; $j++) { -# my $cnt = ($i*168)+$j; -# HPlot::PlotAdd("EcalCurr$i",$data->{"I$cnt"}->{val}||-1,); -# HPlot::PlotAdd("EcalVolt$i",$data->{"U$cnt"}->{val}||-1,); -# } -# -# for(my $j=254;$j>=0;$j--){ -# my $cnt =-1; -# if($mod_tab[$j]!=0){ -# $cnt=($i*168)+$mod_tab[$j]-1; -# HPlot::PlotAdd("EcalVMap$i",$data->{"U$cnt"}->{val}||-1,$y_tab[$j],$x_tab[$mod_tab[$j]-1]); -# HPlot::PlotAdd("EcalCMap$i",$data->{"I$cnt"}->{val}||-1,$y_tab[$j],$x_tab[$mod_tab[$j]-1]); -# } -# if($mod_tab[$j]==0){ -# HPlot::PlotAdd("EcalVMap$i",$data->{"U$cnt"}->{val}||'NaN',$y_tab[$j],$x_tab[$mod_tab[$j]-1]); -# HPlot::PlotAdd("EcalCMap$i",$data->{"I$cnt"}->{val}||'NaN',$y_tab[$j],$x_tab[$mod_tab[$j]-1]); -# } -# } -# -# -# } -# } -# -# -# #print Dumper $data; -# if($timer%8 == 0) { -# for (my $i = 0; $i <= 5;$i++){ -# HPlot::PlotDraw("EcalCurr$i"); -# HPlot::PlotDraw("EcalVolt$i"); -# HPlot::PlotDraw("EcalVMap$i"); -# HPlot::PlotDraw("EcalCMap$i"); -# } -# } - usleep(250000); + usleep(2500000); } diff --git a/hmon/permanent/hmon_tofhv.pl b/hmon/permanent/hmon_tofhv.pl index 3fa20be..7ff8677 100755 --- a/hmon/permanent/hmon_tofhv.pl +++ b/hmon/permanent/hmon_tofhv.pl @@ -17,109 +17,6 @@ my $flog = QA::OpenQAFile(); my @colors = ("#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd"); -# -# for my $i (0..5) { -# HPlot::PlotInit( { -# name => "EcalCurr$i", -# file => "files/EcalCurr$i", -# entries => 168, -# type => HPlot::TYPE_BARGRAPH, -# output => HPlot::OUT_PNG, -# titles => [sprintf("Sector %i - current",$i+1)], -# xlabel => "Module number", -# ylabel => "uA", -# sizex => 430, -# sizey => 190, -# xmin => 0, -# xmax => 168, -# ymin => 0, -# ymax => 1600, -# curves => 1, -# countup => 1, -# xscale => 1, -# nokey => 0, -# buffer => 1, -# bargap => 0.4, -# curvewidth => 1,}); -# } -# -# for my $i (0..5) { -# HPlot::PlotInit( { -# name => "EcalVolt$i", -# file => "files/EcalVolt$i", -# entries => 168, -# type => HPlot::TYPE_BARGRAPH, -# output => HPlot::OUT_PNG, -# titles => [sprintf("Sector %i - voltage",$i+1)], -# xlabel => "Module number", -# ylabel => "V", -# sizex => 430, -# sizey => 190, -# xmin => 0, -# xmax => 168, -# ymin => 0, -# ymax => 2500, -# curves => 1, -# countup => 1, -# xscale => 1, -# nokey => 0, -# buffer => 1, -# bargap => 0.4, -# curvewidth => 1,}); -# } -# -# -# for my $i (0..5) { -# HPlot::PlotInit( { -# name => "EcalVMap$i", -# file => "files/EcalVMap$i", -# title => "", -# entries => 17, -# curves => 15, -# type => HPlot::TYPE_HEATMAP, -# output => HPlot::OUT_PNG, -# zlabel => "Voltage [V]", -# titles => ["Voltage [V]"], -# sizex => 255, -# sizey => 200, -# nokey => 0, -# buffer => 1, -# xmin => -0.5, -# xmax => 16.5, -# ymin => -0.5, -# ymax => 14.5, -# cbmax => "1.1<*<2500", -# cbmin => "0.1<*<0.9", -# noinit => 0, -# showvalues => 0, }); -# } -# -# for my $i (0..5) { -# HPlot::PlotInit( { -# name => "EcalCMap$i", -# file => "files/EcalCMap$i", -# title => "", -# entries => 17, -# curves => 15, -# type => HPlot::TYPE_HEATMAP, -# output => HPlot::OUT_PNG, -# zlabel => "Current [uA]", -# titles => ["Current [uA]"], -# sizex => 255, -# sizey => 200, -# nokey => 0, -# buffer => 1, -# xmin => -0.5, -# xmax => 16.5, -# ymin => -0.5, -# ymax => 14.5, -# cbmax => "1.1<*<2000", -# cbmin => "0.1<*<0.9", -# noinit => 0, -# showvalues => 0, }); -# } -# - my $timer = 0; my $str = ""; @@ -164,12 +61,6 @@ my $current_sum = 0; my $errortimer = 0; -# my @mod_tab=(0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 23, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 0, 0, 0, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 0, 0, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 0, 0, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 0, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163); -# -# my @x_tab=(10, 9, 8, 7, 6, 10, 9, 8, 7, 6, 11, 10, 9, 8, 7, 6, 5, 11, 10, 9, 8, 7, 6, 5, 12, 11, 10, 9, 8, 7, 6, 5, 4, 12, 11, 10, 9, 8, 7, 6, 5, 4, 12, 11, 10, 9, 8, 7, 6, 5, 4, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); -# -# my @y_tab=(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14); - @@ -191,160 +82,6 @@ while(1) { } } } - - -# $str = Hmon::MakeTitle(11, 18, "ECAL HV - Current", 1, ""); -# $str .= ""; -# -# $str .= "
"; -# -# if ($ChnlsOn == 0) { -# $str .= "

Channels off ("; -# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn < 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn > 652) { -# $str .= "

Channels on ("; -# } else { -# $str .= "

Channels on ("; -# } -# $str .= "$ChnlsOn"; -# $str .= "/652)

"; -# -# $str .= "
\n\n"; -# -# $str .= qq@
\n@; -# $str .= qq@\n@; -# $str .= qq@
\n@; -# $str .= qq@\n@; -# $str .= qq@
\n@; -# $str .= qq@
\n@; -# -# -# $str .= Hmon::MakeFooter(); -# $str .= ""; -# $str .= ""; -# Hmon::WriteFile("EcalHVCurr", $str); -# -# -# -# $str = Hmon::MakeTitle(11, 18, "ECAL HV - Voltage", 1, ""); -# $str .= ""; -# -# $str .= "
"; -# -# if ($ChnlsOn == 0) { -# $str .= "

Channels off ("; -# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn < 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn > 652) { -# $str .= "

Channels on ("; -# } else { -# $str .= "

Channels on ("; -# } -# $str .= "$ChnlsOn"; -# $str .= "/652)

"; -# -# $str .= "
\n\n"; -# -# -# $str .= qq@
\n@; -# $str .= qq@\n@; -# $str .= qq@
\n@; -# $str .= qq@\n@; -# $str .= qq@
\n@; -# $str .= qq@
\n@; -# -# -# $str .= Hmon::MakeFooter(); -# $str .= ""; -# $str .= ""; -# Hmon::WriteFile("EcalHVVolt", $str); -# -# -# -# -# -# $str = Hmon::MakeTitle(10, 13, "ECAL HV - Voltage Map", 1, ""); -# $str .= ""; -# -# $str .= "
"; -# -# if ($ChnlsOn == 0) { -# $str .= "

Channels off ("; -# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn < 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn > 652) { -# $str .= "

Channels on ("; -# } else { -# $str .= "

Channels on ("; -# } -# $str .= "$ChnlsOn"; -# $str .= "/652)

"; -# -# $str .= "
\n\n\n\n\n\n\n"; -# -# -# $str .= qq@\n@; -# $str .= qq@\n@; -# $str .= qq@\n\n@; -# -# $str .= "\n\n\n\n\n"; -# -# $str .= qq@\n@; -# $str .= qq@\n@; -# $str .= qq@\n\n
Sector 1Sector 2Sector 3
Sector 4Sector 5Sector 6
\n@; -# -# -# $str .= Hmon::MakeFooter(); -# $str .= ""; -# $str .= ""; -# Hmon::WriteFile("EcalHVVMap", $str); -# -# -# -# $str = Hmon::MakeTitle(10, 13, "ECAL HV - Current Map", 1, ""); -# $str .= ""; -# -# $str .= "
"; -# -# if ($ChnlsOn == 0) { -# $str .= "

Channels off ("; -# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn < 642) { -# $str .= "

Channels on ("; -# } elsif ($ChnlsOn > 652) { -# $str .= "

Channels on ("; -# } else { -# $str .= "

Channels on ("; -# } -# $str .= "$ChnlsOn"; -# $str .= "/652)

"; -# -# $str .= "
\n\n\n\n\n\n\n"; -# -# -# $str .= qq@\n@; -# $str .= qq@\n@; -# $str .= qq@\n\n@; -# -# $str .= "\n\n\n\n\n"; -# -# $str .= qq@\n@; -# $str .= qq@\n@; -# $str .= qq@\n\n
Sector 1Sector 2Sector 3
Sector 4Sector 5Sector 6
\n@; -# -# -# $str .= Hmon::MakeFooter(); -# $str .= ""; -# $str .= ""; -# Hmon::WriteFile("EcalHVCMap", $str); $timer++; @@ -355,8 +92,9 @@ while(1) { my $longtext = sprintf("HV channels On: %i/768",$ChnlsOn); $qastate = QA::GetQAState('above', $ChnlsOn, @QA::TofHvLimits); -if ($ChnlsOn == 0){ - $qastate = QA::NOTE;} + if ($ChnlsOn == 0){ $qastate = QA::WARN_2;} + if ($QA::TofHvOff == 1) { $qastate = QA::NOTE;} + $str = ""; if($timer%8 == 0) { @@ -407,41 +145,6 @@ if ($ChnlsOn == 0){ } -# for (my $i = 0; $i <= 5;$i++){ -# if($i==1 or $i==2 or $i==4 or $i==5){ -# for (my $j = 0; $j<=167; $j++) { -# my $cnt = ($i*168)+$j; -# HPlot::PlotAdd("EcalCurr$i",$data->{"I$cnt"}->{val}||-1,); -# HPlot::PlotAdd("EcalVolt$i",$data->{"U$cnt"}->{val}||-1,); -# } -# -# for(my $j=254;$j>=0;$j--){ -# my $cnt =-1; -# if($mod_tab[$j]!=0){ -# $cnt=($i*168)+$mod_tab[$j]-1; -# HPlot::PlotAdd("EcalVMap$i",$data->{"U$cnt"}->{val}||-1,$y_tab[$j],$x_tab[$mod_tab[$j]-1]); -# HPlot::PlotAdd("EcalCMap$i",$data->{"I$cnt"}->{val}||-1,$y_tab[$j],$x_tab[$mod_tab[$j]-1]); -# } -# if($mod_tab[$j]==0){ -# HPlot::PlotAdd("EcalVMap$i",$data->{"U$cnt"}->{val}||'NaN',$y_tab[$j],$x_tab[$mod_tab[$j]-1]); -# HPlot::PlotAdd("EcalCMap$i",$data->{"I$cnt"}->{val}||'NaN',$y_tab[$j],$x_tab[$mod_tab[$j]-1]); -# } -# } -# -# -# } -# } -# -# -# #print Dumper $data; -# if($timer%8 == 0) { -# for (my $i = 0; $i <= 5;$i++){ -# HPlot::PlotDraw("EcalCurr$i"); -# HPlot::PlotDraw("EcalVolt$i"); -# HPlot::PlotDraw("EcalVMap$i"); -# HPlot::PlotDraw("EcalCMap$i"); -# } -# } - usleep(250000); + usleep(2500000); }