#!/bin/env python from gempython.tools.glib_system_info_uhal import * from gempython.tools.amc_user_functions_uhal import * from gempython.utils.rate_calculator import rateConverter,errorRate import logging from gempython.utils.gemlogger import getGEMLogger from gempython.utils.standardopts import parser parser.add_option("--daq_enable", type="int", dest="daq_enable", help="enable daq output", metavar="daq_enable", default=-1) parser.add_option("--rd", type="int", dest="reset_daq", help="reset daq", metavar="reset_daq", default=-1) parser.add_option("--l1a_block", action="store_true", dest="l1a_block", help="Inhibit the L1As at the TTC backplane link", metavar="l1a_block") parser.add_option("--full", action="store_true", dest="full", help="Show extended information", metavar="full") parser.add_option("--invertTX", type="string", dest="invertTX",default="", help="Flip polarity for SFPs in list", metavar="invertTX") parser.add_option("--user", action="store_true", dest="userOnly", help="print user information only", metavar="userOnly") parser.add_option("--ngtx", type="int", dest="ngtx", default=2, help="Number of GTX links supported in the firmware (default is 2)", metavar="ngtx") parser.add_option("--ttc", type="int", dest="gemttc", default=2, help="choose the TTC encoding (gem/csc=0, amc13=1,default=2 meaning no modification)", metavar="gemttc") (options, args) = parser.parse_args() gemlogger = getGEMLogger(__name__) gemlogger.setLevel(logging.INFO)
from gempython.utils.standardopts import parser parser.add_option("--L1Atime", type="int", dest="L1Atime", default=250, help="Specify time between L1As in bx", metavar="L1Atime") parser.add_option("--mspl", type="int", dest="MSPL", default=4, help="Specify MSPL. Must be in the range 1-8 (default is 4)", metavar="MSPL") parser.add_option("--nevts", type="int", dest="nevts", help="Number of events to count at each scan point", metavar="nevts", default=1000) parser.add_option("--pulseDelay", type="int", dest="pDel", default=40, help="Specify time of pulse before L1A in bx", metavar="pDel") parser.add_option("--scanmin", type="int", dest="scanmin", help="Minimum value of scan parameter", metavar="scanmin",
#!/bin/env python from gempython.tools.optohybrid_user_functions_uhal import * from gempython.utils.rate_calculator import getErrorRate, errorRate import logging from gempython.utils.gemlogger import colors, getGEMLogger from gempython.utils.standardopts import parser parser.add_option("-k", "--clkSrc", type="int", dest="clkSrc", help="which reference clock to use on OH", metavar="clkSrc") parser.add_option("-l", "--localT1", action="store_true", dest="localT1", help="enable the localT1 controller", metavar="localT1") parser.add_option("--v2a", action="store_true", dest="v2a", help="Specific functionality only in v2a", metavar="v2a") parser.add_option("--sbitmask", type="int", dest="sbitmask", default=0x0,
#!/bin/env python from gempython.tools.glib_system_info_uhal import getSystemFWVer,getSystemFWDate from gempython.tools.vfat_user_functions_uhal import * from gempython.tools.amc_user_functions_uhal import * from gempython.utils.rate_calculator import errorRate import logging from gempython.utils.gemlogger import colors,getGEMLogger from gempython.utils.nesteddict import nesteddict from gempython.utils.standardopts import parser parser.add_option("-z", "--sleep", action="store_true", dest="sleepAll", help="set all chips into sleep mode", metavar="sleepAll") parser.add_option("--bias", action="store_true", dest="biasAll", help="set all chips with default bias parameters", metavar="biasAll") parser.add_option("--enable", type="string", dest="enabledChips", help="list of chips to enable, comma separated", metavar="enabledChips", default=[]) parser.add_option("--testi2c", type="int", dest="testi2c", default=-1, help="Testing the I2C lines (select I2C line 0-5, or 6 for all", metavar="testi2c") parser.add_option("--testsingle", action="store_true", dest="testsingle", help="Testing single VFAT transactions (turn on every other VFAT)", metavar="testsingle") (options, args) = parser.parse_args() gemlogger = getGEMLogger(__name__) gemlogger.setLevel(logging.INFO) uhal.setLogLevelTo( uhal.LogLevel.FATAL )
import sys, re, time, datetime, os sys.path.append('${GEM_PYTHON_PATH}') from gempython.tools.glib_system_info_uhal import * from gempython.tools.vfat_functions_uhal import * from gempython.tools.glib_user_functions_uhal import * from gempython.utils.rate_calculator import errorRate from gempython.utils.standardopts import parser parser.add_option("-s", "--slot", type="int", dest="slot", help="AMC slot in uTCA crate", metavar="slot", default=10) parser.add_option("-g", "--gtx", type="int", dest="gtx", help="GTX on the AMC", metavar="gtx", default=0) parser.add_option("-d", "--debug", action="store_true", dest="debug", help="print extra debugging information",
from gempython.utils.standardopts import parser parser.add_option("--mspl", type="int", dest = "MSPL", default = 4, help="Specify MSPL. Must be in the range 1-8 (default is 4)", metavar="MSPL") parser.add_option("--nevts", type="int", dest="nevts", help="Number of events to count at each scan point", metavar="nevts", default=1000) parser.add_option("--scanmin", type="int", dest="scanmin", help="Minimum value of scan parameter", metavar="scanmin", default=0) parser.add_option("--scanmax", type="int", dest="scanmax", help="Maximum value of scan parameter", metavar="scanmax", default=254) parser.add_option("--vfatmask", type="int", dest="vfatmask", help="VFATs to be masked in scan & analysis applications (e.g. 0xFFFFF masks all VFATs)", metavar="vfatmask", default=0x0) parser.add_option("--ztrim", type="float", dest="ztrim", default=4.0, help="Specify the p value of the trim", metavar="ztrim")
#!/bin/env python from gempython.tools.optohybrid_user_functions_uhal import * from gempython.utils.rate_calculator import getErrorRate,errorRate import logging from gempython.utils.gemlogger import colors,getGEMLogger from gempython.utils.standardopts import parser parser.add_option("-k", "--clkSrc", type="int", dest="clkSrc", help="which reference clock to use on OH", metavar="clkSrc") parser.add_option("-l", "--localT1", action="store_true", dest="localT1", help="enable the localT1 controller", metavar="localT1") parser.add_option("--v2a", action="store_true", dest="v2a", help="Specific functionality only in v2a", metavar="v2a") parser.add_option("--sbitmask", type="int", dest="sbitmask",default=0x0, help="use s-bit mask", metavar="sbitmask") parser.add_option("--sbitout", type="int", dest="sbitSrc", help="use s-bit from VFAT <num>", metavar="sbitSrc") parser.add_option("-x", "--external", type="int", dest="trgSrc", help="change trigger source", metavar="trgSrc") (options, args) = parser.parse_args() gemlogger = getGEMLogger(__name__) gemlogger.setLevel(logging.INFO) uhal.setLogLevelTo( uhal.LogLevel.WARNING ) ohboard = getOHObject(options.slot,options.gtx,options.shelf,options.debug) setOHLogLevel(logging.INFO)
#!/bin/env python import sys, re, time, datetime, os sys.path.append('${GEM_PYTHON_PATH}') from gempython.tools.glib_system_info_uhal import * from gempython.tools.vfat_functions_uhal import * from gempython.tools.glib_user_functions_uhal import * from gempython.utils.rate_calculator import errorRate from gempython.utils.standardopts import parser parser.add_option("-s", "--slot", type="int", dest="slot", help="AMC slot in uTCA crate", metavar="slot", default=10) parser.add_option("-g", "--gtx", type="int", dest="gtx", help="GTX on the AMC", metavar="gtx", default=0) parser.add_option("-d", "--debug", action="store_true", dest="debug", help="print extra debugging information", metavar="debug") parser.add_option("--highword", type="int", dest="highword", default=0x0, help="Bits to set on channels 127:96", metavar="highword") parser.add_option("--lowword", type="int", dest="lowword", default=0x0, help="Bits to set on channels 31:0", metavar="lowword") parser.add_option("--vcal", type="int", dest="vcal", default=250, help="VCal value to set", metavar="vcal") (options, args) = parser.parse_args() gemlogger = GEMLogger("vfat_pulse_setup").gemlogger gemlogger.setLevel(GEMLogger.INFO)
#!/bin/env python from gempython.tools.glib_system_info_uhal import getSystemFWVer, getSystemFWDate from gempython.tools.vfat_user_functions_uhal import * from gempython.tools.amc_user_functions_uhal import * from gempython.utils.rate_calculator import errorRate import logging from gempython.utils.gemlogger import colors, getGEMLogger from gempython.utils.nesteddict import nesteddict from gempython.utils.standardopts import parser parser.add_option("-z", "--sleep", action="store_true", dest="sleepAll", help="set all chips into sleep mode", metavar="sleepAll") parser.add_option("--bias", action="store_true", dest="biasAll", help="set all chips with default bias parameters", metavar="biasAll") parser.add_option("--enable", type="string", dest="enabledChips", help="list of chips to enable, comma separated", metavar="enabledChips", default=[]) parser.add_option( "--testi2c",