Ejemplo n.º 1
0
import l1ctpy

# defaults:
OPT = {}
OPT["--run"] = int(-1)
OPT["--counters"] = ['MBTS']
OPT["--bcids"] = None
OPT["--lb"] = l1ctpy.text_to_ranges('-')
OPT["--maxbins"] = 400
OPT["--verbose"] = False
OPT["--nofillHist"] = False
OPT["--nodrawHist"] = False
OPT["--textsum"] = False
OPT["--filename"] = "CTPIN_"

OPT["--dbid"] = l1ctpy.get_dbid_MONP()
OPT["--dbidLumi"] = l1ctpy.get_dbid_COMP()

OPT["--nodraw"] = ""

OPT['--norunname'] = False
OPT['--maxzscale'] = ''
#1000

for o, a in opts:
    if o in ('-h', '--help'):
        usage()
        sys.exit(0)
    if o == '--lb':
        OPT["--lb"] = l1ctpy.text_to_ranges(a)
    if o == '--outbase':
Ejemplo n.º 2
0
    if OPT["--run"] < 1:
        raise ValueError()
except ValueError:
    usage()
    print "Error: You must specify a single run number, not:",OPT["--run"]
    sys.exit(2)


import l1ctpy
from PyCool import cool
import ctpmon_py as ctpcl
import re

pattern=".*%s.*" % OPT["--names"]

dbstring=l1ctpy.get_dbid_MONP()
ROV1=(OPT["--run"]<<32)+OPT["--lb"];
numfound={}

coutner='.*'
CounterType='.*'

signals=l1ctpy.getcounterConfig(dbstring,ROV1,ROV1,pattern,CounterType)

# display signals:
if signals:
    realkeys = signals[0].keys() 
    for p in signals:
        if "CounterName" in realkeys and p["CounterName"]:
            p["DisplayName"]=p["CounterName"]
        else: