From: hadaq Date: Thu, 1 Dec 2022 13:19:32 +0000 (+0100) Subject: status 1dec22 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=a341794ba7cdc9138384d589fffa36badd304586;p=daqtools.git status 1dec22 --- diff --git a/users/cua_crt/addresses_trb3.db b/users/cua_crt/addresses_trb3.db new file mode 100644 index 0000000..23c61a6 --- /dev/null +++ b/users/cua_crt/addresses_trb3.db @@ -0,0 +1,34 @@ +# addresses.db +# maps trbnet-addresses to serial number + FPGA numbers + +# Address # S/N # FPGA +# 0x1234 14 0 + +# CTS 2022 +0x8100 104 0 +0x8101 104 1 +0x8102 104 2 +0x8103 104 3 +0xc000 104 5 + +# TRB 00 2022 +0x2000 72 0 +0x2001 72 1 +0x2002 72 2 +0x2003 72 3 +0x8000 72 5 + +# TRB 01 2022 +0x2004 73 0 +0x2005 73 1 +0x2006 73 2 +0x2007 73 3 +0x8001 73 5 + +# TRB 02 2022 +0x2008 99 0 +0x2009 99 1 +0x200a 99 2 +0x200b 99 3 +0x8002 99 5 + diff --git a/users/cua_crt/check_ping.pl b/users/cua_crt/check_ping.pl new file mode 100755 index 0000000..e3d850f --- /dev/null +++ b/users/cua_crt/check_ping.pl @@ -0,0 +1,152 @@ +#!/usr/bin/perl + +use warnings; +use strict; +use Parallel::ForkManager; +use Net::Ping; +use Getopt::Long; +use Data::Dumper; + +my $power; +my $reboot; +my $help; + +my $result = GetOptions ( + "h|help" => \$help, + "p|powercycle" => \$power, + "r|reboot" => \$reboot + ); + + +# not used.... :-) +#my @trbs = (56,57); + +my $map = { + 2 => { trb => 99, sys => "MCP 02" }, + 1 => { trb => 73, sys => "MCP 01" }, + 0 => { trb => 72, sys => "MCP 00" }, +# 0 => { trb => 104, sys => "" }, +# 0 => { trb => 57, sys => "AUX" }, +# 5 => { trb => xx, sys => "" }, +# 6 => { trb => 59, sys => "TOF 2" }, +# 7 => { trb => 83, sys => "HODO" }, + -1 => { trb => 104, sys => "CTS" }, + }; +# Number of TRBs x 5 +my $MAX_PROCESSES=20; +my $pm = Parallel::ForkManager->new($MAX_PROCESSES); +my $maximal_reboot_counter = 4; +my $number_of_reboots_done = 0; + +my $rh_unsuccessful = {}; + +$pm->run_on_finish( + sub { my ($pid, $exit_code, $ident, $exit_signal, $core_dump, $data_structure_reference) = @_; + #print "** $ident just got out of the pool ". + # "with PID $pid and exit code: $exit_code\n"; + #print Dumper ($pid, $exit_code, $ident, $exit_signal, $core_dump, $data_structure_reference); + if ($exit_code == 0) { + $rh_unsuccessful->{$ident} = $$data_structure_reference; + } + } + ); + + + + +#my $p = Net::Ping->new(); + +my $first_iteration = 1; + +#print Dumper keys %$rh_unsuccessful; + +while ( (($first_iteration == 1) || keys %$rh_unsuccessful) && + ($number_of_reboots_done < $maximal_reboot_counter) ) { + #print Dumper $rh_unsuccessful; + #print Dumper keys %$rh_unsuccessful; + + $rh_unsuccessful = {}; + $first_iteration = 0; + foreach my $ct (keys %$map) { + my $success = 0; + #my $num = sprintf "%3.3d", $ct; + my $trbnum= $map->{$ct}->{trb}; + my $num = sprintf "%3.3d", $trbnum; + my $host= "trb" . $num; + my $system = $map->{$ct}->{sys}; + #print "192.168.0.$ct $host.gsi.de $host\n"; + #my $r = $p->ping($host,1); + my $c= "ping -W1 -c2 $host"; + + my $sysnum = sprintf "0x80%.2x", $ct; + $sysnum = "0xc000" if $ct == -1; + + my $pid = $pm->start("$sysnum") and next; + + #my $p = Net::Ping->new("udp", 1); + #my $r = $p->ping("192.168.0.56"); + #$p->close(); + #print "result: $r\n"; + + my $r = qx($c); + #printf "$sysnum, system: %-8s, trb: $host ", $system; + printf "$sysnum $host %-8s ", $system; + if (grep /64 bytes/, $r) { + print "is alive.\n"; + $success = $trbnum; + } else { + print "is not alive.\n"; + } + + my $str = "jhhj"; + $pm->finish($success, \$host); # Terminates the child process + } + + $pm->wait_all_children; + + #$rh_unsuccessful = { "0x8007"=>"hh", "0x8001"=>"jjhj"} ; + + if ($reboot && ($number_of_reboots_done < $maximal_reboot_counter) && keys %$rh_unsuccessful) { + #print Dumper $rh_unsuccessful; + print "have to reboot FPGAs, first make a reset and reassign the addresses.\n"; + my $cmd = "trbcmd reset; ~/trbsoft/daqtools/merge_serial_address.pl ~/trbsoft/daqtools/base/serials_trb3.db ~/trbsoft/daqtools/users/gsi_dirc/addresses_trb3.db"; + qx($cmd); + sleep 3; + # test trbnet: + my $error_str = "ERROR: read_uid failed: Termination Status Error"; + $cmd = "trbcmd i 0xffff 2>&1"; + my $r = qx($cmd); + if ($r=~/$error_str/) { + print "could not access trbnet, so have to reboot all FPGAs.\n"; + $rh_unsuccessful = { "0xffff"=>"all"} ; + } + + if ($rh_unsuccessful->{"0xc000"} || (scalar keys %$rh_unsuccessful) > 5) { + print "many TRBs (or 0xc000) are not alive, so let us make a reload of all FPGAs.\n"; + $rh_unsuccessful = { "0xffff"=>"all"} ; + } + + foreach my $cur (keys %$rh_unsuccessful) { + my $host = $rh_unsuccessful->{$cur}; + #my $cmd = "trbcmd reload " . $cur; + $cmd = "trbcmd reload $cur"; + print "rebooting: $cur\n"; + #print "$cmd\n"; + qx($cmd); + #print "number of reboots done: $number_of_reboots_done\n"; + } + print "wait 9 seconds\n"; + sleep 9; + $number_of_reboots_done++; + } + + + +} + +exit 1 if(scalar keys %$rh_unsuccessful > 0); + +#$p->close(); + + + diff --git a/users/cua_crt/readme2022.txt b/users/cua_crt/readme2022.txt new file mode 100644 index 0000000..7906d32 --- /dev/null +++ b/users/cua_crt/readme2022.txt @@ -0,0 +1,507 @@ + +************************************************************** +system update with + +sudo zypper refresh +sudo zypper dup -yl + + +software to recompile +root (not always...) +mainz unpacker ( seems to go automatic) +trb? make + +For python scripts +VISA needed to be installed new as root: + +pip install -U pyvisa +and same (only?) as hadaq... + + +Immer, wenn es einen neuen perl-interpreter gibt (~2 mal im Jahr), dann muss +die libtrbnet_perl neu übersetzt werden. +Das geht so: +$ cd ~/trbsoft/trbnettools/libtrbnet_perl +$ perl Makefile.PL $ make +$ sudo make install + + +~/trbsoft/daqtools/thresholds/trb_dirich_threshold +HADESthreshscan_v1 + +in makefile -std=c++17 + +recompile + + + + +************************************************************** + +address masks + + +0xfe48 peripheral +0xfe4a GPIO +0xfe4c PADIWA +0xfe51 DIRICH + +******************************************************** +scratch DiRICH +in gsi_dirc + +dirich mask is 0xfe51 + +addresses_dirich.db contains + +0x2014 0905 1 the fpga number seperated by blank from dirich number + +serial_dirich.db contains + +09051 address the fpga number direct after the dirich number + + +plugs for trigger/clock +trigger outside +clock inside + +dirich_set_standard_thresholds.pl 0x2014 0x6000 + +set absolute threshold to all channels + +dirich_voltages.sh + +read out voltages and currents + + + +in thresholds/trb_dirich_threshold + +search thresholds of all DiRICHes and set it to 20mV + +./HADESthreshscan_v1 -b 0 -t 0 20 + +read baseline and put it to 20mV +./HADESthreshscan_v1 -f 20190225_153504_std_save.thr -l 0 -t 0 20 + +the program assumes a range of 2500 mV for the discriminator. It allows no +negative values as offset to the baseline. But a overflow becomes a negativ +value. An offset of 2500 is the baseline + +Therefore, for a negative threshold use + +2500-10xthreshold + +10 seems to be the amplfication of the amplifying transistor + +. + + + + +~/trbsoft/daqtools/tools/determine_noiseband_dirich.pl 0x2015 + + +searching old routine. Works only for channel 0-15 + + ./thresholds_automatic.pl --mode=dirich2 --endpoint=0x2014 --chain=0 --offset=0x10 --channel_by_channel --polarity=0 + +******************************************************** + + + + + + + + +# new readme file for 2016 beam test at CERN +# based on copy of readme2015.txt + +# let's try to clean up this file and remove obsolete entries + +system name: dircdaq003 + +on dircdaq003 +vncserver :1 -geometry 1440x960 +or +x0vncserver -display :0 -Geometry 1440x960 + +on dircdaq003 ** remember the "-Shared" - otherwise you kill every other viewer! ** +vncviewer-tigervnc -Shared :1 + +on other machines in the local network +vncviewer -Shared dircdaq003:1 + +password same as hadaq account password + +# the main tools are represented by icons on the desktop + +clicky_buntie -> starts a console with the DAQ tools + (or run ~/trbsoft/daqtools/users/gsi_dirc/gui/call_programs2.pl) + +startup environment -> starts a urxvt terminal, the main console, with all proper tabs + in all proper subdirectories and starts the web server for CTS control, etc. + (or run ~/bin/setup.sh) + +# in the main console + +tab DAQ + readout: + #?? start TRB with net switch + ./startup.sh + +tab web: + (command + ./cts_gui --noopenxterm + is already executed by tab startup) + this starts the web server, access it in the browser with + + localhost:1234 + + kill webserver wit ^c ^c or with + pkill dhttpi + + open link CTS control in a browser new tab + open link padiwa in a browser new tab + open link thresholds in a browser new tab + open link tdc in a browser new tab + in the tdc browser tab + select input status/enable/differences + enable the chain you are watching + +tab DAQ editor: + emacs window with the startup.sh script opened + +tab thresholds: + +turn on the detector(s), no pulser or signals, only noise is needed. + +if the detector is connetcted to chain 1 run + + +Powering PADIWA +scripts in /home/hadaq/lv (edit it when setup changes) + +./padiwa_on.sh + +./padiw_of.sh + +monitoring by web browser: +http://192.168.0.71 + + + + +Padiwa invert +~/trbsoft/daqtools/padiwa.pl [TDC addr] [chain 0 or 1] invert + +~/trbsoft/daqtools/padiwa.pl 310 1 invert 0xffff (after every power cycle) + +./thresholds_automatic.pl --endpoint=0x310 --chain=1 --offset=0x0c8 --polarity=0 + +should be 1 mV (0x0c8 or 200) + + +in the browser threshold tab you can change individual thresholds when you have selected the +right board (e.g. 310) + + +Michael Traxlers new routine (fast, simulataneous but less stable) + +./run_thresh_on_system.pl -endpoints=0x2000..0x202b --chains=0..2 --offset=00 --polarity=0 + + +./write_thresholds.pl padiwa_threshold_results_blockwise_2016_10_22c.log --offset=500 + + +The usual threshold finder (take ~20min): + +Set all thresholds to very high + +./write_thresholds.pl padiwa_threshold_results_blockwise_2016_10_22c.log --offset=5000 + +in "hv" tab: +./hv_cern2016_50V.sh on + +back to "thresholds" +./thresholds_blockwise.sh + +Whichever style you choose, remember to delete the padiwa_threshold_results.log before the scan +and to rename it after the scan + +The load it with the write_thresholds.pl command and change the startup.pl if you are happy +with the new threshold. + +Also, remember to set the HVs to the correct value when you're done. + + +tab hv: + +./hv_MCPTOF2.sh -> hv for ToFs + +### can we delete the following lines, old stuff? + +in console dab tab + +( + cd ~/trbsoft/analysis/trb3 + . ./trb3login --> 26.6.2014 is already sourced in .zshrc +) + +cd ~/trbsoft/daqtools/users/gsi_dirc/ + +~/trbsoft/analysis/trb3/dabc/bin/dabc_run EventBuilder.xml + +in console tab go4 + +cd ~/trbsoft/analysis/trb3 + . ./trb3login +cd ~/trbsoft/daqtools/users/gsi_dirc + +Login the first time: +. ~/trbsoft/analysis/trb3/go4/go4login + +go4 online.hotstart -> to see ToF1 and Tof2 +go4 mcponline.hotstart -> to see the Prototype and ToFs + +~/trbsoft/analysis/trb3/go4/bin/go4 padiwa_amps.hotstart + +select +event source = MBS stream server +name = localhost +rightclick left pane histograms and select +monitor items + +------------------------------------------- +### end delete? + + +tab hv: + +in hv console tab run /bin/bash (otherwise script does not work) + +cd ./hv + +./hv prints following help text + +./hv init turns on main switch +./hv on turns on HV (values defined in hv.sh) +./hv off turns off HV +./hv kill turns of rapidly HV, turns off main switch. +--------------------------------------------- + + +PADIWA + +./write_thresholds.pl gsi_zero_connect.log --offset=500 + +tail -n16 padiwa_threshold_results.log > tmp.thresholds; ./write_thresholds.pl tmp.thresholds + +./write_thresholds.pl tmp.thresholds + + +STARTUP + +trbcmd reload 0xffff; sleep 5; trbcmd reset; ./startup.sh; i | wc + +DABC + +~/trbsoft/analysis/trb3/dabc/bin/dabc_run EventBuilder.xml + +GO4 + +rm -f *.root; go4analysis -user /data.local2/dabc14121175523.hld + go4 Go4AutoSave.root + + +TRB programming + +trbflash program 0x0810 ~/trbsoft/bitfiles/trb3_periph_padiwa_dbl_alt_32ch_20140625.bit + +hv supply +(was 140.181.75.99 on GSI network - is 192.268.0.22 on local network) +(to change network address push "FOLD" button for 3 seconds, adjust IP address) +MAC Address is 00:19:f9:10:03:8a +Access admin power42 (resets when LAN settings are changed) + + +-------------------------------------- +adding or removing TRB to/from setup + +edit files in ~/trbsoft/daqtools/users/gsi_dirc + + * addresses_trb3.db + * register_configgbe.db + * register_configgbe_ip.db + * register_config_tdc.db + * check_ping.pl + * trbreset_loop.pl + * EventBuilderNew.xml + +check if address in ~/trbsoft/daqtools/base/serials_trb3.db + +for data to file edit start_readout and add sources +(50000+i corresponds to c350+i in register_configgbe_ip.db) + + +flash by + +trbflash info 0x8001 # get information +compiletime.pl 0x8001 # get compile tme + +central FPGA: trb3_central_gbe_20150218.bit + +trbflash program 0x8001 filename # program into flash memory +trbcmd relaod 0x8001 # reloads program from flash + +store files in trbsoft/bitfiles + +peripheral FPGA + +in principle alos by eg +trbflash program 0x0013 filename + +but faster +trbflash program 0xfe4c filename + +for 0xfeXX see trb3 manual network/broadcast addresses (p14) + +peripheral FPGA: trbsoft/bitfiles/trb3_periph_padiwa_20150203.bit + + +iftop -PBN -i enp2s0f0 + + +--------------------------------------- +threshold search: + +only one channel per detector (20 min, recommended): + +HV-> 50 V +rm padiwa_threshold_results.log +.thresholds_blockwise.sh + +all channels together (<1min, yields large thresholds compared to blockwise +search (1mV?)): + +HV-> 50 V +rm padiwa_threshold_results.log +./run_thresh_on_system.pl -endpoints=0x2000..0x200f --chains=0..2 --offset=10 --polarity=0 + + +only one channel per prototype (4 hours, recommended if you need an excuse for +extended pizza event) +HV-> 50 V +rm padiwa_threshold_results.log +./thresh_channel_by_channel.sh + + +look to thresholds + +root show_thresholds.C'("/home/hadaq/trbsoft/daqtools/thresholds/padiwa_threshold_results_20150512_high_CS.log", "/home/hadaq/trbsoft/daqtools/thresholds/padiwa_threshold_results_20150512_low_CS.log",400)' + + + + +--------------------------------------- + +example for time resolution + + root ce15133191236K.root +K->Draw("fLeadingEdge[200]-fLeadingEdge[230]>>bb(2001,-100,100)","(fLeadingEdge[200]>-9000)&&(fLeadingEdge[230]>-9000)","") + +--------------------------------------- + + +look in history for flash actions + +fc -il 1 | grep "trbflash program" + + + + +------------------- +adding a system to the CERN DAQ local network + +edit /etc/dhcpd.conf (add system name and MAC address) +edit /etc/hosts + +rcdnsmasq restart; rcdhcpd restart + +use + journalctl -b -f -u dhcpd +to see if connection is successful + +---- +DAQ multi event queue: edit /home/hadaq/trbsoft/daqtools/users/gsi_dirc/register_configgbe.db + +Change entry in column MultiQueue (C6) to 1 (0 to disable) + +To use dabc instead of evtbuild: +./start_readout.pl --filename cern2016 --dabc + +---- +resetting PADIWA temperature readouts (important because temperature correction is enabled) +~/trbsoft/daqtools/padiwa.pl [fpga] [chain] resettemp +~/trbsoft/daqtools/padiwa.pl 0x2028 2 resettemp + +--- +copying files to dircdaq004 (now done via crontab) +rsync -av ce*hld hadaq@dircdaqp004:/d/oct2016 --progress +rsync -av ce*root hadaq@dircdaqp004:/d/oct2016 --progress +rsync -av pq*hld hadaq@dircdaqp004:/d/oct2016 --progress +rsync -av pq*root hadaq@dircdaqp004:/d/oct2016 --progress + +--- 2016: handled by trbreset_loop.pl +TRB error/"Ping" tab in slow control "red" +check progress of evtbuild, if stuck end run +trbcmd reset +trbcmd reload 0xffff +trbcmd reset +check_ping.pl +if all TRBs are present (alive) then +startup.sh +and start new run +if one or more TRBs still missing repeat reset/reload/reset cycle + +--- +trigger line should be + AddOn Multiplexer 0 +for beam data or + AddOn Multiplexer 1 +for laser data + +--- +Watch for "Ignore all data" box being checked - if it is checked no data + will be written to disk (you will see that the spill rates are "red" + instead of "green" + + +--- +If TRBs do not react to trbcmd reset (messages like RPC Timed Out) power-cycle the TRBs via + trb_power_cycle + +ssh -R 53212:dircdaqp003:22 -R 53213:dircdaqp003:5901 -R 53214:dircdaqp003:5902 -R 53215:dircdaqp003:5903 -R +53216:dircdaqp003:5904 -R 51234:dircdaqp003:1234 hadaq@cerberus.x-matter.uni-frankfurt.de -N & #All the +tunnels + + +--- + + trbcmd reset; ~/trbsoft/daqtools/merge_serial_address.pl ~/trbsoft/daqtools/base/serials_trb3.db ~/trbsoft/daqtools/users/gsi_dirc/addresses_trb3.db; trbcmd reload 0x8007 + + +----- +data analysis March 2016 + +hldtools -d -j10 file.hld +tcalibration file.hld.root +cdisplay fileC.root + + +Printers nearby: +252-1203-HP5550 //upstairs in 252, color +252-1203-CANON //upstairs in 252, b&w + +#connect to IP windows PC +rdesktop -u localadmin_gerhardt -g 1024x768 -k en/us 192.168.0.20 diff --git a/users/cua_crt/register_config_tdc.db b/users/cua_crt/register_config_tdc.db new file mode 100644 index 0000000..1f2f978 --- /dev/null +++ b/users/cua_crt/register_config_tdc.db @@ -0,0 +1,29 @@ +!Register table +# Type # lower 32 channels # upper 32 channels # +###################################################################### + 0 0xc802 0xc803 + + +# (MCP# * 100 ) + 10 + 0...3 + +!Value table +# Hub # Type # lower 32 channels # upper 32 channels # + +# TRB0 + 0x2000 0 0x00000000 0x00000000 + 0x2001 0 0x00000000 0x00000000 + 0x2002 0 0x00000000 0x00000000 + 0x2003 0 0x00000000 0x00000000 +# TRB 1 + 0x2004 0 0x00000000 0x00000000 + 0x2005 0 0x00000000 0x00000000 + 0x2006 0 0x00000000 0x00000000 + 0x2007 0 0x00000000 0x00000000 +#trb 2 + 0x2008 0 0x00000000 0x00000000 + 0x2009 0 0x00000000 0x00000000 + 0x200a 0 0x00000000 0x00000000 + 0x200b 0 0x00000000 0x00000000 + + + diff --git a/users/cua_crt/register_configgbe.db b/users/cua_crt/register_configgbe.db new file mode 100755 index 0000000..8b902d0 --- /dev/null +++ b/users/cua_crt/register_configgbe.db @@ -0,0 +1,40 @@ + + + +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # C9 # +###################################################################################################### + 0 0x8300 0x8301 0x8302 0x8303 0x8304 0x8305 0x8307 0x8309 0x830a 0x830b + + +!Value table +# SubEvtId SubEvtDec QueDec PackSize FrameSize UseGbE MultiQueue Enable RX Add.Slw.Head TType_inserted +# Hub # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # C9 # +################################################################################################################################################### + 0xc000 0 0x7999 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x1 + 0x8000 0 0x8000 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 + 0x8001 0 0x8001 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 + 0x8002 0 0x8002 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 +# 0x8003 0 0x8003 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 +# 0x8004 0 0x8004 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 +# 0x8005 0 0x8005 0x00020001 0x00030064 0x1DE8 0x578 0 1 1 1 0x0 +# 0x8006 0 0x8006 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 +# 0x8007 0 0x8007 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 +# 0x8008 0 0x8008 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 +# 0x8009 0 0x8009 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 +# 0x800a 0 0x800a 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 +# 0x800b 0 0x800b 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0 +# 0x8012 0 0x8012 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 +# 0x8013 0 0x8013 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 +# 0x8014 0 0x8014 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 +# 0x8015 0 0x8015 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 +# 0x8016 0 0x8016 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 +# 0x8017 0 0x8017 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 +# 0x8018 0 0x8018 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 +# 0x8019 0 0x8019 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 +# 0x8020 0 0x8020 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 +# 0x8021 0 0x8021 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 +#0x8022 0 0x8022 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 +#0x8023 0 0x8023 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 +#0x8024 0 0x8024 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 +#0x8025 0 0x8025 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0 diff --git a/users/cua_crt/register_configgbe_ip.db b/users/cua_crt/register_configgbe_ip.db new file mode 100755 index 0000000..d3c1af2 --- /dev/null +++ b/users/cua_crt/register_configgbe_ip.db @@ -0,0 +1,75 @@ +########################################################################################### +#Eventbuilders: +# EB 0: dircdaq002 eth0 ports 50000 - 50099 + +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # +########################################################################################### +#new memory locations + 0 0x8100 0x8101 0x8102 0x8103 0x8104 0x8105 0x8106 0x8107 0x8108 + 1 0x8110 0x8111 0x8112 0x8113 0x8114 0x8115 0x8116 0x8117 0x8118 + 2 0x8120 0x8121 0x8122 0x8123 0x8124 0x8125 0x8126 0x8127 0x8128 + 3 0x8130 0x8131 0x8132 0x8133 0x8134 0x8135 0x8136 0x8137 0x8138 + 4 0x8140 0x8141 0x8142 0x8143 0x8144 0x8145 0x8146 0x8147 0x8148 + 5 0x8150 0x8151 0x8152 0x8153 0x8154 0x8155 0x8156 0x8157 0x8158 + 6 0x8160 0x8161 0x8162 0x8163 0x8164 0x8165 0x8166 0x8167 0x8168 + 7 0x8170 0x8171 0x8172 0x8173 0x8174 0x8175 0x8176 0x8177 0x8178 + 8 0x8180 0x8181 0x8182 0x8183 0x8184 0x8185 0x8186 0x8187 0x8188 + 9 0x8190 0x8191 0x8192 0x8193 0x8194 0x8195 0x8196 0x8197 0x8198 + 10 0x81A0 0x81A1 0x81A2 0x81A3 0x81A4 0x81A5 0x81A6 0x81A7 0x81A8 + 11 0x81B0 0x81B1 0x81B2 0x81B3 0x81B4 0x81B5 0x81B6 0x81B7 0x81B8 + 12 0x81C0 0x81C1 0x81C2 0x81C3 0x81C4 0x81C5 0x81C6 0x81C7 0x81C8 + 13 0x81D0 0x81D1 0x81D2 0x81D3 0x81D4 0x81D5 0x81D6 0x81D7 0x81D8 + 14 0x81E0 0x81E1 0x81E2 0x81E3 0x81E4 0x81E5 0x81E6 0x81E7 0x81E8 + 15 0x81F0 0x81F1 0x81F2 0x81F3 0x81F4 0x81F5 0x81F6 0x81F7 0x81F8 + +!Value table +# Dest MAC Dest MAC Dest IP Dest Port Src MAC Src MAC Src IP Src Port Packet Size +# Hub # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # +######################################################################################################################################## + +# 0xc000 0 0x7a0b83ca 0x0cc4 0xc0a80a03 0xc34f 0xdead7fff 0x001b 0xc0a80000 0xc350 0x0578 + + 0xc000 0 0x1e04f334 0x000e 0xc0a80003 0xc34f 0xdead7fff 0x001b 0xc0a80000 0xc350 0x0578 + 0x8000 0 0x1e04f334 0x000e 0xc0a80003 0xc350 0xdead8000 0x001b 0xc0a80001 0xc351 0x0578 + 0x8001 0 0x1e04f334 0x000e 0xc0a80003 0xc351 0xdead8001 0x001b 0xc0a80002 0xc352 0x0578 + 0x8002 0 0x1e04f334 0x000e 0xc0a80003 0xc352 0xdead8002 0x001b 0xc0a80003 0xc353 0x0578 +# 0x8003 0 0x1e04f334 0x000e 0xc0a80003 0xc353 0xdead8003 0x001b 0xc0a80004 0xc354 0x0578 +# 0x8004 0 0x1e04f334 0x000e 0xc0a80003 0xc354 0xdead8004 0x001b 0xc0a80005 0xc355 0x0578 +# 0x8005 0 0x1e04f334 0x000e 0xc0a80003 0xc355 0xdead8005 0x001b 0xc0a80006 0xc356 0x0578 +# 0x8006 0 0x1e04f330 0x000e 0xc0a80003 0xc356 0xdead8006 0x001b 0xc0a80007 0xc357 0x0578 +# 0x8007 0 0x1e04f330 0x000e 0xc0a80003 0xc357 0xdead8007 0x001b 0xc0a80008 0xc358 0x0578 +# 0x8008 0 0x1e04f330 0x000e 0xc0a80003 0xc358 0xdead8008 0x001b 0xc0a80009 0xc359 0x0578 +# 0x8009 0 0x1e04f330 0x000e 0xc0a80003 0xc359 0xdead8009 0x001b 0xc0a8000a 0xc35a 0x0578 +# 0x800a 0 0x1e04f330 0x000e 0xc0a80003 0xc35a 0xdead800a 0x001b 0xc0a8000b 0xc35b 0x0578 +# 0x800b 0 0x1e04f330 0x000e 0xc0a80003 0xc35b 0xdead800b 0x001b 0xc0a8000c 0xc35c 0x0578 + +# 0xc000 0 0x1e04f330 0x000e 0xc0a80002 0xc350 0xdead8000 0x001b 0xc0a80000 0xc350 0x0578 +# 0x8000 0 0x1e04f330 0x000e 0xc0a80002 0xc351 0xdead8001 0x001b 0xc0a80001 0xc351 0x0578 +# 0x8001 0 0x1e04f330 0x000e 0xc0a80002 0xc352 0xdead8002 0x001b 0xc0a80002 0xc352 0x0578 +# 0x8002 0 0x1e04f330 0x000e 0xc0a80002 0xc353 0xdead8003 0x001b 0xc0a80003 0xc353 0x0578 +# 0x8003 0 0x1e04f330 0x000e 0xc0a80002 0xc354 0xdead8004 0x001b 0xc0a80004 0xc354 0x0578 +# 0x8004 0 0x1e04f330 0x000e 0xc0a80002 0xc355 0xdead8005 0x001b 0xc0a80005 0xc355 0x0578 +# 0x8005 0 0x1e04f330 0x000e 0xc0a80002 0xc356 0xdead8006 0x001b 0xc0a80006 0xc356 0x0578 +# 0x8006 0 0x1e04f330 0x000e 0xc0a80002 0xc357 0xdead8007 0x001b 0xc0a80007 0xc357 0x0578 +# 0x8007 0 0x1e04f330 0x000e 0xc0a80002 0xc358 0xdead8008 0x001b 0xc0a80008 0xc358 0x0578 +# 0x8008 0 0x1e04f330 0x000e 0xc0a80002 0xc359 0xdead8009 0x001b 0xc0a80009 0xc359 0x0578 +# 0x8009 0 0x1e04f330 0x000e 0xc0a80002 0xc35a 0xdead8010 0x001b 0xc0a80010 0xc35a 0x0578 +# 0x8010 0 0x1e04f330 0x000e 0xc0a80002 0xc35b 0xdead8011 0x001b 0xc0a80011 0xc35b 0x0578 +# 0x8011 0 0x1e04f330 0x000e 0xc0a80002 0xc35c 0xdead8012 0x001b 0xc0a80012 0xc35c 0x0578 +# 0x8012 0 0x1e04f330 0x000e 0xc0a80002 0xc35d 0xdead8013 0x001b 0xc0a80013 0xc35d 0x0578 +# 0x8013 0 0x1e04f330 0x000e 0xc0a80002 0xc35e 0xdead8014 0x001b 0xc0a80014 0xc35e 0x0578 +# 0x8014 0 0x1e04f330 0x000e 0xc0a80002 0xc35f 0xdead8015 0x001b 0xc0a80015 0xc35f 0x0578 +# 0x8015 0 0x1e04f330 0x000e 0xc0a80002 0xc360 0xdead8016 0x001b 0xc0a80016 0xc360 0x0578 +# 0x8016 0 0x1e04f330 0x000e 0xc0a80002 0xc361 0xdead8017 0x001b 0xc0a80017 0xc361 0x0578 +# 0x8017 0 0x1e04f330 0x000e 0xc0a80002 0xc362 0xdead8018 0x001b 0xc0a80018 0xc362 0x0578 +# 0x8018 0 0x1e04f330 0x000e 0xc0a80002 0xc363 0xdead8019 0x001b 0xc0a80019 0xc363 0x0578 +# 0x8019 0 0x1e04f330 0x000e 0xc0a80002 0xc364 0xdead8020 0x001b 0xc0a80020 0xc364 0x0578 +# 0x8020 0 0x1e04f330 0x000e 0xc0a80002 0xc365 0xdead8021 0x001b 0xc0a80021 0xc365 0x0578 +# 0x8021 0 0x1e04f330 0x000e 0xc0a80002 0xc366 0xdead8022 0x001b 0xc0a80022 0xc366 0x0578 +# #0x8022 0 0x1e04f330 0x000e 0xc0a80002 0xc367 0xdead8023 0x001b 0xc0a80023 0xc367 0x0578 +# #0x8023 0 0x1e04f330 0x000e 0xc0a80002 0xc368 0xdead8024 0x001b 0xc0a80024 0xc368 0x0578 +# #0x8024 0 0x1e04f330 0x000e 0xc0a80002 0xc369 0xdead8025 0x001b 0xc0a80025 0xc369 0x0578 +# #0x8025 0 0x1e04f330 0x000e 0xc0a80002 0xc36a 0xdead8026 0x001b 0xc0a80026 0xc36a 0x0578 + + diff --git a/users/cua_crt/startup.sh b/users/cua_crt/startup.sh new file mode 100755 index 0000000..af021e3 --- /dev/null +++ b/users/cua_crt/startup.sh @@ -0,0 +1,71 @@ +#!/bin/bash + +export PATH=$PATH:~/trbsoft/daqtools/users/cua_crt +export TRB3_SERVER=trb104:26000 +export TRBNETDPID=$(pgrep trbnetd) + +echo "- trbnetd pid: $TRBNETDPID" +if [[ -z "$TRBNETDPID" ]] +then + ~/bin/trbnetd -i 104 +fi + +export DAQOPSERVER=localhost:104 + +trbcmd reset +check_ping.pl --reboot +rc=$?; if [[ $rc != 0 ]]; then echo "exit from startup as not all boards are up"; exit $rc; fi + +./trbreset_loop.pl + + +echo "set addresses" +~/trbsoft/daqtools/merge_serial_address.pl ~/trbsoft/daqtools/base/serials_trb3.db ~/trbsoft/daqtools/users/cua_crt/addresses_trb3.db > /dev/null + + + +################################################## +## Configure GbE for DAQ +################################################## +trbcmd w 0xff7f 0x8308 0xffffff # Trigger counter for startup +trbcmd w 0xff7f 0x830e 0x10 + +echo "registers configgbe" +~/trbsoft/daqtools/tools/loadregisterdb.pl register_configgbe.db +echo "registers configgbe_ip" +~/trbsoft/daqtools/tools/loadregisterdb.pl register_configgbe_ip.db + + +echo -n "register_config_tdc" +~/trbsoft/daqtools/tools/loadregisterdb.pl register_config_tdc.db +echo -ne "\n" + + +# standard TDCs +trbcmd clearbit 0xfe4c 0xc800 0x2000 ## clear bit to reset the epoch and coarse counters +trbcmd w 0xfe4c 0xc800 0x00002000 ## TDC-Control-Register, RTnice +#trbcmd w 0xfe4c 0xc801 0x801e0046 ## triggerwindow -350...+150ns ;5ns granularity +trbcmd w 0xfe4c 0xc802 0xffffffff ## channel 33-64 enable +trbcmd w 0xfe4c 0xc803 0x0000ffff ## channel 33-64 enable +trbcmd w 0xfe4c 0xc804 0x0000007c ## data transfer limit + +#trbcmd w 0x2001 0xc802 0xffffffff + +# +## AUX TDCs +trbcmd clearbit 0xfe4a 0xc800 0x2000 ## clear bit to reset the epoch and coarse counters +trbcmd w 0xfe4a 0xc800 0x00002000 ## Triggerless mode, reset next trigger all coarse counters +##trbcmd w 0xfe4a 0xc800 0x00000000 ## Triggerless mode, reset next trigger all coarse counters +##trbcmd w 0xfe4a 0xc801 0x801e0046 ## triggerwindow -350...+150ns ;5ns granularity +#trbcmd w 0xfe4a 0xc801 0x80c600c6 ## triggerwindow +/-990ns ;5ns granularity +trbcmd w 0xfe4a 0xc802 0xffffffff ## channel 33-64 enable +trbcmd w 0xfe4a 0xc803 0x0000ffff ## channel 33-64 enable +trbcmd w 0xfe4a 0xc804 0x0000007c ## data transfer limit +#trbcmd w 0xfe4a 0xc805 0xffffffff ## invert gpio + + + + +echo -n "- number of trb endpoints in the system after turning off unused tdcs: " +trbcmd i 0xffff | wc -l + diff --git a/users/cua_crt/startup_old.sh b/users/cua_crt/startup_old.sh new file mode 100755 index 0000000..1bcae33 --- /dev/null +++ b/users/cua_crt/startup_old.sh @@ -0,0 +1,366 @@ +#!/bin/bash + +export PATH=$PATH:~/trbsoft/daqtools/users/gsi_dirc +export TRB3_SERVER=trb056:26000 +export TRBNETDPID=$(pgrep trbnetd) + +echo "- trbnetd pid: $TRBNETDPID" +if [[ -z "$TRBNETDPID" ]] +then + ~/bin/trbnetd -i 56 +fi + +trbcmd reset +check_ping.pl --reboot +rc=$?; if [[ $rc != 0 ]]; then echo "exit from startup as not all boards are up"; exit $rc; fi + + +export DAQOPSERVER=localhost:56 +#export DAQOPSERVER=localhost + +#js just for a minute +#?? +./trbreset_loop.pl + +################################################## +## Set addresses +################################################## + +echo "set addresses" +~/trbsoft/daqtools/merge_serial_address.pl ~/trbsoft/daqtools/base/serials_trb3.db ~/trbsoft/daqtools/users/gsi_dirc/addresses_trb3.db > /dev/null + + +~/trbsoft/daqtools/merge_serial_address.pl ~/trbsoft/daqtools/base/serials_dirich.db ~/trbsoft/daqtools/users/gsi_dirc/addresses_dirich.db +~/trbsoft/daqtools/merge_serial_address.pl ~/trbsoft/daqtools/base/serials_dirich_concentrator.db ~/trbsoft/daqtools/users/gsi_dirc/addresses_dirich_concentrator.db + + +################################################## +## Configure GbE for DAQ +################################################## +trbcmd w 0xff7f 0x8308 0xffffff # Trigger counter for startup +trbcmd w 0xff7f 0x830e 0x10 + +echo "registers configgbe" +~/trbsoft/daqtools/tools/loadregisterdb.pl register_configgbe.db +echo "registers configgbe_ip" +~/trbsoft/daqtools/tools/loadregisterdb.pl register_configgbe_ip.db + + + +################################################## +## Configure TDCs +################################################## + +# standard TDCs +trbcmd clearbit 0xfe4c 0xc800 0x2000 ## clear bit to reset the epoch and coarse counters +trbcmd w 0xfe4c 0xc800 0x00002000 ## TDC-Control-Register, RTniceM +# +trbcmd clearbit 0xfe51 0xc800 0x2000 ## clear bit to reset the epoch and coarse counters +trbcmd w 0xfe51 0xc800 0x00002000 ## TDC-Control-Register, RTniceM +#trbcmd w 0xfe4c 0xc800 0x00003000 ## Triggerless mode +#trbcmd w 0xfe4c 0xc801 0x000f0005 ## trigger window enable & trigger window width +#trbcmd w 0xfe4c 0xc800 0x00000001 ## logic analyser control register +#trbcmd w 0xfe4c 0xc800 0x00001001 ## 2014-10-02 disable the "triggered mode" + +#trbcmd w 0xfe4c 0xc801 0x801e0046 ## triggerwindow -350...+150ns ;5ns granularity (Experiment cern2015) +trbcmd w 0xfe4c 0xc801 0x80c600c6 ## triggerwindow +/-990ns ;5ns granularity +trbcmd w 0xfe51 0xc801 0x80c600c6 ## triggerwindow +/-990ns ;5ns granularity +#trbcmd w 0xfe4c 0xc801 0x8000001e ## triggerwindow +/-150ns ;5ns granularity + +# Default TDC-channel enable for all channels +#trbcmd w 0xfe4c 0xc802 0xffffffff ## channel 01-32 enable +#trbcmd w 0xfe4c 0xc803 0x0000ffff ## channel 33-64 enable +trbcmd w 0xfe4c 0xc804 0x0000007c ## data transfer limit +# +trbcmd w 0xfe51 0xc802 0xffffffff ## channel 01-32 enable +trbcmd w 0xfe51 0xc803 0x0000ffff ## channel 33-64 enable +trbcmd w 0xfe51 0xc804 0x0000007c ## data transfer limit + + +trbcmd w 0xfe51 0xc805 0xffffffff ## invert TDC +#trbcmd w 0xfe51 0xc805 0x00000000 ## no invert + +trbcmd w 0x2014 0xc802 0x7fff01d5 ## disable 2016 + +# TOFs time windows +#trbcmd w 0x2014 0xc801 0x8000008c +#trbcmd w 0x2015 0xc801 0x8000008c +#trbcmd w 0x2016 0xc801 0x8000008c +#trbcmd w 0x2018 0xc801 0x8000008c +#trbcmd w 0x2019 0xc801 0x8000008c +#trbcmd w 0x201a 0xc801 0x8000008c +#trbcmd w 0x201c 0xc801 0x8000008c +#trbcmd w 0x201d 0xc801 0x8000008c + + +# special Matthias TDCs +#trbcmd clearbit 0xfe48 0xc800 0x2000 ## clear bit to reset the epoch and coarse counters +#trbcmd w 0xfe48 0xc800 0x00002000 ## Triggered mode +#trbcmd w 0xfe48 0xc801 0x80c600c6 ## triggerwindow +/-990ns ;5ns granularity +#trbcmd w 0xfe48 0xc802 0xffffffff ## channel 01-32 enable +#trbcmd w 0xfe48 0xc803 0xffffffff ## channel 33-64 enable +#trbcmd w 0xfe48 0xc804 0x0000007c ## data transfer limit + +# special settings for barrel +#trbcmd w 0x2000 0xc801 0x8018004b ## triggerwindow -375ns ... 120ns ;5ns granularity + + +# AUX TDCs +trbcmd clearbit 0xfe4a 0xc800 0x2000 ## clear bit to reset the epoch and coarse counters +trbcmd w 0xfe4a 0xc800 0x00002000 ## Triggerless mode, reset next trigger all coarse counters +#trbcmd w 0xfe4a 0xc800 0x00000000 ## Triggerless mode, reset next trigger all coarse counters +#trbcmd w 0xfe4a 0xc801 0x801e0046 ## triggerwindow -350...+150ns ;5ns granularity +trbcmd w 0xfe4a 0xc801 0x80c600c6 ## triggerwindow +/-990ns ;5ns granularity +trbcmd w 0xfe4a 0xc802 0xffffffff ## channel 33-64 enable +trbcmd w 0xfe4a 0xc803 0xffffffff ## channel 33-64 enable +trbcmd w 0xfe4a 0xc804 0x0000007c ## data transfer limit +#trbcmd w 0xfe4a 0xc805 0xffffffff ## invert gpio + + + + + +#Dirich-Concentrator: enable reference time from RJ45 +trbcmd loadbit 0x8300 0xd580 0x6 0x6 + + + + +echo -n "register_config_tdc" +~/trbsoft/daqtools/tools/loadregisterdb.pl register_config_tdc.db + + +echo -n "- number of trb endpoints in the system after turning off unused tdcs: " +trbcmd i 0xffff | wc -l + +#trbcmd w 0x1510 0xc800 0x00000001 ## logic analyser control register +#trbcmd w 0x1510 0xc800 0x00001001 ## 2014-10-02 disable the "triggered mode" +#trbcmd w 0x1510 0xc801 0x80620062 ## triggerwindow +/-490ns ;5ns granularity +#trbcmd w 0xfe4c 0xc802 0xffffffff ## channel 01-32 enable +#trbcmd w 0x1510 0xc804 0x00000080 ## data transfer limit for 0x1510 + +################################################## +## Other Settings +################################################## +# Reset trigger logic - only a workaround for a bug +#trbcmd w 0xffff 0x20 0x33 + + + +#20150522 Jan comment, Merlin auskommentiert +#~/trbsoft/daqtools/padiwa.pl 0xfe4c 0 time > /dev/null;~/trbsoft/daqtools/padiwa.pl 0xfe4c 1 time > /dev/null; ~/trbsoft/daqtools/padiwa.pl 0xfe4c 2 time > /dev/null + + + + + + +# Barrel DIRC +# enable stretch prepare_padiwas_invert_leds.pl --endpoints=0x2000-0x2013 --chains=0..2 --invert=0xffff --stretch=0xffff + +#prepare_padiwas_invert_leds.pl --endpoints=0x2000..0x200b --chains=0..2 --invert=0xffff +#20170822 prepare_padiwas_invert_leds.pl --endpoints=0x2000..0x2003 --chains=0..2 --invert=0xffff + + +#prepare_padiwas_invert_leds.pl --endpoints=0x2000..0x200f --chains=0..2 --invert=0xffff + +#Invert erlangen +#prepare_padiwas_invert_leds.pl --endpoints=0x2014..0x201d --chains=0..1 --invert=0xffff + +#padiwa_led_off.pl + +#invert Erlangen Padiwas +#~/trbsoft/daqtools/users/gsi_dirc/setup_erlangen.sh + + + +# Beam (TOF/Hodo) +#prepare_padiwas_invert_leds.pl --endpoints=0x2018-0x201f --chains=0..2 --invert=0xffff +#~/trbsoft/daqtools/padiwa.pl 0x201c 0 invert f + +# disable unused TDCs +# turn off two unused TDCs in HODO + +#------------------------------------------------ +# taken out by Carsten for debugging 26-July-2018 + +#switchport.pl 0x8007 3 off +#switchport.pl 0x8007 2 off + +#------------------------------------------------ + +# turn off two unused TDCs in TOF2 +#switchport.pl 0x8006 2 off +#switchport.pl 0x8006 3 off + +# turn off two unused TDCs in TOF1 +#switchport.pl 0x8007 2 off +#switchport.pl 0x8007 3 off + +# turn off two unused TDCs in HODO +#switchport.pl 0x8005 2 off +#switchport.pl 0x8005 3 off + +# timeouts +trbcmd w 0xfffe 0xc5 0x800050ff + +# divert TDC inputs to the CTS for trigger +#echo "- divert TDC inputs to the CTS for trigger"; +# trbcmd setbit 0xfe4c 0xcf00 0x1 +#trbcmd setbit 0x8000 0xa1d4 0x10000 ## ??? + +echo "write barrel dirc thresholds" + +cd ~/trbsoft/daqtools/thresholds/ +echo "padiwa thresholds..." +#./write_thresholds.pl ~/trbsoft/daqtools/users/gsi_dirc/thresh/padiwa_threshold_results_blockwise_20200715_163000.thr -o 200 > /dev/null +echo "done" + +cd ~/trbsoft/daqtools/users/gsi_dirc/thresholds/dirich + +# july ./load_thresh_orig.sh # 1mV +# switch 8/27 ./load_thresh_aug2014.sh # 4mV for first few days +## ./load_thresh_sep2014-2mV.sh # 2mV starting evening Sep 8 + +## 2015 ./load_thresh_mcptof.sh 1500 1500 1500 1500 + +## Barrel DIRC +#./write_thresholds.pl ~/trbsoft/daqtools/users/gsi_dirc/thresh/201505101447.thr -o 600 >> /dev/null # 1.5mV at plug +#./write_thresholds.pl padiwa_threshold_results_20150511_2.log -o 400 > /dev/null # 1mV at plug +# for stretch ./write_thresholds.pl padiwa_threshold_results_20150516_high_stretch_CS.log -o 400 > /dev/null # 1mV at plug +#20150521 +#./write_thresholds.pl padiwa_threshold_results_20150516_high_nostretch_CS.log -o 200 > /dev/null +#./write_thresholds.pl padiwa_threshold_results_20150521_high_nostretch_CS.log -o 200 > /dev/null + +#./write_thresholds.pl padiwa_threshold_results_sequential_2015_06_25_offset_40_a.log -o 160 +#./write_thresholds.pl padiwa_threshold_results_sequential_2015_06_27_offset_40_a.log -o 160 +#./write_thresholds.pl padiwa_threshold_results_sequential_2015_07_04_offset_40_a.log -o 160 +# ./write_thresholds.pl padiwa_threshold_results_05jul16.log -o 600 +#./write_thresholds.pl padiwa_threshold_results_sequential_2016_08_30_offset_0.log -o 130 +#./write_thresholds.pl padiwa_threshold_results_sequential_2016_09_06_offset_0.log -o 130 +#./write_thresholds.pl padiwa_threshold_results_blockwise_2016_10_07a.log -o 800 +#evening 10/18./write_thresholds.pl padiwa_threshold_results_blockwise_2016_10_18.log -o 1000 +#evening 10/19./write_thresholds.pl padiwa_threshold_results_blockwise_2016_10_19.log -o 500 +#10/20 7pm ./write_thresholds.pl padiwa_threshold_results_blockwise_2016_10_22f.log -o 500 +#10/23 change to symlink + +# 10/24 disabled for a few special runs ./write_thresholds.pl padiwa_threshold_results_latest.log -o 1000 +# 10/31 test ./write_thresholds.pl padiwa_threshold_results_latest.log -o 500 +# 11/01 ./write_thresholds.pl padiwa_threshold_results_latest.log -o 250 + +# 8/26./write_thresholds.pl padiwa_threshold_results.log -o 600 +#./write_thresholds.pl padiwa_threshold_results_blockwise_20170826_1745.log -o 600 +### ./write_thresholds.pl padiwa_threshold_results_blockwise_20170829_1101.log -o 600 + + +# +#./write_thresholds.pl padiwa_threshold_results_blockwise_20170831_0835.log -o 600 + +# ./split_thresholds.sh padiwa_threshold_results_blockwise_20170901_2119.log +# ./split_thresholds.sh padiwa_threshold_results_blockwise_20170902_1718.log +#./split_thresholds.sh padiwa_threshold_results_blockwise_20170905_1901.log +#./split_thresholds.sh padiwa_threshold_results_blockwise_20170906_1825.log +#./split_thresholds.sh padiwa_threshold_results_blockwise_20170910_1857.log +#./split_thresholds.sh cern2017_beam/padiwa_threshold_results_blockwise_20170911_1330.log +# ./write_thresholds.pl padiwa_threshold_results_blockwise_20180727.log -o 600 +#./write_thresholds.pl padiwa_threshold_results_blockwise_20180728_1132.log -o 600 +#./write_thresholds.pl padiwa_threshold_results_blockwise_20180729_1015.log -o 600 +#./split_thresholds.sh padiwa_threshold_results_blockwise_20180804_0945.log +#./split_thresholds.sh padiwa_threshold_results_blockwise_20180809_1915.log +#./split_thresholds.sh padiwa_threshold_results_blockwise_20180810_1130.log +#./split_thresholds.sh padiwa_threshold_results_blockwise_20180811_2000.log +#./split_thresholds.sh padiwa_threshold_results_blockwise_20180813_1100.log +##################./split_thresholds.sh padiwa_threshold_results_blockwise_20180814_1115.log +#./split_thresholds.sh padiwa_threshold_results_31jan2018.log +## ./split_thresholds.sh padiwa_threshold_results.log + +echo "padiwa_threshold_results loading" + +#./write_thresholds.pl mcp00.log -o 600 +#./write_thresholds.pl mcp01.log -o 600 +#./write_thresholds.pl mcp02.log -o 600 +#./write_thresholds.pl mcp03.log -o 600 +#./write_thresholds.pl mcp04.log -o 600 +#./write_thresholds.pl mcp05.log -o 600 +#./write_thresholds.pl mcp06.log -o 600 +#./write_thresholds.pl mcp07.log -o 600 +#./write_thresholds.pl mcp08.log -o 700 #20170911 +#./write_thresholds.pl mcp09.log -o 700 #20170912 +#./write_thresholds.pl mcp10.log -o 600 +#./write_thresholds.pl mcp11.log -o 600 + +#./write_thresholds.pl mcp00.log -o 600 +#./write_thresholds.pl mcp01.log -o 1200 # 1200 30.7.2018 +#./write_thresholds.pl mcp02.log -o 600 +#./write_thresholds.pl mcp03.log -o 600 +#./write_thresholds.pl mcp04.log -o 600 +#./write_thresholds.pl mcp05.log -o 600 +#./write_thresholds.pl mcp06.log -o 600 +# ./write_thresholds.pl padiwa_threshold_results.log -o 600 + +#./write_thresholds.pl mcp08.log -o 900 #20170911 +#./write_thresholds.pl mcp09.log -o 600 #20170912 +#./write_thresholds.pl mcp10.log -o 600 +#./write_thresholds.pl mcp11.log -o 600 + + +# + +#./HADESthreshscan_v1 -f 20191030_111147_std_save.thr -l 0 -i -t 0 60 +#./HADESthreshscan_v1 --no-autosave -f ~/trbsoft/daqtools/users/gsi_dirc/thresholds/dirich/20220914_113041_std_save.thr -l 0 -t 60 + +# Use latest threshold +~/trbsoft/daqtools/thresholds/trb_dirich_threshold/HADESthreshscan_v1 --no-autosave -l 0 -t 60 + +# + +# 10/26 quick fix to set special threshold for 0x2006/0 = +1mV +#grep '0x2006' padiwa_threshold_results_latest.log | grep 'chain: 00' >! padiwa_thresholds_current_0x2006-0.txt +#./write_thresholds.pl padiwa_thresholds_current_0x2006-0.txt -o 1000 + + +#./write_erlangen.sh + + + +#echo "led off" +#./padiwa_led_off_MT.sh > /dev/null +#20150524 kill noisy pixel by setting 0xffff threshold +# 20150625 - disable kill # echo "turn off noisy pixel" +#./write_thresholds.pl padiwa_killPix.log > /dev/null + + +cd - + + +echo "ready to go" + +#echo "- setting trigger rate register in TDC"; +# trigger rate 1500Hz +trbcmd w 0xc000 0xa154 0x0001869f +# pulser enable +#trbcmd setbit 0xc000 0xa101 0x2 + +# enable multiplexer 0 +# js 20170909 trbcmd setbit 0xc000 0xa101 0x30 +trbcmd setbit 0xc000 0xa101 0x18 + + +# js 20170909 trbcmd w 0xc000 0xa154 0x270f #10kHz pulser +trbcmd w 0xc000 0xa154 0x0001869f #1kHz pulser for TRB calib +trbcmd w 0xc000 0xa155 0x05f5e100 #1Hz pulser + +##trbcmd w 0xc000 0xa159 0x11111d1d # type0=0xd_tdc_calibration_trigger +# js 20170909 ttrbcmd loadbit 0xc000 0xa159 0x00000f00 0x00000d00 #Pulser 1 is calibration + + + +trbcmd w 0xfe51 0xdf80 0xffffffff # enable monitor counters + + + + + + +# disable all triggers +#trbcmd setbit 0xc000 0xa00c 0x80000000 diff --git a/users/cua_crt/thresholds/padiwa/padiwa_status_2022_Oct.txt b/users/cua_crt/thresholds/padiwa/padiwa_status_2022_Oct.txt new file mode 100644 index 0000000..422500a --- /dev/null +++ b/users/cua_crt/thresholds/padiwa/padiwa_status_2022_Oct.txt @@ -0,0 +1,127 @@ +#PADIWA # thr. search results Comments filename +# +# premium (prem): amplification 23MT 47/200 +XXX67 good ->MT 1/? +XXX40 good ->MT 47/200 +48486 good ->MT lower amplification of about 20 47/200 +48496 bad ->MT lower amplification of about 20 47/200 +48462 good ->MT lower amplification of about 20 47/200 +48455 good ->MT lower amplification of about 20 47/200 +48526 bad Munich digital part broken program? +XXXA6 good +# + + +In Munich: 10 (above marked plus 125 144 137, which are part of above list) +d.h. Da fehlen 3 mehr... +In Erlangen: 5 (above marked) + + + +# +# measured a total of: 88 PADIWAs +# premium: 49 +# good: 28 +# bad: 11 +============= + 88 + +19-feb-2018: + +-10 Munich (3 not marked above) +-5 Erlangen +-7 MT + 66 + +# premium 44 +# good 17 +# bad 8 +============ + 69-3 = 66 + +48 in detectors 18 left? + + +0057 prem --> bad + diff --git a/users/cua_crt/trbreset_loop.pl b/users/cua_crt/trbreset_loop.pl new file mode 100755 index 0000000..50815f6 --- /dev/null +++ b/users/cua_crt/trbreset_loop.pl @@ -0,0 +1,30 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +### Change THIS! +my $required_endpoints = 20; + +# barrel my $required_endpoints = 25; + + +my $max_counter = 5; +my $counter = 0; +my $number = 0; + + +while (($number != $required_endpoints) || ($counter > $max_counter)) { + my $c; my $res; + + $counter++; + $c= "trbcmd reset"; + $res = qx($c); + + $c = "trbcmd i 0xffff | wc -l"; + $res = qx($c), + print "- number of trb endpoints in the system: $res"; + ($number) = $res =~ /(\d+)/; + print "number of enpoints smaller than $required_endpoints, so try next reset!\n" if ($number <$required_endpoints); + #exit; +}