Ejemplo n.º 1
0
def get_partition_name(runnr):
   try:
      from PyCool import cool
      import time
      folder=l1ctpy.getCoolFolder(l1ctpy.get_dbid_TDAQ_COMP(),'/TDAQ/RunCtrl/EventCounters')
      
      ROV1=cool.ValidityKey((run<<32)+1)
      ROV2=ROV1
      #
      objs=list(folder.browseObjects(ROV1,ROV2,cool.ChannelSelection.all()))
      return objs[0].payload()["PartitionName"]      
   except IndexError:
      return ""
#   except BaseException,e:    
#      print "Exception: ",e,type(e)
   return ""
Ejemplo n.º 2
0
def get_partition_ongoing(runnr):
   try:
      from PyCool import cool
      import time
      folder=l1ctpy.getCoolFolder(l1ctpy.get_dbid_TDAQ_COMP(),'/TDAQ/RunCtrl/EOR_Params')
      
      ROV1=cool.ValidityKey((run<<32)+1)
      ROV2=ROV1
      #
      objs=list(folder.browseObjects(ROV1,ROV2,cool.ChannelSelection.all()))

      if objs[0].payload()["CleanStop"] :
          return "CleanStop"
      else:
          return "NotCleanStop"      
   except IndexError:
      return ""
#   except BaseException,e:      
#      print "Exception: ",e
   return ""
Ejemplo n.º 3
0
if OPT["--run"] < 1:
    print "no run nr. exit"
    sys.exit(1)

if not OPT['--norunname']:
    OPT["--filename"] += str(OPT["--run"])

#+-------------------------------------------
# Open databases and get the required folders
#+-------------------------------------------

print "Run:                         ", OPT["--run"]
print "Opening db ", OPT["--dbid"]

ctpinRatefolder = l1ctpy.getCoolFolder(OPT["--dbid"],
                                       '/TRIGGER/LVL1/CTPINRATES')
lbfolder = l1ctpy.getCoolFolder(OPT['--dbidLumi'], '/TRIGGER/LUMI/LBLB')

LBs, TimeRanges = l1ctpy.getLbTimesMulti(lbfolder, OPT["--run"], OPT["--lb"])

l1ctpy.showlbandtime(LBs, OPT)

#+-------------------------------------------
# Counter names
#+-------------------------------------------

import numpy

ROV1 = (OPT["--run"] << 32) + 1
pattern = '.*'
CounterType = 'CTPIN'
Ejemplo n.º 4
0
                     OPT["--run"])

if not OPT['--norunname']:
    OPT["--filename"] += str(OPT["--run"])

OPT['--RateTitle'] = 'Run ' + str(OPT["--run"]) + " : CTPMON Counter Rates, Hz"

if OPT['--verbose']:
    print "Options:", OPT

import l1ctpy

#+-------------------------------------------
# Open databases and get the required folders
#+-------------------------------------------
lbfolder = l1ctpy.getCoolFolder(l1ctpy.get_dbid_COMP(), '/TRIGGER/LUMI/LBLB')
LBs, TimeRanges = l1ctpy.getLbTimesMulti(lbfolder, OPT["--run"], OPT["--lb"])

monblockLBs = []
monTimeRanges0 = TimeRanges[0]
monTimeRangeslast = TimeRanges[-1][0]

if OPT['--list']:
    import time

    print "lumiblocks:"
    for l, t in zip(LBs, TimeRanges):
        print "%4d:  %20s -- %20s" % (l,
                                      time.asctime(time.localtime(t[0] / 1e9)),
                                      time.asctime(time.localtime(t[1] / 1e9)))
Ejemplo n.º 5
0
        print "No run specified, finding last run from cool"
        OPT["--run"] = l1ctpy.get_current_run()
except BaseException, e:
    usage()
    print e
    raise ValueError("You must specify a single run number, not:",
                     OPT["--run"])

if not OPT['--norunname']:
    OPT["--filename"] += str(OPT["--run"])

#+-------------------------------------------
# Open databases and get the required folders
#+-------------------------------------------

busyRatefolder = l1ctpy.getCoolFolder(OPT["--dbid"], '/TRIGGER/LVL1/BUSYRATES')
busyConffolder = l1ctpy.getCoolFolder(OPT["--dbid"], '/TRIGGER/LVL1/BUSYCONF')
lbfolder = l1ctpy.getCoolFolder(OPT['--dbidLumi'], '/TRIGGER/LUMI/LBLB')

LBs, TimeRanges = l1ctpy.getLbTimesMulti(lbfolder, OPT["--run"], OPT["--lb"])

print OPT
l1ctpy.showlbandtime(LBs, OPT)

#+-------------------------------------------
# Counter names
#+-------------------------------------------

import numpy

dbstring = l1ctpy.get_dbid_MONP()