Exemplo n.º 1
0
                  help="Specify Output Filename",
                  metavar="filename")
parser.add_option("--perchannel",
                  action="store_true",
                  dest="perchannel",
                  help="Run a per-channel VT1 scan",
                  metavar="perchannel")
parser.add_option(
    "--trkdata",
    action="store_true",
    dest="trkdata",
    help=
    "Run a per-VFAT VT1 scan using tracking data (default is to use trigger data)",
    metavar="trkdata")

(options, args) = parser.parse_args()

if options.vt2 not in range(256):
    print "Invalid VT2 specified: %d, must be in range [0,255]" % (options.vt2)
    exit(1)

if options.debug:
    uhal.setLogLevelTo(uhal.LogLevel.DEBUG)
else:
    uhal.setLogLevelTo(uhal.LogLevel.ERROR)

import ROOT as r
filename = options.filename
myF = r.TFile(filename, 'recreate')
myT = r.TTree('thrTree', 'Tree Holding CMS GEM VT1 Data')
Exemplo n.º 2
0
parser.add_option("--internal", action="store_true", dest="internal",
                  help="Run a latency scan using the internal calibration pulse", metavar="internal")
parser.add_option("--randoms", type="int", default=0, dest="randoms",
                  help="Set up for using AMC13 local trigger generator to generate random triggers with rate specified",
                  metavar="randoms")
parser.add_option("--stepSize", type="int", dest="stepSize", 
                  help="Supply a step size to the latency scan from scanmin to scanmax", metavar="stepSize", default=1)
parser.add_option("--t3trig", action="store_true", dest="t3trig",
                  help="Set up for using AMC13 T3 trigger input", metavar="t3trig")
parser.add_option("--throttle", type="int", default=0, dest="throttle",
                  help="factor by which to throttle the input L1A rate, e.g. new trig rate = L1A rate / throttle", metavar="throttle")
parser.add_option("--vt2", type="int", dest="vt2", default=0,
                  help="Specify VT2 to use", metavar="vt2")

parser.set_defaults(scanmin=153,scanmax=172,nevts=500)
(options, args) = parser.parse_args()

if options.scanmin not in range(256) or options.scanmax not in range(256) or not (options.scanmax > options.scanmin):
    print("Invalid scan parameters specified [min,max] = [%d,%d]"%(options.scanmin,options.scanmax))
    print("Scan parameters must be in range [0,255] and min < max")
    exit(1)

if options.vt2 not in range(256):
    print("Invalid VT2 specified: %d, must be in range [0,255]"%(options.vt2))
    exit(1)

if options.MSPL not in range(1,9):
    print("Invalid MSPL specified: %d, must be in range [1,8]"%(options.MSPL))
    exit(1)

if options.stepSize <= 0: