Set up PATH and PYTHONPATH correctly then run "python startTLU_v4.py" .
The easiest way of doing this is by using a shell script, e.g.
Command line options:
-bash-4.1$ ./startTLU_v4.sh --helpCommand line arg = --helpPyChips v1.5.0_pre2Usage: startTLU_v4.py [options]Options: -h, --help show this help message and exit -r ROOTFNAME, --rootFname=ROOTFNAME Path of output file -o WRITETIMESTAMPS, --writeTimestamps=WRITETIMESTAMPS Set True to write timestamps to ROOT file -p PRINTTIMESTAMPS, --printTimestamps=PRINTTIMESTAMPS Set True to print timestamps to screen -s LISTENFORTELESCOPESHUTTER, --listenForTelescopeShutter=LISTENFORTELESCOPESHUTTER Set True to veto triggers when shutter goes high -d PULSEDELAY, --pulseDelay=PULSEDELAY Delay added to input triggers. Four 5-bit numbers packed into 32-bt word, Units of 6.25ns -w PULSESTRETCH, --pulseStretch=PULSESTRETCH Width added to input triggers. Four 5-bit numbers packed into 32-bt word. Units of 6.25ns -t TRIGGERPATTERN, --triggerPattern=TRIGGERPATTERN Pattern match to generate trigger. Two 16-bit words packed into 32-bit word. -m DUTMASK, --DUTMask=DUTMASK Three-bit mask selecting which DUTs are active. -y IGNOREDUTBUSY, --ignoreDUTBusy=IGNOREDUTBUSY Three-bit mask selecting which DUTs can veto triggers by setting BUSY high. Low = can veto, high = ignore busy. -i TRIGGERINTERVAL, --triggerInterval=TRIGGERINTERVAL Interval between internal trigers ( in units of 6.25ns ). Set to zero to turn off internal triggers -v THRESHOLDVOLTAGE, --thresholdVoltage=THRESHOLDVOLTAGE Threshold voltage for TLU inputs ( units of volts)
The trigger pattern determines which combination(s) of the four inputs
will cause a trigger. The trigger pattern consists of two 16-bit words
packed into a 32-bit word. The bottom 16-bits control the main trigger,
the top 16-bits control an auxiliary trigger used for monitoring.
Each of the 16 possible combinations of the inputs corresponds to one of
the 16-bits in the trigger pattern. Set a bit in the trigger pattern and
when the corresponding combination of inputs is present the trigger will
fire. For example if it is desired to fire the trigger when input-0 is
active but none of the other inputs ( corresponding to 0b0001 ) then set
bit-1 of the trigger pattern, but none of the others i.e. 0x0002.
Do not set bit zero ( e.g. 0x0001 ) since this will fire the trigger
when no inputs are active.
When startTLU_v4.py is running it responds to three commands:
c : turns on triggers and commences looping round reading out number
of triggers ( and optionally writing to a ROOT file )
f: finishes triggers ( sets a flag to veto triggers)
t: terminates programme ( closes ROOT file and exits )
TORCH Oct 2015 Beam test
Log on to pclhcb50.cern.ch with username loptical , startTLU_v4.sh
should be in the path