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) = @_;
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}) {
--- /dev/null
+../../daqtools/tools/hadplot
\ No newline at end of file
$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);
}
}
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;
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) {
$plot2->{xmax} = 1.5;
$plot2->{ymin} = 15.5;
$plot2->{ymax} = -0.5;
+$plot2->{cbmax} = "100<*";
$plot2->{showvalues} = 1;
HPlot::PlotInit($plot2);
}
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 &
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)
#!/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
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
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