From: hadaq@countinghouse Date: Sun, 13 Jul 2014 14:52:55 +0000 (+0200) Subject: Latest changes during beamtime X-Git-Tag: pre2018~72 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=d0f2a9c3dcb48f443968313658b0fbc1f7d44d26;p=hadesdaq.git Latest changes during beamtime --- diff --git a/hmon/HPlot.pm b/hmon/HPlot.pm index a4c55ff..195916a 100755 --- a/hmon/HPlot.pm +++ b/hmon/HPlot.pm @@ -35,6 +35,18 @@ sub makeTimeString{ return strftime("set label 100 \"%H:%M:%S\" at screen 0.02,0.02 left tc rgb \"#000044\" font \"monospace,8\"\n", localtime()) } +sub setranges { + my ($fh,$name,$min,$max) = @_; + if(defined $min && defined $max) { + plot_write($fh,"set $name [$min:$max]"); + } + elsif(defined $max) { + plot_write($fh,"set $name [:$max]"); + } + elsif(defined $min) { + plot_write($fh,"set $name [$min:]"); + } + } sub PlotInit { my ($c) = @_; @@ -103,25 +115,11 @@ sub PlotInit { plot_write($fh,"set xlabel \"".$p->{$name}->{xlabel}."\"") if $p->{$name}->{xlabel}; plot_write($fh,"set ylabel \"".$p->{$name}->{ylabel}."\"") if $p->{$name}->{ylabel}; - if(defined $p->{$name}->{ymin} && defined $p->{$name}->{ymax}) { - plot_write($fh,"set yrange [".$p->{$name}->{ymin}.":".$p->{$name}->{ymax}."]"); - } - elsif(defined $p->{$name}->{ymax}) { - plot_write($fh,"set yrange [:".$p->{$name}->{ymax}."]"); - } - elsif(defined $p->{$name}->{ymin}) { - plot_write($fh,"set yrange [".$p->{$name}->{ymin}.":]"); - } + setranges($fh,'xrange',$p->{$name}->{xmin},$p->{$name}->{xmax}); + setranges($fh,'yrange',$p->{$name}->{ymin},$p->{$name}->{ymax}); + setranges($fh,'zrange',$p->{$name}->{zmin},$p->{$name}->{zmax}); + setranges($fh,'cbrange',$p->{$name}->{cbmin},$p->{$name}->{cbmax}); - if(defined $p->{$name}->{xmin} && defined $p->{$name}->{xmax}) { - plot_write($fh,"set xrange [".$p->{$name}->{xmin}.":".$p->{$name}->{xmax}."]"); - } - elsif(defined $p->{$name}->{xmax}) { - plot_write($fh,"set xrange [:".$p->{$name}->{xmax}."]"); - } - elsif(defined $p->{$name}->{xmin}) { - plot_write($fh,"set xrange [".$p->{$name}->{xmin}.":]"); - } if($p->{$name}->{type} == TYPE_HISTORY) { if($p->{$name}->{fill}) { diff --git a/hmon/hmon_hadplot_daqtools.sh b/hmon/hmon_hadplot_daqtools.sh new file mode 120000 index 0000000..9faf824 --- /dev/null +++ b/hmon/hmon_hadplot_daqtools.sh @@ -0,0 +1 @@ +../../daqtools/tools/hadplot \ No newline at end of file diff --git a/hmon/hmon_hadplotnew.sh b/hmon/hmon_hadplotnew.sh index f5f571a..19b3600 100755 --- a/hmon/hmon_hadplotnew.sh +++ b/hmon/hmon_hadplotnew.sh @@ -125,9 +125,19 @@ for(my $i=0;$i<16;$i++) { $curveoption->[$i] = "" unless defined $curveoption->[$i]; } +for(my $k = 0; $k < scalar @$address; $k++) { + if($address->[$k] =~ /^0x/) { + $address->[$k] = hex($address->[$k]); + } + if($register->[$k] =~ /^0x/) { + $register->[$k] = hex($register->[$k]); + } + } + + for(my $i=0;$i < scalar @{$address};$i++) { if(!defined($title->[$i])) { - $title->[$i] = hex($address->[$i])." $register->[$i] $regoffset->[$i]..".($regoffset->[$i]+$regwidth->[$i]-1); + $title->[$i] = $address->[$i]." $register->[$i] $regoffset->[$i]..".($regoffset->[$i]+$regwidth->[$i]-1); } } @@ -139,10 +149,7 @@ if($style == 3) {$curvestyle="histo"; $xticks=1;} if($style == 4) {$curvestyle="histostacked"; $xticks=0;} if($style == 5) {$curvestyle="histostacked"; $xticks=1;} -for(my $k = 0; $k < scalar @$address; $k++) { - $address->[$k] = hex($address->[$k]); - $register->[$k] = hex($register->[$k]); - } + #Open Gnuplot our $fh; @@ -746,7 +753,7 @@ sub genreg { else { # $c = "trbcmd rm $address->[$i] $register->[$i] $regamount->[$i] 0"; $c = trb_register_read_mem(($address->[$i]),($register->[$i]),0,$regamount->[$i]); - print Dumper $c; +# print Dumper $c; } # my @out = qx($c); foreach my $s (sort keys $c) { diff --git a/hmon/hmon_hodo.pl b/hmon/hmon_hodo.pl index 6918f6f..a1cc580 100755 --- a/hmon/hmon_hodo.pl +++ b/hmon/hmon_hodo.pl @@ -28,6 +28,7 @@ $plot2->{xmin} = -0.5; $plot2->{xmax} = 1.5; $plot2->{ymin} = 15.5; $plot2->{ymax} = -0.5; +$plot2->{cbmax} = "100<*"; $plot2->{showvalues} = 1; HPlot::PlotInit($plot2); diff --git a/hmon/hmon_logRpc.sh b/hmon/hmon_logRpc.pl similarity index 100% rename from hmon/hmon_logRpc.sh rename to hmon/hmon_logRpc.pl diff --git a/hmon/hmon_muxhist.pl b/hmon/hmon_muxhist.pl index 13631bb..71e264f 100755 --- a/hmon/hmon_muxhist.pl +++ b/hmon/hmon_muxhist.pl @@ -66,7 +66,7 @@ if($plots) { } else { - qx(./hmon_hadplot.sh -d 3000 \\ + qx(./hmon_hadplot_daqtools.sh -d 3000 \\ -a 0x0003 -r 41216 -m 500 -p 0 -w 32 -t "A" \\ -a 0x0003 -r 41716 -m 500 -p 0 -w 32 -t "B" \\ -output "PNG.files/muxhist.760.530" -curvestyle steps -key genreg 2>/dev/null & diff --git a/hub/startup.script b/hub/startup.script index 3f4bc13..e3383db 100644 --- a/hub/startup.script +++ b/hub/startup.script @@ -41,10 +41,10 @@ wait trbcmd w 0x8001 0xc5 0x5000 # Set the maximum subevents in the queue for TRB3s - trbcmd w 0x8900 0x830e 0x10 - trbcmd w 0x8910 0x830e 0x10 - trbcmd w 0x8880 0x830e 0x10 - trbcmd w 0x8890 0x830e 0x10 + trbcmd w 0x8900 0x830e 0x4 + trbcmd w 0x8910 0x830e 0x4 + trbcmd w 0x8880 0x830e 0x4 + trbcmd w 0x8890 0x830e 0x4 #Load hub level setting for time-out for each hub in the system trbcmd loadbit 0xfe11 0xc5 0xffff0000 0x80300000 #with new hub (with auto-switch-off) diff --git a/main/restartEB.sh b/main/restartEB.sh index 1c56946..684f45a 100755 --- a/main/restartEB.sh +++ b/main/restartEB.sh @@ -1,5 +1,5 @@ #!/bin/bash cd /home/hadaq/trbsoft/daq/evtbuild/ ./start_eb_gbe.pl -e stop -n 1-16 -#sleep 10 +sleep 10 ./start_eb_gbe.sh diff --git a/start/ThreshNinoStart.db b/start/ThreshNinoStart.db index 31b24e4..bf7ea1f 100644 --- a/start/ThreshNinoStart.db +++ b/start/ThreshNinoStart.db @@ -40,7 +40,7 @@ 5001 1 2 0 1 3 0x7000 # 5001 1 2 0 2 3 0x7000 # --- Str. 9-20ns, 7-30ns, 5-80ns 5001 1 2 0 3 3 0x7000 # - 5001 1 2 0 4 3 0x7000 # --- Hyst. min d + 5001 1 2 0 4 3 0xd000 # --- Hyst. min d 5001 1 2 0 5 3 0x7000 5001 1 2 0 6 3 0x7000 5001 1 2 0 7 3 0x7000 diff --git a/start/startup.script b/start/startup.script index 5e3d1eb..f0388ad 100644 --- a/start/startup.script +++ b/start/startup.script @@ -89,6 +89,10 @@ trbcmd w 0x5011 0xcf80 0xffff trbcmd w 0x5012 0xcf80 0xffff trbcmd w 0x5013 0xcf80 0xffff +trbcmd w 0x8880 0xcf80 0xfffff +trbcmd w 0x8880 0xcf82 100000 #1ms binning by default +trbcmd loadbit 0x8880 0xcf8f 0x1f0000 0x100000 #select output 0 for monitoring + #trbcmd clearbit 0x8880 0xc0 0x2 #trbcmd clearbit 0x8880 0xc1 0x2