コード例 #1
0
#!/bin/env python
"""
Script to take latency data using OH BX delay counter
By: Jared Sturdy  ([email protected])
    Cameron Bravo ([email protected])
"""

import sys
from array import array
from gempython.tools.vfat_user_functions_uhal import *

from qcoptions import parser

parser.add_option("--filename",
                  type="string",
                  dest="filename",
                  default="LatencyData.root",
                  help="Specify Output Filename",
                  metavar="filename")
parser.add_option("--vt1",
                  type="int",
                  dest="vt1",
                  help="VThreshold1 DAC value for all VFATs",
                  metavar="vt1",
                  default=100)

parser.set_defaults(nevts=1000)
(options, args) = parser.parse_args()

if options.MSPL not in range(1, 9):
    print "Invalid MSPL specified: %d, must be in range [1,8]" % (options.MSPL)
    exit(1)
コード例 #2
0
Script to configure the VFATs on a GEM chamber
By: Cameron Bravo [email protected]
Modified by: Eklavya Sarkar [email protected]
             Brian Dorney [email protected]
"""

from array import array
from gempython.tools.vfat_user_functions_uhal import *
from mapping.chamberInfo import chamber_vfatDACSettings
from qcoptions import parser
from qcutilities import readBackCheck

parser.add_option(
    "--chConfig",
    type="string",
    dest="chConfig",
    default=None,
    help="Specify file containing channel settings from anaUltraSCurve",
    metavar="chConfig")
parser.add_option(
    "--compare",
    action="store_true",
    dest="compare",
    help=
    "When supplied with {chConfig, filename, vfatConfig} compares current reg values with those stored in input files",
    metavar="compare")
parser.add_option("--filename",
                  type="string",
                  dest="filename",
                  default=None,
                  help="Specify file containing settings information",
コード例 #3
0
        pass
    return


if __name__ == '__main__':

    import sys,os,signal
    import subprocess
    import itertools
    from multiprocessing import Pool, freeze_support
    from chamberInfo import chamber_config
    from gempython.utils.wrappers import envCheck

    from qcoptions import parser

    parser.add_option("--config", action="store_true", dest="config",
                      help="Set Configuration from simple txt files", metavar="config")
    parser.add_option("--run", action="store_true", dest="run",
                      help="Set VFATs to run mode", metavar="run")
    parser.add_option("--series", action="store_true", dest="series",
                      help="Run tests in series (default is false)", metavar="series")
    parser.add_option("--vt1", type="int", dest="vt1",
                      help="VThreshold1 DAC value for all VFATs", metavar="vt1", default=100)
    parser.add_option("--vt1bump", type="int", dest="vt1bump",
                      help="VThreshold1 DAC bump value for all VFATs", metavar="vt1bump", default=0)

    (options, args) = parser.parse_args()

    envCheck('DATA_PATH')
  
    if options.debug:
        print list(itertools.izip(
コード例 #4
0
By: Jared Sturdy  ([email protected])
    Cameron Bravo ([email protected])
Modified By:
    Brian Dorney ([email protected])
"""

import sys, os, random, time
from array import array

import gempython.tools.optohybrid_user_functions_uhal as oh
from gempython.tools.vfat_user_functions_uhal import *
import gempython.tools.amc_user_functions_uhal as amc

from qcoptions import parser

parser.add_option("--amc13local", action="store_true", dest="amc13local",
                  help="Set up for using AMC13 local trigger generator", metavar="amc13local")
parser.add_option("--fakeTTC", action="store_true", dest="fakeTTC",
                  help="Set up for using AMC13 local TTC generator", metavar="fakeTTC")
parser.add_option("--filename", type="string", dest="filename", default="LatencyData_Trimmed.root",
                  help="Specify Output Filename", metavar="filename")
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")
コード例 #5
0
                print "   %s.%s" % (test,
                                    (Passed if self.test[test] else Failed))
            else:
                print "   %s.%s" % (test, NotRun)
                pass
            pass
        return


if __name__ == "__main__":
    from qcoptions import parser

    parser.add_option(
        "--namc",
        type="int",
        dest="namc",
        help="Number of register tests to perform on the amc (default is 100)",
        metavar="namc",
        default=100)
    parser.add_option(
        "--noh",
        type="int",
        dest="noh",
        help=
        "Number of register tests to perform on the OptoHybrid (default is 100)",
        metavar="noh",
        default=100)
    parser.add_option(
        "--ni2c",
        type="int",
        dest="ni2c",
コード例 #6
0
#!/bin/env python
"""
Script to take Scurve data using OH ultra scans
By: Cameron Bravo ([email protected])
"""

import sys
from array import array
from gempython.tools.vfat_user_functions_uhal import *

from qcoptions import parser

parser.add_option("-f", "--filename", type="string", dest="filename", default="SCurveData.root",
                  help="Specify Output Filename", metavar="filename")
parser.add_option("--latency", type="int", dest = "latency", default = 37,
                  help="Specify Latency", metavar="latency")
parser.add_option("--CalPhase", type="int", dest = "CalPhase", default = 0,
                  help="Specify CalPhase. Must be in range 0-8", metavar="CalPhase")
parser.add_option("--L1Atime", type="int", dest = "L1Atime", default = 250,
                  help="Specify time between L1As in bx", metavar="L1Atime")
parser.add_option("--pulseDelay", type="int", dest = "pDel", default = 40,
                  help="Specify time of pulse before L1A in bx", metavar="pDel")
parser.add_option("--chMin", type="int", dest = "chMin", default = 0,
                  help="Specify minimum channel number to scan", metavar="chMin")
parser.add_option("--chMax", type="int", dest = "chMax", default = 127,
                  help="Specify maximum channel number to scan", metavar="chMax")

(options, args) = parser.parse_args()

if options.MSPL < 1 or options.MSPL > 8:
    print 'MSPL must be in the range 1-8'
コード例 #7
0
#!/bin/env python
"""
Script to take Scurve data using OH ultra scans
By: Cameron Bravo ([email protected])
"""

import sys
from array import array
from gempython.tools.vfat_user_functions_uhal import *

from qcoptions import parser

parser.add_option("-f",
                  "--filename",
                  type="string",
                  dest="filename",
                  default="SCurveData.root",
                  help="Specify Output Filename",
                  metavar="filename")
parser.add_option("--latency",
                  type="int",
                  dest="latency",
                  default=37,
                  help="Specify Latency",
                  metavar="latency")
parser.add_option("--CalPhase",
                  type="int",
                  dest="CalPhase",
                  default=0,
                  help="Specify CalPhase. Must be in range 0-8",
                  metavar="CalPhase")
コード例 #8
0
#!/bin/env python
"""
Script to take latency data using OH BX delay counter
By: Jared Sturdy  ([email protected])
    Cameron Bravo ([email protected])
"""

import sys
from array import array
from gempython.tools.vfat_user_functions_uhal import *

from qcoptions import parser

parser.add_option("--filename", type="string", dest="filename", default="LatencyData.root",
                  help="Specify Output Filename", metavar="filename")
parser.add_option("--vt1", type="int", dest="vt1",
                  help="VThreshold1 DAC value for all VFATs", metavar="vt1", default=100)

parser.set_defaults(nevts=1000)
(options, args) = parser.parse_args()

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.debug:
    uhal.setLogLevelTo( uhal.LogLevel.INFO )
else:
    uhal.setLogLevelTo( uhal.LogLevel.ERROR )

from gempython.tools.amc_user_functions_uhal import *
コード例 #9
0
By: Jared Sturdy  ([email protected])
    Cameron Bravo ([email protected])
Modified By:
    Brian Dorney ([email protected])
"""

import sys, os, random, time
from array import array

import gempython.tools.optohybrid_user_functions_uhal as oh
from gempython.tools.vfat_user_functions_uhal import *
import gempython.tools.amc_user_functions_uhal as amc

from qcoptions import parser

parser.add_option("--amc13local", action="store_true", dest="amc13local",
                  help="Set up for using AMC13 local trigger generator", metavar="amc13local")
parser.add_option("--fakeTTC", action="store_true", dest="fakeTTC",
                  help="Set up for using AMC13 local TTC generator", metavar="fakeTTC")
parser.add_option("--filename", type="string", dest="filename", default="LatencyData_Trimmed.root",
                  help="Specify Output Filename", metavar="filename")
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")
コード例 #10
0
    print "Caught exception",e
    pass
  return

if __name__ == '__main__':

  import sys,os,signal
  import subprocess
  import itertools
  from multiprocessing import Pool, freeze_support
  from mapping.chamberInfo import chamber_config, chamber_vfatMask
  from gempython.utils.wrappers import envCheck

  from qcoptions import parser

  parser.add_option("--amc13local", action="store_true", dest="amc13local",
                    help="Set up for using AMC13 local trigger generator", metavar="amc13local")
  parser.add_option("--config", action="store_true", dest="config",
                    help="Configure chambers before running scan", metavar="config")
  parser.add_option("--internal", action="store_true", dest="internal",
                    help="Run a latency scan using the internal calibration pulse", metavar="internal")
  parser.add_option("--perchannel", action="store_true", dest="perchannel",
                    help="Run a per-channel VT1 scan", metavar="perchannel")
  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("--series", action="store_true", dest="series",
                    help="Run tests in series (default is false)", metavar="series")
  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")
コード例 #11
0

if __name__ == '__main__':

    import sys, os, signal
    import subprocess
    import itertools
    from multiprocessing import Pool, freeze_support
    from chamberInfo import chamber_config
    from gempython.utils.wrappers import envCheck

    from qcoptions import parser

    parser.add_option("--amc13local",
                      action="store_true",
                      dest="amc13local",
                      help="Set up for using AMC13 local trigger generator",
                      metavar="amc13local")
    parser.add_option("--config",
                      action="store_true",
                      dest="config",
                      help="Configure chambers before running scan",
                      metavar="config")
    parser.add_option("--perchannel",
                      action="store_true",
                      dest="perchannel",
                      help="Run a per-channel VT1 scan",
                      metavar="perchannel")
    parser.add_option(
        "--randoms",
        type="int",
コード例 #12
0
#!/bin/env python
"""
Script to set trimdac values on a chamber
By: Christine McLean ([email protected]), Cameron Bravo ([email protected]), Elizabeth Starling ([email protected])
"""

import sys
from array import array
from gempython.tools.vfat_user_functions_uhal import *
from gempython.utils.nesteddict import nesteddict as ndict
from gempython.utils.wrappers import runCommand, envCheck
from mapping.chamberInfo import chamber_config

from qcoptions import parser

parser.add_option("--trimRange", type="string", dest="rangeFile", default=None,
                  help="Specify the file to take trim ranges from", metavar="rangeFile")
parser.add_option("--dirPath", type="string", dest="dirPath", default=None,
                  help="Specify the path where the scan data should be stored", metavar="dirPath")
parser.add_option("--vt1", type="int", dest="vt1",
                  help="VThreshold1 DAC value for all VFATs", metavar="vt1", default=100)

(options, args) = parser.parse_args()

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

rangeFile = options.rangeFile
ztrim = options.ztrim
print 'trimming at z = %f'%ztrim
コード例 #13
0
By: Cameron Bravo ([email protected])
    Jared Sturdy  ([email protected])

Modified By:
    Brian Dorney ([email protected])
"""

import sys, os, random, time
from array import array

from gempython.tools.optohybrid_user_functions_uhal import *
from gempython.tools.vfat_user_functions_uhal import *

from qcoptions import parser

parser.add_option("--vt2", type="int", dest="vt2", default=0,
                  help="Specify VT2 to use", metavar="vt2")
parser.add_option("-f", "--filename", type="string", dest="filename", default="VThreshold1Data_Trimmed.root",
                  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.INFO )
コード例 #14
0
Script to set trimdac values on a chamber
By: Christine McLean ([email protected]), Cameron Bravo ([email protected]), Elizabeth Starling ([email protected])
"""

import sys
from array import array
from gempython.tools.vfat_user_functions_uhal import *
from gempython.utils.nesteddict import nesteddict as ndict
from gempython.utils.wrappers import runCommand, envCheck
from chamberInfo import chamber_config

from qcoptions import parser

parser.add_option("--trimRange",
                  type="string",
                  dest="rangeFile",
                  default=None,
                  help="Specify the file to take trim ranges from",
                  metavar="rangeFile")
parser.add_option("--dirPath",
                  type="string",
                  dest="dirPath",
                  default=None,
                  help="Specify the path where the scan data should be stored",
                  metavar="dirPath")
parser.add_option("--vt1",
                  type="int",
                  dest="vt1",
                  help="VThreshold1 DAC value for all VFATs",
                  metavar="vt1",
                  default=100)
コード例 #15
0
#!/bin/env python
"""
Script to configure the VFATs on a GEM chamber
By: Cameron Bravo [email protected]
"""

from array import array
from gempython.tools.vfat_user_functions_uhal import *

from qcoptions import parser

parser.add_option("--filename",
                  type="string",
                  dest="filename",
                  default=None,
                  help="Specify file containing settings information",
                  metavar="filename")
parser.add_option(
    "--chConfig",
    type="string",
    dest="chConfig",
    default=None,
    help="Specify file containing channel settings from anaUltraSCurve",
    metavar="chConfig")
parser.add_option(
    "--vfatConfig",
    type="string",
    dest="vfatConfig",
    default=None,
    help="Specify file containing VFAT settings from anaUltraThreshold",
    metavar="vfatConfig")
コード例 #16
0
Modified By:
    Brian Dorney ([email protected])
"""

import sys, os, random, time
from array import array

from gempython.tools.optohybrid_user_functions_uhal import *
from gempython.tools.vfat_user_functions_uhal import *

from qcoptions import parser

parser.add_option("--vt2",
                  type="int",
                  dest="vt2",
                  default=0,
                  help="Specify VT2 to use",
                  metavar="vt2")
parser.add_option("-f",
                  "--filename",
                  type="string",
                  dest="filename",
                  default="VThreshold1Data_Trimmed.root",
                  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(
コード例 #17
0
    def report(self):
        txtTitle("K. Results")

        for test in self.allTests:
            if (test in self.tests):
                print "   %s.%s"%(test,(Passed if self.test[test] else Failed))
            else:
                print "   %s.%s"%(test,NotRun)
                pass
            pass
        return

if __name__ == "__main__":
    from qcoptions import parser

    parser.add_option("--namc", type="int", dest="namc",
                      help="Number of register tests to perform on the amc (default is 100)", metavar="namc", default=100)
    parser.add_option("--noh", type="int", dest="noh",
                      help="Number of register tests to perform on the OptoHybrid (default is 100)", metavar="noh", default=100)
    parser.add_option("--ni2c", type="int", dest="ni2c",
                      help="Number of I2C tests to perform on the VFAT2s (default is 100)", metavar="ni2c", default=100)
    parser.add_option("--ntrk", type="int", dest="ntrk",
                      help="Number of tracking data packets to readout (default is 1000)", metavar="ntrk", default=1000)
    parser.add_option("--writeout", action="store_true", dest="writeout",
                      help="Write the data to disk when testing the rate", metavar="writeout")
    parser.add_option("--tests", type="string", dest="tests",default="A,B,E,F",
                      help="Tests to run, default is all", metavar="tests")
    #parser.add_option("--doLatency", action="store_true", dest="doLatency",
    #                  metavar="doLatency",
    #                  help="[OPTIONAL] Run latency scan to determine the latency value")
    #parser.add_option("--QC3test", action="store_true", dest="doQC3",
    #                  metavar="doQC3",