Setting up the TPAC DAQ software for CERN ========================================= From epsun1/tpacmon, then ssh onto the other PCs using the aliases daq0, daq3 and daq4. On each of these, then cd onlineCern The files src/runnerDefine.icc in each directory defined what that directory will do. The master working directory on calicedaq0 connects to the master USB_DAQ directly and sets up sockets to the other PCs, as shown by #define DAQ_ILC_TIMING #define MPS_LOCATION MpsLocation::cernMaster #define MPS_SKT "192.168.1.103" // calicedaq3 #define MPS_SKT1 "192.168.1.102" // calicedaq4 Another socket can be added using MPS_SKT2. The working directories on the other PCs simply answer the socket and read out any sensor USB_DAQs attached. Hence, they have only #define DAQ_ILC_TIMING #define MPS_LOCATION MpsLocation::cernSlave0 #define MPS_READOUT_OFFSET 0 for example on calicedaq3, and calicedaq4 is cernSlave1. The last line here is book-keeping and should be set to the number of USB_DAQs on the slave PCs prior the one under consideration. (This is not critical unless running a slave USB_DAQ without a sensor PCB plugged in, which is not likely.) In doing a buildAll on the PCs, then both runner and sktReadout are built. The former is run on the master PC and the latter on the slave PCs, although the slave PC runner programs should work for standalone runs using only that PC if needed. The DAQ is started on the slaves using startSkt and on the master PC by startUp In all cases, ActiveLog.out and .err are links to the current log files for the PC; they are all written to the central disk on calicedaq0. The main two runs defined so far are mpsBeam and mpsBeamThresholdScan. Both allow varying thresholds; the latter scans the threshold of the inner two layers during the run while the former keeps them fixed. The inner two are defined to be the USB_DAQs with addresses 2 and 3 on the assumption that the layers are labelled with addresses 0-5. The version number is used as mpsBeam: v = 16*j+i, where i,j = 0-15. The threshold for the outer four sensors is set to 100+10*i and for the inner two is 100+10*j. The default is v=85, which is i=5 and j=5, i.e. all thresholds set to 150. mpsBeamThresholdScan: v = 16*j+i, where again the outer threshold is fixed and set to 100+10*i, while the inner thresholds are stepped from 100 to 260 in steps of size j+1. The default is v=149, which is i=5 and j=9, i.e. the outer thresholds are set to 150 while the inner thresholds are scanned in steps of 10, meaning 16 steps with values 100, 110, 120 ... 240, 250. The critical timing for the system is that the bunchTrainActive signals coincide in time for all USB_DAQ boards. This TTL signal is output on pin pair 6 (numbered 0-7) of PL21; see http:// There may be jitter at the level of one 25ns clock period, but otherwise they should all align at both the initial and final edge. The spill veto can be used to hold off from issuing the next bunch train while the SpillLevel is low. This is activated by changing the src/runnerDefine.icc on the master PC to uncomment #define MPS_SPILL_INPUT 7 where the 7 should be set to whichever pin pair is used for the SpillLevel TTL input on PL20. The DAQ will then hang while the level is low until either the level goes high or a timeout occurs (currently set to 20 secs, longer than the usual spill at CERN). In either case, a bunchTrainStart is then issued, so that some very low rate of bunch trains will be taken even if the SpillLevel signal disappears. The SpillLevel itself is recorded together with the PMT information so that the SpillLevel status throughout a bunch train can be known offline.