<Module name="Combiner" class="hadaq::CombinerModule">
<!-- these parameters will force to create inputs/oputputs of module -->
- <NumInputs value="1"/>
+ <NumInputs value="23"/>
<NumOutputs value="2"/>
- <InputPort name="Input0" url="hadaq://host:50000"/>
- <InputPort name="Input1" url="hadaq://host:10102"/>
- <InputPort name="Input2" url="hadaq://host:10103"/>
- <InputPort name="Input3" url="hadaq://host:10104"/>
- <InputPort name="Input4" url="hadaq://host:10105"/>
-
- <InputPort name="Input*" queue="10">
+ <InputPort name="Input0" url="hadaq://host:50000" thread="UdpThread1"/>
+ <InputPort name="Input1" url="hadaq://host:50001" thread="UdpThread2"/>
+ <InputPort name="Input2" url="hadaq://host:50002" thread="UdpThread3"/>
+ <InputPort name="Input3" url="hadaq://host:50003" thread="UdpThread4"/>
+ <InputPort name="Input4" url="hadaq://host:50004" thread="UdpThread1"/>
+ <InputPort name="Input5" url="hadaq://host:50005" thread="UdpThread2"/>
+ <InputPort name="Input6" url="hadaq://host:50006" thread="UdpThread3"/>
+ <InputPort name="Input7" url="hadaq://host:50007" thread="UdpThread4"/>
+ <InputPort name="Input8" url="hadaq://host:50008" thread="UdpThread1"/>
+ <InputPort name="Input9" url="hadaq://host:50009" thread="UdpThread2"/>
+ <InputPort name="Input10" url="hadaq://host:50010" thread="UdpThread3"/>
+ <InputPort name="Input11" url="hadaq://host:50011" thread="UdpThread4"/>
+ <InputPort name="Input12" url="hadaq://host:50012" thread="UdpThread1"/>
+ <InputPort name="Input13" url="hadaq://host:50013" thread="UdpThread2"/>
+ <InputPort name="Input14" url="hadaq://host:50014" thread="UdpThread3"/>
+ <InputPort name="Input15" url="hadaq://host:50015" thread="UdpThread4"/>
+ <InputPort name="Input16" url="hadaq://host:50016" thread="UdpThread1"/>
+ <InputPort name="Input17" url="hadaq://host:50017" thread="UdpThread2"/>
+ <InputPort name="Input18" url="hadaq://host:50018" thread="UdpThread3"/>
+ <InputPort name="Input19" url="hadaq://host:50019" thread="UdpThread4"/>
+ <InputPort name="Input20" url="hadaq://host:50020" thread="UdpThread1"/>
+ <InputPort name="Input21" url="hadaq://host:50021" thread="UdpThread2"/>
+ <InputPort name="Input22" url="hadaq://host:50022" thread="UdpThread3"/>
+
+ <InputPort name="Input*" queue="10" urlopt="nodebug">
<HadaqUdpBuffer value="200000"/>
<DoShmControl value="false"/>
<HadaqUdpMTU value="64512"/>
<FlushTimeout value="2.0"/>
</InputPort>
- <OutputPort name="Output1" url="hld:///data.local2/dabc.hld?maxsize=1500"/>
+ <OutputPort name="Output1" url="hld:///d/dabc.hld?maxsize=1500"/>
<DoShmControl value="false"/>
<FlushTimeout value="2.0"/>
</Module>
<Module name="OnlineServer" class="hadaq::MbsTransmitterModule" auto="true">
- <NumInputs value="1"/>
+ <NumInputs value="23"/>
<NumOutputs value="1"/>
<InputPort name="Input0" url="Combiner/Output0" queue="10"/>
<TransmitEvents width="4" prec="1" low="0" up="100" debug="1"/>
</Module>
+ <Module name="Term" class="hadaq::TerminalModule" period="0.3" clear="true"/>
+
</Context>
<!--Context name="*">
# Address # S/N # FPGA
# 0x1234 14 0
-
-0xc000 13 0
-0xc001 13 1
-0xc002 13 2
-0xc003 13 3
-0x800d 13 5
-
-
-0x0200 14 0
-0x0201 14 1
-0x0202 14 2
-0x0203 14 3
-0x8000 14 5
-
-
-0x0210 15 0
-0x0211 15 1
-0x0212 15 2
-0x0213 15 3
-0x8001 15 5
-
-0x0220 16 0
-0x0221 16 1
-0x0222 16 2
-0x0223 16 3
-0x8002 16 5
-
-0x0230 17 0
-0x0231 17 1
-0x0232 17 2
-0x0233 17 3
-0x8003 17 5
-
-0x0240 18 0
-0x0241 18 1
-0x0242 18 2
-0x0243 18 3
-0x8004 18 5
-
-0x0250 19 0
-0x0251 19 1
-0x0252 19 2
-0x0253 19 3
-0x8005 19 5
-
-0x0260 20 0
-0x0261 20 1
-0x0262 20 2
-0x0263 20 3
-0x8006 20 5
-
-0x0270 21 0
-0x0271 21 1
-0x0272 21 2
-0x0273 21 3
-0x8007 21 5
-
-0x0280 22 0
-0x0281 22 1
-0x0282 22 2
-0x0283 22 3
-0x8008 22 5
-
-0x0290 23 0
-0x0291 23 1
-0x0292 23 2
-0x0293 23 3
-0x8000 23 5
-
-0x02a0 24 0
-0x02a1 24 1
-0x02a2 24 2
-0x02a3 24 3
-0x8000 24 5
-
-0x02b0 25 0
-0x02b1 25 1
-0x02b2 25 2
-0x02b3 25 3
-0x8000 25 5
-
-0x02c0 26 0
-0x02c1 26 1
-0x02c2 26 2
-0x02c3 26 3
-0x8000 26 5
-
-0x02d0 27 0
-0x02d1 27 1
-0x02d2 27 2
-0x02d3 27 3
-0x8000 27 5
-
-0x02e0 28 0
-0x02e1 28 1
-0x02e2 28 2
-0x02e3 28 3
-0x8000 28 5
-
-
-0x1510 29 0
-0x1511 29 1
-0x1512 29 2
-0x1513 29 3
-0x8015 29 5
-
-0x2010 30 0
-0x2011 30 1
-0x2012 30 2
-0x2013 30 3
-0x8020 30 5
-
-
-0x0310 31 0
-0x0801 31 1
-0x0312 31 2
-0x0313 31 3
-0x8000 31 5
-
-
-0x0310 32 0
-0x0801 32 1
-0x0312 32 2
-0x0313 32 3
-0x8000 32 5
-
-0x1000 33 0
-0x1001 33 1
-0x1002 33 2
-0x1003 33 3
-0x8000 33 5
-
-0x0310 34 0
-0x0801 34 1
-0x0312 34 2
-0x0313 34 3
-0x8000 34 5
-
-0x0310 35 0
-0x0801 35 1
-0x0312 35 2
-0x0313 35 3
-0x8000 35 5
-
-0x0310 36 0
-0x0801 36 1
-0x0312 36 2
-0x0313 36 3
-0x8000 36 5
-
-0x0310 37 0
-0x0801 37 1
-0x0312 37 2
-0x0313 37 3
-0x8000 37 5
-
-0x0310 38 0
-0x0801 38 1
-0x0312 38 2
-0x0313 38 3
-0x8000 38 5
-
-0x0310 39 0
-0x0801 39 1
-0x0312 39 2
-0x0313 39 3
-0x8000 39 5
-
-0x0310 40 0
-0x0801 40 1
-0x0312 40 2
-0x0313 40 3
-0x8000 40 5
-
-0x0310 41 0
-0x0801 41 1
-0x0312 41 2
-0x0313 41 3
-0x8000 41 5
-
-0x0310 42 0
-0x0801 42 1
-0x0312 42 2
-0x0313 42 3
-0x8000 42 5
-
-0x0310 43 0
-0x0311 43 1
-0x0800 43 2
-0x0313 43 3
-0x8000 43 5
-
-0x0310 44 0
-0x0801 44 1
-0x0312 44 2
-0x0313 44 3
-0x8000 44 5
-
-0x0310 45 0
-0x0801 45 1
-0x0312 45 2
-0x0313 45 3
-0x8000 45 5
-
-0x0310 46 0
-0x0801 46 1
-0x0312 46 2
-0x0313 46 3
-0x8000 46 5
-
-#MCP 11
-0x1110 47 0
-0x1111 47 1
-0x1112 47 2
-0x1113 47 3
-0x8011 47 5
-
-0x0310 48 0
-0x0801 48 1
-0x0312 48 2
-0x0313 48 3
-0x8000 48 5
-
-0x0310 49 0
-0x0801 49 1
-0x0312 49 2
-0x0313 49 3
-0x8000 49 5
-
-0x0310 50 0
-0x0801 50 1
-0x0312 50 2
-0x0313 50 3
-0x8000 50 5
-
-0x0310 51 0
-0x0801 51 1
-0x0312 51 2
-0x0313 51 3
-0x8000 51 5
-
-0x0310 52 0
-0x0311 52 1
-0x0312 52 2
-0x0313 52 3
-0x8000 52 5
-
-0x0310 53 0
-0x0311 53 1
-0x0312 53 2
-0x0313 53 3
-0x8000 53 5
-
-0x0310 54 0
-0x0311 54 1
-0x0312 54 2
-0x0313 54 3
-0x8000 54 5
-
-0x0310 55 0
-0x0311 55 1
-0x0312 55 2
-0x0313 55 3
-0x8000 55 5
#CTS
0x8100 56 0
0x8101 56 1
0x8103 56 3
0x7999 56 5
-#MCP 2
-0x0210 57 0
-0x0211 57 1
-0x0212 57 2
-0x0213 57 3
-0x8002 57 5
-
-#MCP TOF back
-0x1710 58 0
-0x1711 58 1
-0x1712 58 2
-0x1713 58 3
-0x8017 58 5
-
-#MCP 12
-0x1210 59 0
-0x1211 59 1
-0x1212 59 2
-0x1213 59 3
-0x8012 59 5
-
-0xc000 60 0
-0xc001 60 1
-0x8004 60 2
-0xc003 60 3
-0x8000 60 5
-
-0xc004 61 0
-0xc005 61 1
-0xc006 61 2
-0xc007 61 3
-0x8001 61 5
-
-0xc008 62 0
-0xc009 62 1
-0xc00a 62 2
-0xc00b 62 3
-0x8002 62 5
-
-0xc00c 63 0
-0xc00d 63 1
-0xc00e 63 2
-0xc00f 63 3
-0x8003 63 5
-
-#MCP TOF back
-0x1810 64 0
-0x1811 64 1
-0x1812 64 2
-0x1813 64 3
-0x8018 64 5
-
-0x0310 65 0
-0x0311 65 1
-0x0312 65 2
-0x0313 65 3
-0x8000 65 5
-
-0x0310 66 0
-0x0311 66 1
-0x0312 66 2
-0x0313 66 3
-0x8000 66 5
-
-0x0310 67 0
-0x0311 67 1
-0x0312 67 2
-0x0313 67 3
-0x8000 67 5
-
-0x0310 68 0
-0x0311 68 1
-0x0312 68 2
-0x0313 68 3
-0x8000 68 5
-
-0x0310 69 0
-0x0311 69 1
-0x0312 69 2
-0x0313 69 3
-0x8000 69 5
-
-0xc000 70 0
-0xc001 70 1
-0xc002 70 2
-0xc003 70 3
-0x8000 70 5
-
-0xc000 71 0
-0xc001 71 1
-0xc002 71 2
-0xc003 71 3
-0x8000 71 5
-
-#MCP 10
-0x1010 72 0
-0x1011 72 1
-0x1012 72 2
-0x1013 72 3
-0x8010 72 5
-
-#MCP 4
-0x0410 73 0
-0x0411 73 1
-0x0412 73 2
-0x0413 73 3
-0x8004 73 5
-
-#MCP TOF back
-0x0910 74 0
-0x0911 74 1
-0x0912 74 2
-0x0913 74 3
-0x8009 74 5
-
-0xc000 75 0
-0xc001 75 1
-0xc002 75 2
-0xc003 75 3
-0x8000 75 5
-
-0xc000 76 0
-0xc001 76 1
-0xc002 76 2
-0xc003 76 3
-0x8000 76 5
-
-0xc000 77 0
-0xc001 77 1
-0xc002 77 2
-0xc003 77 3
-0x8000 77 5
-
-#MCP 7
-0x0710 78 0
-0x0711 78 1
-0x0712 78 2
-0x0713 78 3
-0x8007 78 5
-
-0xc000 79 0
-0xc001 79 1
-0xc002 79 2
-0xc003 79 3
-0x8000 79 5
-
-0xc000 80 0
-0xc001 80 1
-0xc002 80 2
-0xc003 80 3
-0x8000 80 5
-
-0xc000 81 0
-0xc001 81 1
-0xc002 81 2
-0xc003 81 3
-0x8000 81 5
-
-0xc000 82 0
-0xc001 82 1
-0xc002 82 2
-0xc003 82 3
-0x8000 82 5
-
-#MCP 6
-0x0610 83 0
-0x0611 83 1
-0x0612 83 2
-0x0613 83 3
-0x8006 83 5
-
-#MCP 13
-0x1310 84 0
-0x1311 84 1
-0x1312 84 2
-0x1313 84 3
-0x8013 84 5
-
-0xc000 85 0
-0xc001 85 1
-0xc002 85 2
-0xc003 85 3
-0x8000 85 5
-
-#MCP TOF front
-0x1910 86 0
-0x1911 86 1
-0x1912 86 2
-0x1913 86 3
-0x8019 86 5
-
-0xc000 87 0
-0xc001 87 1
-0xc002 87 2
-0xc003 87 3
-0x8000 87 5
-
-0xc000 88 0
-0xc001 88 1
-0xc002 88 2
-0xc003 88 3
-0x8000 88 5
-
-#MCP 1
-0x0110 89 0
-0x0111 89 1
-0x0112 89 2
-0x0113 89 3
-0x8001 89 5
-
-0xc000 90 0
-0xc001 90 1
-0xc002 90 2
-0xc003 90 3
-0x8000 90 5
-
-0xc000 91 0
-0xc001 91 1
-0xc002 91 2
-0xc003 91 3
-0x8000 91 5
-
-0xc000 92 0
-0xc001 92 1
-0xc002 92 2
-0xc003 92 3
-0x8000 92 5
-
-0xc000 93 0
-0xc001 93 1
-0xc002 93 2
-0xc003 93 3
-0x8000 93 5
-
-#MCP TOF front
-0x2010 94 0
-0x2011 94 1
-0x2012 94 2
-0x2013 94 3
-0x8020 94 5
-
-0xc000 95 0
-0xc001 95 1
-0xc002 95 2
-0xc003 95 3
-0x8000 95 5
-
-0x1610 96 0
-0x1611 96 1
-0x1612 96 2
-0x1613 96 3
-0x8016 96 5
-
-#MCP 14
-0x1410 97 0
-0x1411 97 1
-0x1412 97 2
-0x1413 97 3
-0x8014 97 5
-
-0x1210 98 0
-0x1211 98 1
-0x1212 98 2
-0x1213 98 3
-0x8012 98 5
-
-#MCP 3
-0x0310 99 0
-0x0311 99 1
-0x0312 99 2
-0x0313 99 3
-0x8003 99 5
-
-0xc000 100 0
-0xc001 100 1
-0xc002 100 2
-0xc003 100 3
-0x8000 100 5
-
-#Beam counters
-0x1610 101 0
-0x1611 101 1
-0x1612 101 2
-0x1613 101 3
-0x8016 101 5
-
-#MCP 5
-0x0510 102 0
-0x0511 102 1
-0x0512 102 2
-0x0513 102 3
-0x8005 102 5
-
-0xc000 103 0
-0xc001 103 1
-0xc002 103 2
-0xc003 103 3
-0x8000 103 5
-
-#MCP 8
-0x0810 104 0
-0x0811 104 1
-0x0812 104 2
-0x0813 104 3
-0x8008 104 5
-
-#MCP 0
-0x0010 105 0
-0x0011 105 1
-0x0012 105 2
-0x0013 105 3
-0x8000 105 5
-
-0xc000 106 0
-0xc001 106 1
-0xc002 106 2
-0xc003 106 3
-0x8000 106 5
-
-0xc000 107 0
-0xc001 107 1
-0xc002 107 2
-0xc003 107 3
-0x8000 107 5
-
-0x2110 108 0
-0x2111 108 1
-0x2112 108 2
-0x2113 108 3
-0x8021 108 5
-
-#MCP 9
-0x0910 109 0
-0x0911 109 1
-0x0912 109 2
-0x0913 109 3
-0x8009 109 5
-
-0xc000 110 0
-0xc001 110 1
-0xc002 110 2
-0xc003 110 3
-0x8000 110 5
-
-
+# test board 1
+0x0110 83 0
+0x0111 83 1
+0x0112 83 2
+0x0113 83 3
+0x8000 83 5
+
+# test board 2
+0x0210 84 0
+0x0211 84 1
+0x0212 84 2
+0x0213 84 3
+0x8001 84 5
trbcmd w 0x8019 0x8300 0x8019
trbcmd w 0x8020 0x8300 0x8020
trbcmd w 0x8021 0x8300 0x8021
-#trbcmd w 0x8022 0x8300 0x8022
+trbcmd w 0x8022 0x8300 0x8022
trbcmd w 0x7999 0x8103 0xc350 # destination port 50000
trbcmd w 0x8019 0x8103 0xc364
trbcmd w 0x8020 0x8103 0xc365
trbcmd w 0x8021 0x8103 0xc366
-#trbcmd w 0x8022 0x8103 0xc367
+trbcmd w 0x8022 0x8103 0xc367
# source mac
trbcmd w 0x8000 0x8104 0xdead0001
trbcmd w 0x8019 0x8104 0xdead0014
trbcmd w 0x8020 0x8104 0xdead0015
trbcmd w 0x8021 0x8104 0xdead0016
-#trbcmd w 0x8022 0x8104 0xdead0017
+trbcmd w 0x8022 0x8104 0xdead0017
# source IP
trbcmd w 0x8000 0x8106 0xc0a80000
trbcmd w 0x8019 0x8106 0xc0a80013
trbcmd w 0x8020 0x8106 0xc0a80014
trbcmd w 0x8021 0x8106 0xc0a80015
-#trbcmd w 0x8022 0x8106 0xc0a80016
+trbcmd w 0x8022 0x8106 0xc0a80016
void first()
{
-
- base::ProcMgr::instance()->SetRawAnalysis(true);
+ // analysis will work as triggerred -
+ // after each event all data should be processed and flushed
+ base::ProcMgr::instance()->SetTriggeredAnalysis();
hadaq::TdcMessage::SetFineLimits(31, 421);
- hadaq::TrbProcessor* trb3 = new hadaq::TrbProcessor(0);
-
- // CTS subevent header id, all 16 bit
- // trb3->SetHadaqCTSId(0x8000);
-
- // HUB subevent header id, here high 8 bit from 16 should be specified
- // lower 8 bit are used as hub number
- trb3->SetHadaqHUBId(0x9000);
-
- trb3->SetPrintRawData(false);
-
- // set number of errors to be printed, default 1000
- trb3->SetPrintErrors(100);
-
-
- // enable cross processing only when one want to specify reference channel from other TDCs
- // in this case processing 'crosses' border of TDC and need to access data from other TDC
- // trb3->SetCrossProcess(true);
-
- // this is array with available TDCs ids
- // It is required that high 8 bits are the same.
- // These bits are used to separate TDC data from other data kinds
-
- int tdcmap[4] = { 0x0310, 0x0311, 0x0312, 0x0313 };
-
- // TDC subevent header id
- trb3->SetHadaqTDCId(tdcmap[0] & 0xFF00);
-
- for (int cnt=0;cnt<4;cnt++) {
-
- int tdcid = tdcmap[cnt] & 0x00FF;
-
- // verify prefix
- if ((tdcmap[0] & 0xFF00) != (tdcmap[cnt] & 0xFF00)) {
- fprintf(stderr, "!!!! Wrong prefix in TDC%d, do not match with TDC0 %X != %X\n", cnt, (tdcmap[cnt] & 0xFF00), (tdcmap[0] & 0xFF00));
- exit(5);
- }
-
- // create processor for hits from TDC
- // par1 - pointer on trb3 board
- // par2 - TDC number (lower 8 bit from subevent header
- // par3 - number of channels in TDC
- // par4 - edges mask 0x1 - rising, 0x2 - trailing, 0x3 - both edges
- hadaq::TdcProcessor* tdc = new hadaq::TdcProcessor(trb3, tdcid, 65, 0x1);
-
- if (cnt==0) {
- int channels[] = {33, 34, 35, 36, 0};
- tdc->CreateHistograms( channels );
-
- tdc->SetRefChannel(34, 0, 0xffff, 10000, -500., 500., true);
- //tdc->SetRefChannel(35, 34, 0xffff, 10000, -500., 500., true);
-
- //tdc->SetRefChannel(36, 35, 0xffff, 10000, -500., 500., true);
-
- tdc->SetRefChannel(35, 33, 0xffff, 10000, -10., 400., true);
- tdc->SetRefChannel(36, 35, 0xffff, 10000, -10., 400., true);
- // IMPORTANT: for both channels references should be already specified
- tdc->SetDoubleRefChannel(36, 35, 1000, -10., 500., 1000, -10., 200.);
- }
-
- if (cnt==3) {
- int channels[] = {1, 2, 3, 4, 0};
- tdc->CreateHistograms( channels );
- tdc->SetRefChannel(1, 3, 0xffff, 10000, -50., 50., true);
- tdc->SetRefChannel(2, 4, 0xffff, 10000, -50., 50., true);
-
- }
-
-
- // specify reference channel for any other channel -
- // will appear as additional histogram with time difference between channels
- // for (int n=2;n<65;n=n+2)
- // tdc->SetRefChannel(n, n-1);
-
- // one also able specify reference from other TDCs
- // but one should enable CrossProcessing for trb3
- // Here we set as reference channel 0 on tdc 1
- // tdc->SetRefChannel(0, 0, 1);
-
- // for old FPGA code one should have epoch for each hit, no longer necessary
- // tdc->SetEveryEpoch(true);
-
-
- // next parameters are about time calibration - there are two possibilities
- // 1) automatic calibration after N hits in every enabled channel
- // 2) generate calibration on base of provided data and than use it later statically for analysis
-
- // disable calibration for channel #0
- //tdc->DisableCalibrationFor(0);
-
- // load static calibration at the beginning of the run
- // tdc->LoadCalibration(Form("tdc2_%04x.cal", tdcmap[cnt]));
-
- // calculate and write static calibration at the end of the run
- // tdc->SetWriteCalibration(Form("tdc3_%04x.cal", tdcmap[cnt]));
-
- // enable automatic calibration, specify required number of hits in each channel
- tdc->SetAutoCalibration(100000);
-
- // this will be required only when second analysis step will be introduced
- // and one wants to select only hits around some trigger signal for that analysis
-
- // method set window for all TDCs at the same time
- //trb->SetTriggerWindow(-4e-7, -3e-7);
-
-#ifdef __GO4ANAMACRO__
- int numx = 1;
- int numy = 1;
- while ((numx * numy) < tdc->NumChannels()) {
- if (numx==numy) numx++; else numy++;
- }
-
- TGo4Picture** pic = new TGo4Picture*[tdc->GetNumHist()];
- int* piccnt = new int[tdc->GetNumHist()];
- for (int k=0;k<tdc->GetNumHist();k++) {
- pic[k] = new TGo4Picture(Form("TDC%d_%s",tdcid, tdc->GetHistName(k)), Form("All %s", tdc->GetHistName(k)));
- pic[k]->SetDivision(numy,numx);
- piccnt[k] = 0;
- }
- for (int n=0;n<tdc->NumChannels();n++) {
- int x = n % numx;
- int y = n / numx;
- for (int k=0;k<tdc->GetNumHist();k++) {
- TObject* obj = (TObject*) tdc->GetHist(n, k);
- if (obj) piccnt[k]++;
- pic[k]->Pic(y,x)->AddObject(obj);
- }
- }
- for (int k=0;k<tdc->GetNumHist();k++) {
- if (piccnt[k] > 0) go4->AddPicture(pic[k]);
- else delete pic[k];
- }
- delete[] pic;
- delete[] piccnt;
-
-#endif
-
- }
-
-
- // This is a method to regularly invoke macro, where arbitrary action can be performed
- // One could specify period in seconds or function will be called for every event processed
-
- // new THookProc("my_hook();", 2.5);
-
-}
-
-
-
-// this is example of hook function
-// here one gets access to all tdc processors and obtains Mean and RMS
-// value on the first channel for each TDC and prints on the display
-
-void my_hook()
-{
- hadaq::TrbProcessor* trb3 = base::ProcMgr::instance()->FindProc("TRB0");
- if (trb3==0) return;
-
- printf("Do extra work NUM %u\n", trb3->NumSubProc());
-
- for (unsigned ntdc=0;ntdc<trb3->NumSubProc();ntdc++) {
-
- hadaq::TdcProcessor* tdc = trb3->GetSubProc(ntdc);
- if (tdc==0) continue;
-
- TH1* hist = (TH1*) tdc->GetChannelRefHist(1);
-
- printf(" TDC%u mean:%5.2f rms:%5.2f\n", tdc->GetBoardId(), hist->GetMean(), hist->GetRMS());
-
- tdc->ClearChannelRefHist(1);
- }
+ hadaq::HldProcessor* hld = new hadaq::HldProcessor();
+
+ // Following levels of histograms filling are supported
+ // 0 - none
+ // 1 - only basic statistic from TRB
+ // 2 - generic statistic over TDC channels
+ // 3 - basic per-channel histograms with IDs
+ // 4 - per-channel histograms with references
+ // trb3->SetHistFilling(4);
+
+ // Load calibrations for ALL TDCs
+ /// trb3->LoadCalibrations("/data.local1/padiwa/new_");
+
+ // calculate and write calibrations at the end of the run
+ //trb3->SetWriteCalibrations("/data.local1/padiwa/new_");
+
+ // enable automatic calibrations of the channels
+ //trb3->SetAutoCalibrations(100000);
+
+
+ hadaq::TrbProcessor* trb3 = new hadaq::TrbProcessor(0x8000, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x0010, 0x0011, 0x0012, 0x0013);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8001, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x0110, 0x0111, 0x0112, 0x0113);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8002, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x0210, 0x0211, 0x0212, 0x0213);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8003, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x0310, 0x0311, 0x0312, 0x0313);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8004, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x0410, 0x0411, 0x0412, 0x0413);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8005, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x0510, 0x0511, 0x0512, 0x0513);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8006, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x0610, 0x0611, 0x0612, 0x0613);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8007, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x0710, 0x0711, 0x0712, 0x0713);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8008, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x0810, 0x0811, 0x0812, 0x0813);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8009, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x0910, 0x0911, 0x0912, 0x0913);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8010, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x1010, 0x1011, 0x1012, 0x1013);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8011, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x1110, 0x1111, 0x1112, 0x1113);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8012, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x1210, 0x1211, 0x1212, 0x1213);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8013, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x1310, 0x1311, 0x1312, 0x1313);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8014, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x1410, 0x1411, 0x1412, 0x1413);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8015, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x1510, 0x1511, 0x1512, 0x1513);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8016, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x1610, 0x1611, 0x1612, 0x1613);
+ // trb3->SetWriteCalibrations("calibr_");
+ //trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8017, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x1710, 0x1711, 0x1712, 0x1713);
+ // trb3->SetWriteCalibrations("calibr_");
+ //trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8018, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x1810, 0x1811, 0x1812, 0x1813);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8019, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x1910, 0x1911, 0x1912, 0x1913);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8020, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x2010, 0x2011, 0x2012, 0x2013);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ trb3 = new hadaq::TrbProcessor(0x8021, hld);
+ trb3->SetHistFilling(2);
+ trb3->CreateTDC(0x2110, 0x2111, 0x2112, 0x2113);
+ // trb3->SetWriteCalibrations("calibr_");
+ // trb3->LoadCalibrations("calibr_");
+
+ // indicate if raw data should be printed
+ hld->SetPrintRawData(false);
+
+
+ // method set window for all TRBs/TDCs
+ // hld->SetTriggerWindow(-4e-7, -0.2e-7);
+
+ // uncomment these line to enable store of all TDC data in the tree
+ // hld->SetStoreEnabled(true);
+
+ // create store - typically done in second.C, should be called only once
+ // base::ProcMgr::instance()->CreateStore("file.root");
}
foreach (@padiwas) {
my $pid = $pm->start and next;
print "$_ ";
- my $c="/home/hadaq/trbsoft/daqtools/padiwa.pl $_ 0 invert 0xffff >/dev/null";
- qx($c); die "could not execute command $c" if $?;
+ #y $c="/home/hadaq/trbsoft/daqtools/padiwa.pl $_ 0 invert 0xffff >/dev/null";
+ my $c="/home/hadaq/trbsoft/daqtools/padiwa.pl $_ 0 invert 0xffff 1>/dev/null";
+ #my $c="/home/hadaq/trbsoft/daqtools/padiwa.pl $_ 0 temp";
+ my $r = qx($c);
+ die "could not execute command $c" if $?;
+ print $r;
+
$pm->finish; # Terminates the child process
};
$pm->wait_all_children;
$pm->finish; # Terminates the child process
};
+$pm->wait_all_children;
+print "\n";
+
+print "padiwas: set temp compensation to 0x02c0: ";
+
+foreach (@padiwas) {
+ my $pid = $pm->start and next;
+ print "$_ ";
+ my $c="/home/hadaq/trbsoft/daqtools/padiwa.pl $_ 0 comp 0x02c0 >/dev/null";
+ qx($c); die "could not execute command $c" if $?;
+ $pm->finish; # Terminates the child process
+};
+
$pm->wait_all_children;
print "\n";
!Value table
# Hub # Type # lower 32 channels # upper 32 channels #
#################################################################
- 0x0010 0 0xffffffff 0x00000000
- 0x0011 0 0xffffffff 0x00000000
- 0x0012 0 0xffffffff 0x00000000
- 0x0013 0 0xffffffff 0x00000000
-
0x0110 0 0xffffffff 0x00000000
0x0111 0 0xffffffff 0x00000000
0x0112 0 0xffffffff 0x00000000
0x0212 0 0xffffffff 0x00000000
0x0213 0 0xffffffff 0x00000000
- 0x0310 0 0xffffffff 0x00000000
- 0x0311 0 0xffffffff 0x00000000
- 0x0312 0 0xffffffff 0x00000000
- 0x0313 0 0xffffffff 0x00000000
-
- 0x0410 0 0xffffffff 0x00000000
- 0x0411 0 0xffffffff 0x00000000
- 0x0412 0 0xffffffff 0x00000000
- 0x0413 0 0xffffffff 0x00000000
-
- 0x0510 0 0xffffffff 0x00000000
- 0x0511 0 0xffffffff 0x00000000
- 0x0512 0 0xffffffff 0x00000000
- 0x0513 0 0xffffffff 0x00000000
-
- 0x0610 0 0xffffffff 0x00000000
- 0x0611 0 0xffffffff 0x00000000
- 0x0612 0 0xffffffff 0x00000000
- 0x0613 0 0xffffffff 0x00000000
-
- 0x0710 0 0xffffffff 0x00000000
- 0x0711 0 0xffffffff 0x00000000
- 0x0712 0 0xffffffff 0x00000000
- 0x0713 0 0xffffffff 0x00000000
-
- 0x0810 0 0xffffffff 0x00000000
- 0x0811 0 0xffffffff 0x00000000
- 0x0812 0 0xffffffff 0x00000000
- 0x0813 0 0xffffffff 0x00000000
-
- 0x0910 0 0xffffffff 0x00000000
- 0x0911 0 0xffffffff 0x00000000
- 0x0912 0 0xffffffff 0x00000000
- 0x0913 0 0xffffffff 0x00000000
-
- 0x1010 0 0xffffffff 0x00000000
- 0x1011 0 0xffffffff 0x00000000
- 0x1012 0 0xffffffff 0x00000000
- 0x1013 0 0xffffffff 0x00000000
-
- 0x1110 0 0xffffffff 0x00000000
- 0x1111 0 0xffffffff 0x00000000
- 0x1112 0 0xffffffff 0x00000000
- 0x1113 0 0xffffffff 0x00000000
-
- 0x1210 0 0xffffffff 0x00000000
- 0x1211 0 0xffffffff 0x00000000
- 0x1212 0 0xffffffff 0x00000000
- 0x1213 0 0xffffffff 0x00000000
-
- 0x1310 0 0xffffffff 0x00000000
- 0x1311 0 0xffffffff 0x00000000
- 0x1312 0 0xffffffff 0x00000000
- 0x1313 0 0xffffffff 0x00000000
-
- 0x1410 0 0xffffffff 0x00000000
- 0x1411 0 0xffffffff 0x00000000
- 0x1412 0 0xffffffff 0x00000000
- 0x1413 0 0xffffffff 0x00000000
-
- 0x1510 0 0xffffffff 0x00000000
- 0x1511 0 0xffffffff 0x00000000
- 0x1512 0 0x00000000 0x00000000
- 0x1513 0 0x00000000 0x00000000
-
-#for now: disable TDC for both SciFis
-
- 0x1610 0 0x00000000 0x00000000
- 0x1611 0 0x00000000 0x00000000
- 0x1612 0 0x00000000 0x00000000
- 0x1613 0 0x00000000 0x00000000
-
- 0x2110 0 0x00000000 0x00000000
- 0x2111 0 0x00000000 0x00000000
- 0x2112 0 0x00000000 0x00000000
- 0x2113 0 0x00000000 0x00000000
-
-# single pixels from MCP-TOF Sensor 1341 10um downstream
- 0x1710 0 0xffffffff 0x00000000
- 0x1711 0 0xffffffff 0x00000000
- 0x1712 0 0xffffffff 0x00000000
- 0x1713 0 0xffffffff 0x00000000
-
-# single pixels from MCP-TOF Sensor 1340 25um upstream
- 0x1910 0 0xffffffff 0x00000000
- 0x1911 0 0xffffffff 0x00000000
- 0x1912 0 0xffffffff 0x00000000
- 0x1913 0 0xffffffff 0x00000000
-
-# only 2 MCP-Out chan on first TDC 1810 chan1(1,2) and chan3(5,6) #2,6 = leading edge
- 0x1810 0 0x00000033 0x00000000
- 0x1811 0 0x00000000 0x00000000
- 0x1812 0 0x00000000 0x00000000
- 0x1813 0 0x00000000 0x00000000
-
-# only 1 MCP-Out chan on first TDC 2010 chan1 (1,2) 2=leading edge
- 0x2010 0 0x00000003 0x00000000
- 0x2011 0 0x00000000 0x00000000
- 0x2012 0 0x00000000 0x00000000
- 0x2013 0 0x00000000 0x00000000
-
-
-
# 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 0xFDE8 0x578 1 0 1 1 0x1
- 0x8000 0 0x8000 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8001 0 0x8001 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8002 0 0x8002 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8003 0 0x8003 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8004 0 0x8004 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8005 0 0x8005 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8006 0 0x8006 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8007 0 0x8007 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8008 0 0x8008 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8009 0 0x8009 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8010 0 0x8010 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8011 0 0x8011 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8012 0 0x8012 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8013 0 0x8013 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8014 0 0x8014 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8015 0 0x8015 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8016 0 0x8016 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8017 0 0x8017 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8018 0 0x8018 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8019 0 0x8019 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8020 0 0x8020 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
- 0x8021 0 0x8021 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
-#0x8022 0 0x8022 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
-#0x8023 0 0x8023 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
-#0x8024 0 0x8024 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
-#0x8025 0 0x8025 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0
\ No newline at end of file
+ 0x7999 0 0x7999 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x1
+ 0x8000 0 0x8000 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0
+ 0x8001 0 0x8001 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0
+# 0x8002 0 0x8002 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0
+# 0x8003 0 0x8003 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0
+# 0x8004 0 0x8004 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0
+# 0x8005 0 0x8005 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0
+# 0x8006 0 0x8006 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0
+# 0x8007 0 0x8007 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0
+# 0x8008 0 0x8008 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0
+# 0x8009 0 0x8009 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0
+# 0x8010 0 0x8010 0x00020001 0x00030064 0x1DE8 0x578 1 0 1 1 0x0
+# 0x8011 0 0x8011 0x00020001 0x00030064 0x1DE8 0x578 1 0 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
# Hub # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 #
########################################################################################################################################
- 0x7999 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc350 0xdead8000 0x001b 0xc0a80000 0xc350 0x0578
- 0x8000 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc351 0xdead8001 0x001b 0xc0a80001 0xc351 0x0578
- 0x8001 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc352 0xdead8002 0x001b 0xc0a80002 0xc352 0x0578
- 0x8002 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc353 0xdead8003 0x001b 0xc0a80003 0xc353 0x0578
- 0x8003 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc354 0xdead8004 0x001b 0xc0a80004 0xc354 0x0578
- 0x8004 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc355 0xdead8005 0x001b 0xc0a80005 0xc355 0x0578
- 0x8005 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc356 0xdead8006 0x001b 0xc0a80006 0xc356 0x0578
- 0x8006 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc357 0xdead8007 0x001b 0xc0a80007 0xc357 0x0578
- 0x8007 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc358 0xdead8008 0x001b 0xc0a80008 0xc358 0x0578
- 0x8008 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc359 0xdead8009 0x001b 0xc0a80009 0xc359 0x0578
- 0x8009 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc35a 0xdead8010 0x001b 0xc0a80010 0xc35a 0x0578
- 0x8010 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc35b 0xdead8011 0x001b 0xc0a80011 0xc35b 0x0578
- 0x8011 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc35c 0xdead8012 0x001b 0xc0a80012 0xc35c 0x0578
- 0x8012 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc35d 0xdead8013 0x001b 0xc0a80013 0xc35d 0x0578
- 0x8013 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc35e 0xdead8014 0x001b 0xc0a80014 0xc35e 0x0578
- 0x8014 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc35f 0xdead8015 0x001b 0xc0a80015 0xc35f 0x0578
- 0x8015 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc360 0xdead8016 0x001b 0xc0a80016 0xc360 0x0578
- 0x8016 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc361 0xdead8017 0x001b 0xc0a80017 0xc361 0x0578
- 0x8017 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc362 0xdead8018 0x001b 0xc0a80018 0xc362 0x0578
- 0x8018 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc363 0xdead8019 0x001b 0xc0a80019 0xc363 0x0578
- 0x8019 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc364 0xdead8020 0x001b 0xc0a80020 0xc364 0x0578
- 0x8020 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc365 0xdead8021 0x001b 0xc0a80021 0xc365 0x0578
- 0x8021 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc366 0xdead8022 0x001b 0xc0a80022 0xc366 0x0578
-#0x8022 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc367 0xdead8023 0x001b 0xc0a80023 0xc367 0x0578
-#0x8023 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc368 0xdead8024 0x001b 0xc0a80024 0xc368 0x0578
-#0x8024 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc369 0xdead8025 0x001b 0xc0a80025 0xc369 0x0578
-#0x8025 0 0x52ba16a6 0xd4ae 0xc0a80001 0xc36a 0xdead8026 0x001b 0xc0a80026 0xc36a 0x0578
+ 0x7999 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc350 0xdead8000 0x001b 0xc0a80000 0xc350 0x0578
+ 0x8000 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc351 0xdead8001 0x001b 0xc0a80001 0xc351 0x0578
+ 0x8001 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc352 0xdead8002 0x001b 0xc0a80002 0xc352 0x0578
+# 0x8002 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc353 0xdead8003 0x001b 0xc0a80003 0xc353 0x0578
+# 0x8003 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc354 0xdead8004 0x001b 0xc0a80004 0xc354 0x0578
+# 0x8004 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc355 0xdead8005 0x001b 0xc0a80005 0xc355 0x0578
+# 0x8005 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc356 0xdead8006 0x001b 0xc0a80006 0xc356 0x0578
+# 0x8006 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc357 0xdead8007 0x001b 0xc0a80007 0xc357 0x0578
+# 0x8007 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc358 0xdead8008 0x001b 0xc0a80008 0xc358 0x0578
+# 0x8008 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc359 0xdead8009 0x001b 0xc0a80009 0xc359 0x0578
+# 0x8009 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc35a 0xdead8010 0x001b 0xc0a80010 0xc35a 0x0578
+# 0x8010 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc35b 0xdead8011 0x001b 0xc0a80011 0xc35b 0x0578
+# 0x8011 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc35c 0xdead8012 0x001b 0xc0a80012 0xc35c 0x0578
+# 0x8012 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc35d 0xdead8013 0x001b 0xc0a80013 0xc35d 0x0578
+# 0x8013 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc35e 0xdead8014 0x001b 0xc0a80014 0xc35e 0x0578
+# 0x8014 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc35f 0xdead8015 0x001b 0xc0a80015 0xc35f 0x0578
+# 0x8015 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc360 0xdead8016 0x001b 0xc0a80016 0xc360 0x0578
+# 0x8016 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc361 0xdead8017 0x001b 0xc0a80017 0xc361 0x0578
+# 0x8017 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc362 0xdead8018 0x001b 0xc0a80018 0xc362 0x0578
+# 0x8018 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc363 0xdead8019 0x001b 0xc0a80019 0xc363 0x0578
+# 0x8019 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc364 0xdead8020 0x001b 0xc0a80020 0xc364 0x0578
+# 0x8020 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc365 0xdead8021 0x001b 0xc0a80021 0xc365 0x0578
+# 0x8021 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc366 0xdead8022 0x001b 0xc0a80022 0xc366 0x0578
+#0x8022 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc367 0xdead8023 0x001b 0xc0a80023 0xc367 0x0578
+#0x8023 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc368 0xdead8024 0x001b 0xc0a80024 0xc368 0x0578
+#0x8024 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc369 0xdead8025 0x001b 0xc0a80025 0xc369 0x0578
+#0x8025 0 0x7a0b83ca 0x0cc4 0xc0a80002 0xc36a 0xdead8026 0x001b 0xc0a80026 0xc36a 0x00cc4
+
+
+# 0x7999 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
+
+
use Getopt::Long;
my $help = "";
-my $dataPath = "/data.local2/";
+my $dataPath = "/d/";
my $source1 = "50000"; # don't use 50001
my $source2 = "50002"; # it is assigned for GbE debug
my $source3 = "50003";
$c=qq|pkill -f "daq_netmem -S $label"|; qx($c); # if any, kill existing daq_netmem
-$c=qq|xterm -geometry 122x14-0+0 -e bash -c 'daq_evtbuild -S $label -m 22 -x te -d file -o $dataPath'|;
-#$c=qq|xterm -geometry 122x14-0+0 -e bash -c 'daq_evtbuild -S $label -m 1 -d file -o $dataPath'|;
-print $c;
+#$c=qq|xterm -geometry 122x14-0+0 -e bash -c 'daq_evtbuild -S $label -m 2 -x cc -d file -o $dataPath'|;
+$c=qq|xterm -geometry 122x16-0+0 -e bash -c 'daq_evtbuild -S $label -m 23 -x cc -d file -o $dataPath'|;
+#print $c;
system("$c &");
sleep 1;
-#$c=qq"xterm -geometry 82x17-0+210 -e bash -c 'daq_netmem -S $label -m 1 -i UDP:127.0.0.1:50000 '";
-$c=qq"xterm -geometry 82x17-0+210 -e bash -c 'daq_netmem -S $label -m 22 -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 -i UDP:127.0.0.1:50009 -i UDP:127.0.0.1:50010 -i UDP:127.0.0.1:50011 -i UDP:127.0.0.1:50012 -i UDP:127.0.0.1:50013 -i UDP:127.0.0.1:50014 -i UDP:127.0.0.1:50015 -i UDP:127.0.0.1:50016 -i UDP:127.0.0.1:50017 -i UDP:127.0.0.1:50018 -i UDP:127.0.0.1:50019 -i UDP:127.0.0.1:50020 -i UDP:127.0.0.1:50021
- '";
+#$c=qq"xterm -geometry 82x17-0+210 -e bash -c 'daq_netmem -S $label -m 2 -i UDP:127.0.0.1:50016 -i UDP:127.0.0.1:50022 '";
+$c=qq"xterm -geometry 82x44-0+234 -e bash -c 'daq_netmem -S $label -m 23 -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 -i UDP:127.0.0.1:50009 -i UDP:127.0.0.1:50010 -i UDP:127.0.0.1:50011 -i UDP:127.0.0.1:50012 -i UDP:127.0.0.1:50013 -i UDP:127.0.0.1:50014 -i UDP:127.0.0.1:50015 -i UDP:127.0.0.1:50016 -i UDP:127.0.0.1:50017 -i UDP:127.0.0.1:50018 -i UDP:127.0.0.1:50019 -i UDP:127.0.0.1:50020 -i UDP:127.0.0.1:50021 -i UDP:127.0.0.1:50022; sleep 2'";
+
+
#$c=qq"xterm -geometry 82x17-0+210 -e bash -c 'daq_netmem -S $label -m 2 -i UDP:127.0.0.1:50000 -i UDP:127.0.0.1:50002'";
system("$c &");
fi
#export TRB3_SERVER=trb056
+
+
export DAQOPSERVER=localhost:56
+#export DAQOPSERVER=localhost
echo -n "- number of trb endpoints in the system: "
trbcmd i 0xffff | wc -l
##################################################
trbcmd w 0xff7f 0x8308 0xffffff # Trigger counter
+trbcmd w 0xff7f 0x830e 0x10
+
~/trbsoft/daqtools/tools/loadregisterdb.pl register_configgbe.db
~/trbsoft/daqtools/tools/loadregisterdb.pl register_configgbe_ip.db
#trbcmd w 0xfe48 0xc800 0x00003000 ## Triggerless mode
#trbcmd w 0xfe48 0xc801 0x000f0005 ## trigger window enable & trigger window width
-trbcmd w 0xfe48 0xc800 0x00000001 ## logic analyser control register
+#trbcmd w 0xfe48 0xc800 0x00000001 ## logic analyser control register
+trbcmd w 0xfe48 0xc800 0x00001001 ## 2014-10-02 disable the "triggered mode"
trbcmd w 0xfe48 0xc801 0x80620062 ## triggerwindow +/-490ns ;5ns granularity
+#trbcmd w 0xfe48 0xc801 0x801e001e ## triggerwindow +/-150ns ;5ns granularity
trbcmd w 0xfe48 0xc802 0x00000000 ## channel 01-32 enable
trbcmd w 0xfe48 0xc803 0x00000000 ## channel 33-64 enable
trbcmd w 0xfe48 0xc804 0x00000080 ## data transfer limit
+#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 0xfe48 0xc802 0xffffffff ## channel 01-32 enable
+trbcmd w 0x1510 0xc804 0x00000080 ## data transfer limit for 0x1510
+
##################################################
## Other Settings
##################################################
#trbcmd w 0xffff 0x20 0x33
-~/trbsoft/daqtools/users/gsi_dirc/prepare_padiwas_invert_leds.pl "0x010 0x011 0x012 0x013 0x110 0x111 0x112 0x113 0x210 0x211 0x212 0x213 0x310 0x311 0x312 0x313 0x410 0x411 0x412 0x413 0x510 0x511 0x512 0x513 0x610 0x611 0x612 0x613 0x710 0x711 0x712 0x713 0x810 0x811 0x812 0x813 0x910 0x911 0x912 0x913 0x1010 0x1011 0x1012 0x1013 0x1110 0x1111 0x1112 0x1113 0x1210 0x1211 0x1212 0x1213 0x1310 0x1311 0x1312 0x1313 0x1410 0x1411 0x1412 0x1413"
+#~/trbsoft/daqtools/users/gsi_dirc/prepare_padiwas_invert_leds.pl "0x010 0x011 0x012 0x013 0x110 0x111 0x112 0x113 0x210 0x211 0x212 0x213 0x310 0x311 0x312 0x313 0x410 0x411 0x412 0x413 0x510 0x511 0x512 0x513 0x610 0x611 0x612 0x613 0x710 0x711 0x712 0x713 0x810 0x811 0x812 0x813 0x910 0x911 0x912 0x913 0x1010 0x1011 0x1012 0x1013 0x1110 0x1111 0x1112 0x1113 0x1210 0x1211 0x1212 0x1213 0x1310 0x1311 0x1312 0x1313 0x1410 0x1411 0x1412 0x1413 0x1610 0x1611 0x1612 0x1613 0x2110 0x2111 0x2112 0x2113"
+# aug2014: no SciFis
+~/trbsoft/daqtools/users/gsi_dirc/prepare_padiwas_invert_leds.pl "0x010 0x011 0x012 0x013 0x110 0x111 0x112 0x113 0x210 0x211 0x212 0x213"
# enable used channels
echo "- turn on/off TDC-channels"
~/trbsoft/daqtools/tools/loadregisterdb.pl register_config_tdc.db
-
+#~/trbsoft/daqtools/tools/loadregisterdb.pl register_config_tdc_scifi_mcp1.db
+#~/trbsoft/daqtools/tools/loadregisterdb.pl register_config_tdc_scifi_mcp2.db
+#echo "-done"
# disable all channels
#trbcmd w 0xfe48 0xc802 0x00000000
# pulser #1 to 1k Hz
#trbcmd w 0x8000 0xa140 0x0001869f
+trbcmd w 0x7fff 0xa14f 0x000007cf
# pulser enable
-#trbcmd setbit 0x8000 0xa101 0x2
+trbcmd setbit 0x7999 0xa101 0x2
#trbcmd clearbit 0x8000 0xa101 0x3
# divert TDC inputs to the CTS for trigger
trbcmd setbit 0xfe48 0xcf00 0x1
-echo "- setting trigger rate register in TDC";
-# trigger rate 150Hz
-trbcmd w 0x7999 0xa150 0x100000
#trbcmd setbit 0x8000 0xa1d4 0x10000 ## ???
# set proto MCP 0-14 thresholds
-echo "- loading proto MCP-PMT 0-14 thresholds..."
+echo "- loading proto MCP-PMT 0-14 thresholds from old scan with 1mV delta..."
cd ~/trbsoft/daqtools/thresholds/
-./load_thresh.sh
+# 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
+###./load_thresh_sep2014-2mV-new.sh # 2mV starting evening Sep 9
+###./load_thresh_2015.sh # 2mV starting evening Sep 10
+# ./load_thresh_scifi.sh # 3mV
#set MCPTOF thresholds
-echo "- loading proto MCP-TOF thresholds..."
-cd ~/trbsoft/daqtools/thresholds/
-./write_thresholds.pl MCPTOF_all_thresholds_zero.log -o 0 >> /dev/null
-./write_thresholds.pl MCPTOF_all_thresholds_zero.log -o 1500 >> /dev/null # =75mV after amp
+# 2015 echo "- loading proto MCP-TOF thresholds..."
+# 2015cd ~/trbsoft/daqtools/thresholds/
+
+
+# Finger weg Fred!
+
+# TOF2 TOF2out TOF1 TOF1out
+## 2015 ./load_thresh_mcptof.sh 1500 1500 1500 1500
+
+#./write_thresholds.pl MCPTOF_all_thresholds_zero.log -o 0 >> /dev/null
+#./write_thresholds.pl MCPTOF_all_thresholds_zero.log -o 1500 >> /dev/null # =75mV after amp
+# # special threshold for MCP-out front
+#./load_thresh_mcptof.sh 1500 1500
+# ./write_thresholds.pl MCPTOF_all_thresholds_zero_2010.log -o 0x2ee >> /dev/null # =37.5mV after amp
#8103 3
#trbcmd clearbit 0x8103 0xc1 0xf6
#trbcmd clearbit 0x8103 0xc3 0xf6
echo "ready to go"
+
+#echo "- setting trigger rate register in TDC";
+# trigger rate 1500Hz
+#trbcmd w 0x7999 0xa150 0x10000
#default cts endpoint. can be overriden by a command line parameter
sub getDefaultEndpoint {
- return 0x8000;
+ return 0x7999;
}
1;