<Module name="Combiner" class="hadaq::CombinerModule">
<!-- these parameters will force to create inputs/oputputs of module -->
- <NumInputs value="7"/>
+ <NumInputs value="5"/>
<NumOutputs value="2"/>
<InputPort name="Input0" url="hadaq://host:49999" thread="UdpThread1"/>
0x8102 56 2
0x8103 56 3
-0x7999 56 5
+0xc000 56 5
0x2000 72 0
0x2001 72 1
0x2003 72 3
0x8000 72 5
-0x2004 99 0
-0x2005 99 1
-0x2006 99 2
-0x2007 99 3
-0x8001 99 5
+#0x2004 99 0
+#0x2005 99 1
+#0x2006 99 2
+#0x2007 99 3
+#0x8001 99 5
#0x2008 78 0
#0x2009 78 1
#0x200a 78 2
#0x200b 78 3
#0x8002 78 5
-0x2008 73 0
-0x2009 73 1
-0x200a 73 2
-0x200b 73 3
-0x8002 73 5
+0x2004 73 0
+0x2005 73 1
+0x2006 73 2
+0x2007 73 3
+0x8001 73 5
-0x200c 74 0
-0x200d 74 1
-0x200e 74 2
-0x200f 74 3
-0x8003 74 5
+#0x2008 74 0
+#0x2009 74 1
+#0x200e 74 2
+#0x200f 74 3
+#0x8003 74 5
-0x2010 104 0
-0x2011 104 1
-0x2012 104 2
-0x2013 104 3
-0x8004 104 5
+0x2008 104 0
+0x2009 104 1
+0x200a 104 2
+0x200b 104 3
+0x8002 104 5
# MCP-TOF-FRONT 1
0x2014 97 0
-# FLASH ,not used
-0x2020 111 0
-0x2021 111 1
-0x2022 111 2
-0x2023 111 3
-0x8008 111 5
+## FLASH ,not used
+#0x2020 111 0
+#0x2021 111 1
+#0x2022 111 2
+#0x2023 111 3
+#0x8008 111 5
# DISC-DIRC, not used
0x202d 57 1
0x202e 57 2
0x202f 57 3
-0x8008 57 5
+0x8003 57 5
#my @trbs = (56, 72, 99, 73, 74, 104, 97, 59, 89, 57);
my $map = {
- 0 => { trb => 72, sys => "MCP 00" },
- 1 => { trb => 99, sys => "MCP 01" },
- 2 => { trb => 73, sys => "MCP 02" },
- 3 => { trb => 74, sys => "MCP 03" },
- 4 => { trb => 104, sys => "MCP 04" },
+ 0 => { trb => 72, sys => "TRB 00" },
+# 1 => { trb => 99, sys => "MCP 01" },
+ 1 => { trb => 73, sys => "TRB 01" },
+# 2 => { trb => 74, sys => "MCP 03" },
+ 2 => { trb => 104, sys => "TRB 02" },
# 5 => { trb => 97, sys => "TOF 1" },
# 6 => { trb => 59, sys => "TOF 2" },
# 7 => { trb => 89, sys => "HODO" },
- 5 => { trb => 57, sys => "AUX" },
+ 3 => { trb => 57, sys => "AUX" },
-1 => { trb => 56, sys => "CTS" },
};
my $c= "ping -W1 -c2 $host";
my $sysnum = sprintf "0x80%.2x", $ct;
- $sysnum = "0x7999" if $ct == -1;
+ $sysnum = "0xc000" if $ct == -1;
my $pid = $pm->start("$sysnum") and next;
$rh_unsuccessful = { "0xffff"=>"all"} ;
}
- if ($rh_unsuccessful->{"0x7999"} || (scalar keys %$rh_unsuccessful) > 5) {
- print "many TRBs (or 0x7999) are not alive, so let us make a reload of all FPGAs.\n";
+ 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"} ;
}
# upper limit for high end of color scale
# max_count_uclamp => 100000000,
# max_count_uclamp =>500,
- max_count_uclamp => 5000,
+# max_count_uclamp => 5000,
# max_count_uclamp => 10000,
# lower limit for high end of color scale
max_count_lclamp => 10,
base::ProcMgr::instance()->SetRawAnalysis(true);
// this limits used for liner calibrations when nothing else is available
- hadaq::TdcMessage::SetFineLimits(31, 421);
+ hadaq::TdcMessage::SetFineLimits(31, 469);
// default channel numbers and edges mask
- hadaq::TrbProcessor::SetDefaults(33, 0x2);
+ hadaq::TrbProcessor::SetDefaults(49, 0x2);
hadaq::HldProcessor* hld = new hadaq::HldProcessor();
hadaq::TrbProcessor* trb3_1 = new hadaq::TrbProcessor(0x8000, hld);
trb3_1->SetHistFilling(4);
trb3_1->SetCrossProcess(true);
- trb3_1->CreateTDC(0x2000, 0x2001, 0x2002, 0x20003);
+ trb3_1->CreateTDC(0x2000, 0x2001, 0x2002, 0x2003);
// enable automatic calibration, specify required number of hits in each channel
- //trb3_1->SetAutoCalibrations(80000);
+ trb3_1->SetAutoCalibrations(100000);
// calculate and write static calibration at the end of the run
//trb3_1->SetWriteCalibrations("run1");
- trb3_1->LoadCalibrations("run1");
+ //trb3_1->LoadCalibrations("run1");
- hadaq::TrbProcessor* trb3_2 = new hadaq::TrbProcessor(0x800b, hld);
+ hadaq::TrbProcessor* trb3_2 = new hadaq::TrbProcessor(0x8001, hld);
trb3_2->SetHistFilling(4);
trb3_2->SetCrossProcess(true);
- trb3_2->CreateTDC(0x202c, 0x202d, 0x202e, 0x202f);
- //trb3_2->SetAutoCalibrations(80000);
- //trb3_2->SetWriteCalibrations("run1");
- trb3_2->LoadCalibrations("run1");
+ trb3_2->CreateTDC(0x2004, 0x2005, 0x2006, 0x2007);
+ trb3_2->SetAutoCalibrations(100000);
+ // trb3_2->SetWriteCalibrations("run1");
+ //trb3_2->LoadCalibrations("run1");
// this is array with available TDCs ids
- int tdcmap[8] = { 0x2000, 0x2001, 0x2002, 0x2003, 0x202c, 0x202d, 0x202e, 0x202f };
+ int tdcmap[2] = { 0x2003, 0x2007 };
// TDC subevent header id
- for (int cnt=0;cnt<8;cnt++) {
+ for (int cnt=0;cnt<2;cnt++) {
hadaq::TdcProcessor* tdc = hld->FindTDC(tdcmap[cnt]);
if (tdc==0) continue;
// specify reference channel
//tdc->SetRefChannel(0, 0, 0x202c, 20000, 9597E6., 9603E6., true);
- if(cnt==0) {
- tdc->SetRefChannel(0, 0, 0x2001, 20000, -100., 100., true);
- }
+ // if(cnt==0) {
+ tdc->SetRefChannel(44, 0, 0xffff, 4000, -500., 500., true);
+ tdc->SetRefChannel(46, 44, 0xffff, 20000, -50., 50., true);
+ //tdc->SetRefChannel(46, 46, 0xffff, 4000, -50., 50., true);
+
+
+ // } else {
+ // tdc->SetRefChannel(46, 0, 0xffff, 40000, -300., 100., true);
+ // }
+
//tdc->SetRefChannel(3, 1, 0xffff, 20000, -10., 10., true);
// continue;
if (cnt==1) {
// specify reference channel from other TDC
//tdc->SetRefChannel(0, 0, 0xc000, 20000, -30., 30., true);
- tdc->SetRefChannel(0, 0, 0x2000, 20000, -20., 20., true);
+ //tdc->SetRefChannel(0, 0, 0x2000, 20000, -20., 20., true);
//tdc->SetRefChannel(6, 6, 0xc000, 20000, -20., 20., true);
- tdc->SetRefChannel(7, 7, 0x2000, 20000, -20., 20., true);
+ //tdc->SetRefChannel(7, 7, 0x2000, 20000, -20., 20., true);
}
- if (cnt>1) continue;
+ //if (cnt>1) continue;
// specify reference channel
my $MAX_PROCESSES=50;
my $pm = Parallel::ForkManager->new($MAX_PROCESSES);
-my @pad0 =(0x2000 .. 0x2013);
-my @pad1 =(0x2000 .. 0x2013);
-my @pad2 =(0x2000 .. 0x2013);
+my @pad0 =(0x2000 .. 0x200b);
+my @pad1 =(0x2000 .. 0x200b);
+my @pad2 =(0x2000 .. 0x200b);
#my @pad0 =(0x2000,0x2001,0x2004,0x2007,0x2009,0x200a,0x200c,0x200f,0x2011,0x2012,0x2013);
#my @pad1 =(0x2000,0x2004,0x2005,0x2006,0x2007,0x2008,0x2009,0x200e);
use Getopt::Long;
my $help = "";
-my $dataPath = "/d/aug2015/";
+my $dataPath = "/d/oct2016/";
my $label = "test";
my $time = -1;
my $name = "cc";
#print "$c\n";
qx($c);
- $c=qq|urxvt -geometry 80x27-0+0 -e bash -c 'dabc_exe EventBuilder_autogenerated.xml; sleep 10'|;
+ $c=qq|urxvt -geometry 110x27-0+0 -e bash -c 'dabc_exe EventBuilder_autogenerated.xml; sleep 10'|;
system("$c &");
}
else {
- $c=qq|xterm -geometry 122x15-0+0 -e bash -c 'daq_evtbuild -S $label -m 7 -x $name --filesize 1536 -d file -o $dataPath'|;
+ $c=qq|xterm -geometry 122x15-0+0 -e bash -c 'daq_evtbuild -S $label -m 5 -x $name --filesize 1536 -d file -o $dataPath'|;
#$c=qq|xterm -geometry 122x15-0+0 -e bash -c 'daq_evtbuild -S $label -m 10 -x $name --filesize 1536 -d file -o $dataPath'|;
#$c=qq|xterm -geometry 122x16-0+0 -e bash -c 'daq_evtbuild -S $label -m 23 -x $name -d file -o $dataPath'|;
print "test";
system("$c &");
sleep 1;
- $c=qq"xterm -geometry 82x45-0+210 -e bash -c 'daq_netmem -S $label -m 7 -i UDP:127.0.0.1:49999 -i UDP:127.0.0.1:50000 -i UDP:127.0.0.1:50001 -i UDP:127.0.0.1:50002 -i UDP:127.0.0.1:50003 -i UDP:127.0.0.1:50004 -i UDP:127.0.0.1:50008'";
+ $c=qq"xterm -geometry 82x45-0+210 -e bash -c 'daq_netmem -S $label -m 5 -i UDP:127.0.0.1:49999 -i UDP:127.0.0.1:50000 -i UDP:127.0.0.1:50001 -i UDP:127.0.0.1:50002 -i UDP:127.0.0.1:50003'";;
#$c=qq"xterm -geometry 82x45-0+210 -e bash -c 'daq_netmem -S $label -m 10 -i UDP:127.0.0.1:49999 -i UDP:127.0.0.1:50000 -i UDP:127.0.0.1:50001 -i UDP:127.0.0.1:50002 -i UDP:127.0.0.1:50003 -i UDP:127.0.0.1:50004 -i UDP:127.0.0.1:50005 -i UDP:127.0.0.1:50006 -i UDP:127.0.0.1:50007 -i UDP:127.0.0.1:50008'";
# 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 #
###################################################################################################################################################
- 0x7999 0 0x7999 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x1
+ 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
+# 0x8004 0 0x8004 0x00020001 0x00030064 0x1DE8 0x578 1 1 1 1 0x0
# 0x8005 0 0x8005 0x00020001 0x00030064 0x1DE8 0x578 1 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
+# 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
# Hub # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 #
########################################################################################################################################
- 0x7999 0 0x7a0b83ca 0x0cc4 0xc0a80a03 0xc34f 0xdead7fff 0x001b 0xc0a80000 0xc350 0x0578
+# 0xc000 0 0x7a0b83ca 0x0cc4 0xc0a80a03 0xc34f 0xdead7fff 0x001b 0xc0a80000 0xc350 0x0578
+
+ 0xc000 0 0x1e04f330 0x000e 0xc0a80003 0xc34f 0xdead7fff 0x001b 0xc0a80000 0xc350 0x0578
0x8000 0 0x1e04f330 0x000e 0xc0a80003 0xc350 0xdead8000 0x001b 0xc0a80001 0xc351 0x0578
0x8001 0 0x1e04f330 0x000e 0xc0a80003 0xc351 0xdead8001 0x001b 0xc0a80002 0xc352 0x0578
0x8002 0 0x1e04f330 0x000e 0xc0a80003 0xc352 0xdead8002 0x001b 0xc0a80003 0xc353 0x0578
0x8003 0 0x1e04f330 0x000e 0xc0a80003 0xc353 0xdead8003 0x001b 0xc0a80004 0xc354 0x0578
- 0x8004 0 0x1e04f330 0x000e 0xc0a80003 0xc354 0xdead8004 0x001b 0xc0a80005 0xc355 0x0578
+# 0x8004 0 0x1e04f330 0x000e 0xc0a80003 0xc354 0xdead8004 0x001b 0xc0a80005 0xc355 0x0578
# 0x8005 0 0x1e04f330 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
+# 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
-# 0x7999 0 0x1e04f330 0x000e 0xc0a80002 0xc350 0xdead8000 0x001b 0xc0a80000 0xc350 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
export DAQOPSERVER=localhost:56
#export DAQOPSERVER=localhost
-trbreset_loop.pl
+./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
##################################################
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
#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
-#trbcmd w 0xfe4c 0xc801 0x80c600c6 ## triggerwindow +/-990ns ;5ns granularity
+#trbcmd w 0xfe4c 0xc801 0x801e0046 ## triggerwindow -350...+150ns ;5ns granularity (Experiment cern2015)
+trbcmd w 0xfe4c 0xc801 0x80c600c6 ## triggerwindow +/-990ns ;5ns granularity
#trbcmd w 0xfe4c 0xc801 0x8000001e ## triggerwindow +/-150ns ;5ns granularity
# Default TDC-channel enable for all channels
# 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..0x2013 --chains=0..2 --invert=0xffff
+prepare_padiwas_invert_leds.pl --endpoints=0x2000..0x200b --chains=0..2 --invert=0xffff
padiwa_led_off.pl
# Beam
-prepare_padiwas_invert_leds.pl --endpoints=0x2014-0x201f --chains=0..2 --invert=0xffff
+#prepare_padiwas_invert_leds.pl --endpoints=0x2014-0x201f --chains=0..2 --invert=0xffff
# disable unused TDCs
#./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_sequential_2015_08_11_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_05.log -o 1200
#sleep 2
#echo "- setting trigger rate register in TDC";
# trigger rate 1500Hz
-trbcmd w 0x7999 0xa150 0x0001869f
+trbcmd w 0xc000 0xa150 0x0001869f
# pulser enable
-#trbcmd setbit 0x7999 0xa101 0x2
+#trbcmd setbit 0xc000 0xa101 0x2
# enable multiplexer 0
-trbcmd setbit 0x7999 0xa101 0x30
+trbcmd setbit 0xc000 0xa101 0x30
-trbcmd w 0x7999 0xa150 0x270f #1kHz pulser
-trbcmd w 0x7999 0xa151 0x05f5e100 #1Hz pulser
-trbcmd loadbit 0x7999 0xa158 0x00000f00 0x00000d00 #Pulser 1 is calibration
+trbcmd w 0xc000 0xa150 0x270f #1kHz pulser
+trbcmd w 0xc000 0xa151 0x05f5e100 #1Hz pulser
+trbcmd loadbit 0xc000 0xa158 0x00000f00 0x00000d00 #Pulser 1 is calibration
# disable all triggers
-#trbcmd setbit 0x7999 0xa00c 0x80000000
+#trbcmd setbit 0xc000 0xa00c 0x80000000
use warnings;
### Change THIS!
-my $required_endpoints = 30;
+my $required_endpoints = 25;
my $max_counter = 10;
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;
+ #exit;
}
#default cts endpoint. can be overriden by a command line parameter
sub getDefaultEndpoint {
- return 0xc001;
+ return 0xc000;
}
1;