From: Cbm Rich Date: Sat, 15 Nov 2014 20:00:44 +0000 (+0100) Subject: Collected updates from CBM RICH beamtime. X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=ba012c3cc2dd29a4c0e943b912184dfc93ebeeeb;p=daqtools.git Collected updates from CBM RICH beamtime. Added Perl library directory. --- diff --git a/dmon/code/Dmon.pm b/dmon/code/Dmon.pm index a01fd83..1dd1dfe 100644 --- a/dmon/code/Dmon.pm +++ b/dmon/code/Dmon.pm @@ -320,7 +320,38 @@ sub PadiwaSendCmd { return trb_register_read($board,0xd412); } +sub PadiwaSendCmdMultiple { + my ($cmd,$board,$chain,$delay) = @_; + my $length = 0; + my $str = ""; + for (my $i = 0; $i < 16; $i++) { + $length++ if defined $cmd->[$i]; + $cmd->[$i] = $cmd->[$i] || 0; + $str .= sprintf("%08x\t",$cmd->[$i]); + } + push(@{$cmd},1<<$chain); + push(@{$cmd},0x1080 + $length); +# print STDERR "$str\n"; + my $errcnt = 0; + while(1){ + trb_register_write_mem($board,0xd400,0,$cmd,scalar @{$cmd}); + if (trb_strerror() =~ "no endpoint has been reached") {return -1;} + if (trb_strerror() ne "No Error") { + usleep($delay||1E5); + if($errcnt >= 12) { + return "SPI still blocked\n"; + } + elsif($errcnt++ >= 10) { + trb_register_read($board,0xd412); + } + } + else { + last; + } + } + return trb_register_read($board,0xd412); + } 1; __END__ diff --git a/dmon/code/Perl2Epics.pm b/dmon/code/Perl2Epics.pm index 35bb72c..98ab27f 100644 --- a/dmon/code/Perl2Epics.pm +++ b/dmon/code/Perl2Epics.pm @@ -4,13 +4,14 @@ use strict; use Data::Dumper; # use Hmon; +#Add all possible paths here... +use lib '/home/hadaq/EPICS/base-3.14.12.3/lib/perl'; use lib '/mnt/home_cbm02/hadaq/EPICS/base-3.14.12.3/lib/perl'; use CA; +# Address list for Epics IOCs. Don't remove unused values +$ENV{EPICS_CA_ADDR_LIST} = "10.160.0.63 192.168.1.100"; $ENV{EPICS_CA_AUTO_ADDR_LIST} = 'YES'; -# JAM added fixed port numbers of EB epics -$ENV{EPICS_CA_ADDR_LIST} = "10.160.0.63 cbmpi2"; -#$ENV{EPICS_CA_ADDR_LIST} = "192.168.100.11 192.168.100.12 192.168.100.13 192.168.100.14 192.168.100.15 localhost"; my $EpicsValues = {}; my $EpicsStore = {}; diff --git a/dmon/code/monitor.pl b/dmon/code/monitor.pl index 11b3293..25c46cf 100755 --- a/dmon/code/monitor.pl +++ b/dmon/code/monitor.pl @@ -173,6 +173,8 @@ function blink() { blinkcnt++; } + +/*Some functions for PMT Heatmap plot for CBM RICH*/ function heatmapRegister() { if (!document.getElementById('heatmap-img')) return; @@ -183,20 +185,61 @@ function blink() { document.body.appendChild(js); } - document.getElementById('heatmap-img').onmousemove = document.getElementById('heatmap-img').onmouseover = function(e) { + heatmapPlaceHint("auto"); + + document.getElementById('heatmap-img').onmousemove = + document.getElementById('heatmap-img').onmouseover = + document.getElementById('heatmap-img').onclick = + function(e) { + if (!e.target || e.target.id != 'heatmap-img') return; + + var imgPos = document.getElementById('heatmap-img').getBoundingClientRect(); var cx = e.clientX; var cy = e.clientY; - if (!cx || !cy) return; - var ix = parseInt((cx - HeatmapDef.x) / HeatmapDef.w); - var iy = 32- parseInt((cy - HeatmapDef.y) / HeatmapDef.h); - if (ix < 0 || ix > 31 || iy < 0 || iy > 31) return; - - document.getElementById('heatmap-caption').innerHTML = HeatmapDef.labels[ix][iy]; + var iy = 31- parseInt((cy - HeatmapDef.y) / HeatmapDef.h); + heatmapPlaceHint( !(ix < 0 || ix > 31 || iy < 0 || iy > 31), ix, iy ); } } + var heatmapPX, heatmapPY, heatmapShow; + function heatmapPlaceHint(mode, ix, iy) { + if (mode=='auto') { + mode = heatmapShow; + ix = heatmapPX; + iy = heatmapPY; + }; + + heatmapShow = mode; + heatmapPX = ix; + heatmapPY = iy; + + var indi = document.getElementById('heatmap-indicator'); + if (!indi) { + indi = document.createElement("div"); + indi.id = 'heatmap-indicator'; + indi.style.border="3px solid #ff0000"; + indi.style.width = HeatmapDef.w + "px"; + indi.style.height = HeatmapDef.h + "px"; + indi.style.position='absolute'; + document.getElementById('heatmap-img').parentNode.appendChild(indi); + } + + if (!mode) { + indi.style.display="none"; + document.getElementById('heatmap-caption').innerHTML = "Hover/Click image for FPGA/Channel info"; + return; + } + + var pmtid = 4 - parseInt(iy / 8) + 4 * (3 - parseInt(ix / 8)); + + indi.style.display="block"; + indi.style.left = parseInt(ix*HeatmapDef.w + HeatmapDef.x - 3) + "px"; + indi.style.top = parseInt((31-iy)*HeatmapDef.h + HeatmapDef.y - 3) + "px"; + document.getElementById('heatmap-caption').innerHTML = "cell (" + ix + ", " + iy + ") " + HeatmapDef.labels[ix][iy] + " PMT " + pmtid; + } +/*END: Some functions for PMT Heatmap plot for CBM RICH*/ $; } $out .= qq$ diff --git a/dmon/files b/dmon/files new file mode 120000 index 0000000..6c94635 --- /dev/null +++ b/dmon/files @@ -0,0 +1 @@ +/dev/shm/dmon \ No newline at end of file diff --git a/dmon/scripts/dmon_beamintensity.pl b/dmon/scripts/dmon_beamintensity.pl index 8cda32b..6d1e507 100755 --- a/dmon/scripts/dmon_beamintensity.pl +++ b/dmon/scripts/dmon_beamintensity.pl @@ -11,31 +11,31 @@ use Dmon; use Data::Dumper; -my %config = do $ARGV[0]; -my $flog = Dmon::OpenQAFile(); -trb_init_ports() or die trb_strerror(); - - -my $value, my $longtext, my $status; +my %config = Dmon::StartUp(); +my $old, my $value; my $lasterrors = 0; while(1) { my $errors = 0; - foreach my $b (@{$config{TdcAddress}}) { - my $r = trb_register_read($b,0xc100); - foreach my $c (%{$r}) { - if ($c & 0x10000) {$errors++;} - } - } - my $title = "Ref Polarity"; - - if ($errors) { $value = $errors." errors"; } - else { $value = "OK";} + my $sig = trb_register_read($config{BeamTRB},$config{BeamChan}); + my $title = "Last Spill"; - my $longtext = "Polarity of the reference time signals on TDCs seems to be: ".$value; - if($errors && $lasterrors) { $status = Dmon::GetQAState('below',$errors,(0,1,4));} - else { $status = Dmon::OK;} - Dmon::WriteQALog($flog,"reftime",20,$status,$title,$value,$longtext); - $lasterrors = $errors; - sleep 10; + my $curr = $sig->{$config{BeamTRB}} & 0xffffff; + + if($curr - $old > $config{SpillThreshold}) { + $value += $curr - $old||0; + } + else { + if ($value > 0) { + my $longtext = "Number of signals in last spill: ".$value; + my $status = Dmon::OK; + Dmon::WriteQALog($config{flog},"beamintensity",60,$status,$title,$value,$longtext); + $value = 0; + } + } + + + + $old = $curr; + sleep 1; } diff --git a/dmon/scripts/dmon_billboard.pl b/dmon/scripts/dmon_billboard.pl index c480cdb..82cdc7f 100755 --- a/dmon/scripts/dmon_billboard.pl +++ b/dmon/scripts/dmon_billboard.pl @@ -3,8 +3,7 @@ use warnings; use POSIX qw(strftime); use FileHandle; -use lib "./code"; -use lib "../tools"; + use HADES::TrbNet; use Time::HiRes qw(usleep gettimeofday tv_interval); use Dmon; diff --git a/dmon/scripts/dmon_cbmnetdata.pl b/dmon/scripts/dmon_cbmnetdata.pl index 5ba5cee..c66e50b 100755 --- a/dmon/scripts/dmon_cbmnetdata.pl +++ b/dmon/scripts/dmon_cbmnetdata.pl @@ -3,8 +3,6 @@ use warnings; use POSIX qw(strftime); use FileHandle; -use lib "./code"; -use lib "../tools"; use HADES::TrbNet; use Time::HiRes qw(usleep); use HPlot; diff --git a/dmon/scripts/dmon_cbmnetlink.pl b/dmon/scripts/dmon_cbmnetlink.pl index 1782fb6..1257db0 100755 --- a/dmon/scripts/dmon_cbmnetlink.pl +++ b/dmon/scripts/dmon_cbmnetlink.pl @@ -3,8 +3,6 @@ use warnings; use POSIX qw(strftime); use FileHandle; -use lib "./code"; -use lib "../tools"; use HADES::TrbNet; use Time::HiRes qw(usleep); use Dmon; diff --git a/dmon/scripts/dmon_cbmnetsync.pl b/dmon/scripts/dmon_cbmnetsync.pl index 1e9ea26..3df6e66 100755 --- a/dmon/scripts/dmon_cbmnetsync.pl +++ b/dmon/scripts/dmon_cbmnetsync.pl @@ -3,8 +3,6 @@ use warnings; use POSIX qw(strftime); use FileHandle; -use lib "./code"; -use lib "../tools"; use HADES::TrbNet; use Time::HiRes qw(usleep); use Dmon; diff --git a/dmon/scripts/dmon_currents.pl b/dmon/scripts/dmon_currents.pl index daa0232..8092154 100755 --- a/dmon/scripts/dmon_currents.pl +++ b/dmon/scripts/dmon_currents.pl @@ -3,8 +3,6 @@ use warnings; use POSIX qw(strftime); use FileHandle; -use lib "./code"; -use lib "../tools"; use HADES::TrbNet; use List::Util qw(min max); use Time::HiRes qw(usleep); @@ -18,7 +16,7 @@ my %config = Dmon::StartUp(); HPlot::PlotInit({ name => "PadiwaCurrents", file => Dmon::DMONDIR."PadiwaCurrents", - curves => 20, + curves => 16, entries => 300, type => HPlot::TYPE_HISTORY, output => HPlot::OUT_PNG, @@ -35,8 +33,8 @@ my $str = Dmon::MakeTitle(10,6,"PadiwaCurrents",0); $str .= Dmon::MakeFooter(); Dmon::WriteFile("PadiwaCurrents",$str); -for(my $i = 1; $i<=20; $i++) { - my $name = sprintf('CBM:PWRSWITCH:GetCurrent%02x',$i); +for(my $i = 0; $i<16; $i++) { + my $name = sprintf('CBM:PWRSWITCH:GetCurrent%02X',$i); Perl2Epics::Connect("C".$i,$name); } @@ -49,17 +47,16 @@ while (1) { my $maximum = 0; my $total = 0; - for(my $i = 1; $i<=20; $i++) { + for(my $i = 0; $i<16; $i++) { my $val = $data->{"C".$i}->{"val"}; $total += $val || 0; $maximum = max($maximum,$val||0); - HPlot::PlotAdd('PadiwaCurrents',$val,$i-1); + HPlot::PlotAdd('PadiwaCurrents',$val,$i); } - HPlot::PlotDraw('PadiwaCurrents'); my $title = "Currents"; - my $value = sprintf("%.3fA / %.3fA", $maximum, $total); + my $value = sprintf("%.2fA / %.2fA", $maximum, $total); my $longtext = "Maximum / Total current: ". $value; my $status = Dmon::OK; Dmon::WriteQALog($config{flog},"currents",30,$status,$title,$value,$longtext,'2-PadiwaCurrents'); diff --git a/dmon/scripts/dmon_datarate.pl b/dmon/scripts/dmon_datarate.pl index 4d73348..a71d180 100755 --- a/dmon/scripts/dmon_datarate.pl +++ b/dmon/scripts/dmon_datarate.pl @@ -3,8 +3,6 @@ use warnings; use POSIX qw(strftime); use FileHandle; -use lib "./code"; -use lib "../tools"; use HADES::TrbNet; use Time::HiRes qw(usleep); use Dmon; diff --git a/dmon/scripts/dmon_heatmaprich.pl b/dmon/scripts/dmon_heatmaprich.pl index 11b45b9..234c55d 100755 --- a/dmon/scripts/dmon_heatmaprich.pl +++ b/dmon/scripts/dmon_heatmaprich.pl @@ -44,12 +44,12 @@ $plot2->{addCmd} = "set lmargin at screen 0.07\nset rmargin at screen 0.80\nset HPlot::PlotInit($plot2); my $str = Dmon::MakeTitle(9,14,"HeatmapRich",0); - $str .= qq@
@; + $str .= qq@
@; $str .= Dmon::MakeFooter(); Dmon::WriteFile("HeatmapRich",$str); sub generateDef { - my $x = 55; my $y = 50; my $w = (566-$x) / 32.0; my $h = (619-$y) / 32.0; + my $x = 56; my $y = 51; my $w = (564-$x) / 32.0; my $h = (619-$y) / 32.0; $str = qq@ var HeatmapDef = { diff --git a/dmon/scripts/dmon_qa.pl b/dmon/scripts/dmon_qa.pl index 0f82f3f..c06ccd8 100755 --- a/dmon/scripts/dmon_qa.pl +++ b/dmon/scripts/dmon_qa.pl @@ -41,6 +41,7 @@ while($a = ) { if($readlines++ > 10000) { $readlines = 0; close(FLOG); + system "cat " . Dmon::DMONDIR . "/qalog >> " . $config{UserDirectory} . "/qalog_persist"; open(FL,">".Dmon::DMONDIR."/qalog"); close(FL); open(FLOG, "tail -F ".Dmon::DMONDIR."/qalog|"); diff --git a/perllibs/Dmon.pm b/perllibs/Dmon.pm new file mode 120000 index 0000000..09823c2 --- /dev/null +++ b/perllibs/Dmon.pm @@ -0,0 +1 @@ +../dmon/code/Dmon.pm \ No newline at end of file diff --git a/perllibs/HPlot.pm b/perllibs/HPlot.pm new file mode 120000 index 0000000..d171b7b --- /dev/null +++ b/perllibs/HPlot.pm @@ -0,0 +1 @@ +../tools/HPlot.pm \ No newline at end of file diff --git a/perllibs/Perl2Epics.pm b/perllibs/Perl2Epics.pm new file mode 120000 index 0000000..34c2d26 --- /dev/null +++ b/perllibs/Perl2Epics.pm @@ -0,0 +1 @@ +../dmon/code/Perl2Epics.pm \ No newline at end of file diff --git a/thresholds/run_thresh_on_system.pl b/thresholds/run_thresh_on_system.pl index 576f7ae..a6ce0a4 100755 --- a/thresholds/run_thresh_on_system.pl +++ b/thresholds/run_thresh_on_system.pl @@ -20,6 +20,7 @@ my $opt_polarity = 0; my $opt_32channel = 0; my $opt_finetune = false; my $opt_verb; +my $tool = "./thresholds_automatic.pl"; GetOptions ('h|help' => \$opt_help, 'e|endpoints=s' => \@opt_endpoints, @@ -28,6 +29,7 @@ GetOptions ('h|help' => \$opt_help, 'p|polarity=i' => \$opt_polarity, '32|32channel' => \$opt_32channel, 'f|finetune' => \$opt_finetune, + 't|tool=s' => \$tool, 'v|verb' => \$opt_verb); @@ -67,7 +69,7 @@ my %pids; foreach my $endpoint (@$endpoints) { foreach my $chain (@$chains) { my $endpoint = sprintf("0x%04x", $endpoint); - $command = "./thresholds_automatic.pl -e $endpoint -o $opt_offset -c $chain -p $opt_polarity $opt_32channel $opt_finetune"; + $command = "$tool -e $endpoint -o $opt_offset -c $chain -p $opt_polarity $opt_32channel $opt_finetune"; print "command: $command\n"; my $pid = fork(); if($pid==0) { #child diff --git a/thresholds/thresholds_automatic.pl b/thresholds/thresholds_automatic.pl index f753491..a0898ee 100755 --- a/thresholds/thresholds_automatic.pl +++ b/thresholds/thresholds_automatic.pl @@ -236,7 +236,7 @@ write_thresholds($mode, $chain, \@best_thresh); my $uid; foreach my $i (reverse (0..3)) { #print "send command: $endpoint , i: $i\n"; - $rh_res = Dmon::PadiwaSendCmd($endpoint, $chain, 0x10000000 | $i * 0x10000); + $rh_res = Dmon::PadiwaSendCmd(0x10000000 | $i * 0x10000, $endpoint, $chain); $uid .= sprintf("%04x", $rh_res->{$endpoint} &0xffff); #print $uid; } @@ -283,7 +283,7 @@ sub read_thresholds { } $command = $fixed_bits | ($current_channel << 16) ; - my $rh_res = Dmon::PadiwaSendCmd($endpoint, $chain, $command); + my $rh_res = Dmon::PadiwaSendCmd($command,$endpoint, $chain); push (@thresh , $rh_res->{$endpoint}); } @@ -325,7 +325,7 @@ sub write_thresholds { } $command = $fixed_bits | ($current_channel << 16) | ($ra_thresh->[$current_channel] << $shift_bits); - Dmon::PadiwaSendCmd($endpoint, $chain, $command); + Dmon::PadiwaSendCmd($command,$endpoint, $chain); } diff --git a/thresholds/write_thresholds.pl b/thresholds/write_thresholds.pl index 734e0a6..7b4e3ab 100755 --- a/thresholds/write_thresholds.pl +++ b/thresholds/write_thresholds.pl @@ -4,7 +4,6 @@ use strict; use warnings; use Data::Dumper; -use lib "/home/hadaq/trbsoft/daqtools/dmon/code"; use Dmon; use Getopt::Long; @@ -96,7 +95,8 @@ sub write_threshold { my $command= $fixed_bits | ($current_channel << 16) | ($thresh << $shift_bits); - Dmon::PadiwaSendCmd($endpoint, $chain, $command); + #Dmon::PadiwaSendCmd($endpoint, $chain, $command); + send_command($endpoint, $chain, $command); } diff --git a/tools/HPlot.pm b/tools/HPlot.pm index f1c73d4..7990a7a 100755 --- a/tools/HPlot.pm +++ b/tools/HPlot.pm @@ -121,6 +121,9 @@ sub PlotInit { setranges($fh,'zrange',$p->{$name}->{zmin},$p->{$name}->{zmax}); setranges($fh,'cbrange',$p->{$name}->{cbmin},$p->{$name}->{cbmax}); + if($p->{$name}->{addCmd} && $p->{$name}->{addCmd} ne "") { + plot_write($fh,$p->{$name}->{addCmd}); + } if($p->{$name}->{type} == TYPE_HISTORY) { if($p->{$name}->{fill}) { @@ -173,7 +176,12 @@ sub PlotInit { } elsif($p->{$name}->{type} == TYPE_HEATMAP) { plot_write($fh,"set view map"); - plot_write($fh,"set palette rgbformulae 22,13,-31"); + if(defined $p->{$name}->{palette}) { + plot_write($fh,"set palette ".$p->{$name}->{palette}); + } + else { + plot_write($fh,"set palette rgbformulae 22,13,-31"); + } if ($p->{$name}->{showvalues} == 0) { plot_write($fh,"splot '-' matrix with image"); } diff --git a/users/cern_cbmrich/dmon_config.pl b/users/cern_cbmrich/dmon_config.pl index 9c80f8b..a19379f 100755 --- a/users/cern_cbmrich/dmon_config.pl +++ b/users/cern_cbmrich/dmon_config.pl @@ -4,12 +4,13 @@ #Scripts to start & order of icons in the Overview activeScripts => [['time','ping','-','-','daqop'], ['numfee','temperature','reftime','billboard','mbs'], + ['beamintensity','-','-','-','-'], ['trgrate','datarate','deadtime','-','-'], ['heatmaprich','padiwatemp','padiwaonline','currents','pscurrents'], - ['cbmnetlink','cbmnetdata','cbmnetsync','-','-'],], + ['cbmnetlink','cbmnetdata','cbmnetsync','-','-']], #Names to be shown in left column of Overview (max 4 letters!) -qaNames => ['sys','main','rate','Pdwa','CNet','-'], +qaNames => ['sys','main','beam','rate','Pdwa','CNet','-'], #Expected number of FPGAs in system NumberOfFpga => 90, @@ -61,10 +62,11 @@ MBSAddress => 0x0112, #Addresses of all TDCs. Either single or broadcast addresses TdcAddress => [0xfe4c,0xfe4e,0x7005], +#IPs of all devices which should react on a ping TrbIP => ["192.168.0.29", "192.168.0.47", "192.168.0.56", - "192.168.0.57", +# "192.168.0.57",#extra TRB3 "192.168.0.59", "192.168.0.72", "192.168.0.73", @@ -80,8 +82,16 @@ TrbIP => ["192.168.0.29", "192.168.0.104", "192.168.0.105"], +#Channel to read spill intensity from. Give limit for off-spill detection +BeamTRB => 0x0110, +BeamChan => 0xc005, +SpillThreshold => 30, +#Name detectors +BeamDetectorsTrb => [0x0111,0x0111,0x0111,0x0110], +BeamDetectorsChan => [0xc001,0xc005,0xc009,0xc005], #User directory UserDirectory => '/home/hadaq/trbsoft/daqtools/users/cern_cbmrich/', -PowerSupScript => 'measure_powers.sh' # relative to UserDirectory +PowerSupScript => 'measure_powers.sh' # relative to user dir + diff --git a/users/cern_cbmrich/evtbuilder_start.sh b/users/cern_cbmrich/evtbuilder_start.sh index fe463b2..77e5045 100755 --- a/users/cern_cbmrich/evtbuilder_start.sh +++ b/users/cern_cbmrich/evtbuilder_start.sh @@ -51,7 +51,7 @@ extraopts="--online" cd $tmpdir - exec uxterm -fg black -bg khaki -geometry 120x20+0+45 -e "/home/hadaq/bin/daq_evtbuild -m 18 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file \ + exec uxterm -fg black -bg khaki -geometry 120x20+0+45 -e "/home/hadaq/bin/daq_evtbuild -m 17 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file \ ${extraopts}; read; bash" & @@ -60,7 +60,7 @@ echo $pid > $tmpdir/.daq_evtbuild.pid sleep 1 - exec uxterm -fg black -bg tan -geometry 120x20+0+345 -e "/home/hadaq/bin/daq_netmem -m 18 -i UDP:0.0.0.0:50000 -i UDP:0.0.0.0:50001 -i UDP:0.0.0.0:50002 -i UDP:0.0.0.0:50003 -i UDP:0.0.0.0:50004 -i UDP:0.0.0.0:50005 -i UDP:0.0.0.0:50006 -i UDP:0.0.0.0:50007 -i UDP:0.0.0.0:50008 -i UDP:0.0.0.0:50009 -i UDP:0.0.0.0:50010 -i UDP:0.0.0.0:50011 -i UDP:0.0.0.0:50012 -i UDP:0.0.0.0:50013 -i UDP:0.0.0.0:50014 -i UDP:0.0.0.0:50015 -i UDP:0.0.0.0:50016 -i UDP:0.0.0.0:50017 -q 32 -d 1 -S test ; " & + exec uxterm -fg black -bg tan -geometry 120x20+0+345 -e "/home/hadaq/bin/daq_netmem -m 17 -i UDP:0.0.0.0:50000 -i UDP:0.0.0.0:50001 -i UDP:0.0.0.0:50002 -i UDP:0.0.0.0:50003 -i UDP:0.0.0.0:50004 -i UDP:0.0.0.0:50005 -i UDP:0.0.0.0:50006 -i UDP:0.0.0.0:50007 -i UDP:0.0.0.0:50008 -i UDP:0.0.0.0:50009 -i UDP:0.0.0.0:50010 -i UDP:0.0.0.0:50011 -i UDP:0.0.0.0:50012 -i UDP:0.0.0.0:50013 -i UDP:0.0.0.0:50014 -i UDP:0.0.0.0:50015 -i UDP:0.0.0.0:50016 -q 32 -d 1 -S test ; " & pid=$! echo $pid > $tmpdir/.daq_netmem.pid diff --git a/users/cern_cbmrich/register_config_tdc.db b/users/cern_cbmrich/register_config_tdc.db index 905b6f6..08bae44 100644 --- a/users/cern_cbmrich/register_config_tdc.db +++ b/users/cern_cbmrich/register_config_tdc.db @@ -87,7 +87,7 @@ 0x0100 0 0xffffffff 0x00000000 0x0101 0 0xffffffff 0x00000000 0x0102 0 0xffffffff 0x00000000 - 0x0103 0 0x00000000 0x00000000 + 0x0103 0 0xffffffff 0x00000000 0x0110 0 0x0000ffff 0x00000000 #gpin 0x0111 0 0xffffffff 0x00000000 #padiwa amps diff --git a/users/cern_cbmrich/startup.sh b/users/cern_cbmrich/startup.sh index 9bcdcdf..50aabda 100755 --- a/users/cern_cbmrich/startup.sh +++ b/users/cern_cbmrich/startup.sh @@ -3,20 +3,20 @@ #PATH=${HOME}/trbsoft/bin:${PATH} #PATH=${HOME}/trbsoft/daqdata/bin:${PATH} #PATH=${HOME}/trbsoft/trbnettools/bin:${PATH} -export TRB3_SERVER=trb056:26000 - -export TRBNETDPID=$(pgrep trbnetd) - -echo "- trbnetd pid: $TRBNETDPID" - -if [[ -z "$TRBNETDPID" ]] -then - ~/bin/trbnetd -i 56 - #~/trbsoft/trbnettools/binlocal/trbnetd -i 56 -fi - +#export TRB3_SERVER=trb056:26000 + +#export TRBNETDPID=$(pgrep trbnetd) + +#echo "- trbnetd pid: $TRBNETDPID" +# +#if [[ -z "$TRBNETDPID" ]] +#then +# ~/bin/trbnetd -i 56 +# #~/trbsoft/trbnettools/binlocal/trbnetd -i 56 +#fi +# #export TRB3_SERVER=trb056 -export DAQOPSERVER=10.160.0.77:56 +#export DAQOPSERVER=10.160.0.78:56 @@ -116,7 +116,7 @@ echo "- setting trigger rate register in TDC"; trbcmd w 0x7005 0xa150 0x0001869f # pulser enable -trbcmd setbit 0x7005 0xa101 0x1 +#trbcmd setbit 0x7005 0xa101 0x1 #trbcmd clearbit 0x8000 0xa101 0x3 # divert TDC inputs to the CTS for trigger @@ -138,6 +138,14 @@ echo "loading MAPMT thresholds: ${thresholdfile}" echo "offset is ${offset} (200=1mv on input)" ../../thresholds/write_thresholds.pl $thresholdfile -o $offset +echo "Loading Padiwa Amps Settings" +/home/hadaq/trbsoft/daqtools/padiwa.pl 0x111 0 invert 0xaaaa +../../thresholds/write_thresholds.pl thresh/thresholds_padiwa_amps.thr -o 0 + + +echo "Disable noisy pixel in Padiwa" +/home/hadaq/trbsoft/daqtools/padiwa.pl 0x073 0 disable 0x0001 + #8103 3 #trbcmd clearbit 0x7005 0xc0 0x7 #trbcmd clearbit 0x7005 0xc1 0x7 diff --git a/users/cern_cbmrich/thresh/thresholds_padiwa_amps.thr b/users/cern_cbmrich/thresh/thresholds_padiwa_amps.thr index 5668c68..de54d55 100644 --- a/users/cern_cbmrich/thresh/thresholds_padiwa_amps.thr +++ b/users/cern_cbmrich/thresh/thresholds_padiwa_amps.thr @@ -1,11 +1,11 @@ -2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 00 threshold: 0x06F6, uid: 0 -2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 01 threshold: 0xDB23, uid: 0 -2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 02 threshold: 0x077D, uid: 0 -2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 03 threshold: 0xDC50, uid: 0 -2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 04 threshold: 0x0672, uid: 0 -2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 05 threshold: 0xDC50, uid: 0 -2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 06 threshold: 0xffff, uid: 0 -2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 07 threshold: 0x0000, uid: 0 +2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 00 threshold: 0x0697, uid: 0 +2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 01 threshold: 0xDA00, uid: 0 +2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 02 threshold: 0x0744, uid: 0 +2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 03 threshold: 0xDB10, uid: 0 +2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 04 threshold: 0x0600, uid: 0 +2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 05 threshold: 0xD880, uid: 0 +2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 06 threshold: 0x0600, uid: 0 +2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 07 threshold: 0xdf80, uid: 0 2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 08 threshold: 0xffff, uid: 0 2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 09 threshold: 0x0000, uid: 0 2014/10/20 00:00:00 endpoint: 0x0111, chain: 00, channel: 10 threshold: 0xffff, uid: 0 diff --git a/users/cern_cbmrich/thresholds_compare.pl b/users/cern_cbmrich/thresholds_compare.pl index 94d5c6c..5efffc4 100755 --- a/users/cern_cbmrich/thresholds_compare.pl +++ b/users/cern_cbmrich/thresholds_compare.pl @@ -21,7 +21,7 @@ $plot2->{zlabel} = "Hitrate"; $plot2->{sizex} = 700; $plot2->{sizey} = 650; $plot2->{nokey} = 1; -$plot2->{buffer} = 1; +$plot2->{buffer} = 0; $plot2->{xmin} = 0.5; $plot2->{xmax} = 32.5; $plot2->{ymin} = 0.5; diff --git a/web/htdocs/index.pl b/web/htdocs/index.pl index af9811c..617e93f 100755 --- a/web/htdocs/index.pl +++ b/web/htdocs/index.pl @@ -106,6 +106,7 @@ The main documentation of the network can be found in these documents and locati
  • Control for power supplies
  • Control for devices running the VXI-11 protocol
  • DMON DAQ Monitoring
  • +
  • DAQi Control