ATLAS Offline Software
RunLister.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2 
3 # RunLister.py
4 
5 from __future__ import print_function
6 
7 import sys
8 import time
9 from PyCool import cool
10 from CoolConvUtilities.AtlCoolLib import RangeList,indirectOpen
11 from DetectorStatus.DetStatusCoolLib import statusCutsToRange
12 
13 def timeRep(value):
14  """Utility function to turn COOL 63bit time into string, or unknown"""
15  if (value is not None):
16  stime=int(value/1000000000)
17  return time.strftime('%F:%T',time.gmtime(stime))
18  else:
19  return 'unknown'
20 
21 def boolRep(value):
22  """Utility function to turn bool into yes/no"""
23  if (value is not None):
24  if (value):
25  return 'Yes'
26  else:
27  return 'No'
28  else:
29  return '-?-'
30 
31 def noneZero(value):
32  "Utility function to turn None into 0 (int) for use with integer/None args"
33  if (value is None):
34  return 0
35  else:
36  return int(value)
37 
38 def noneStr(value):
39  "Utility to turn None into '---' (string) for use with string/None args"
40  if (value is None):
41  return "---"
42  else:
43  return str(value)
44 
45 def maskDecode(mask):
46  """Decode the detector mask into a string list of detectors"""
47  # data taken from get_detectormask.cc from Giovana L, August 2007
48  masklist=['Pix B','Pix EA','Pix EC','Pix B-layer','SCT BA','SCT BC','SCT EA','SCT EC','TRT BA','TRT BC','TRT EA','TRT EC','LAr EMBA','LAr EMBC','LAr EMECA','LAr EMECC','LAr HECA','LAr HECC','LAR FCALA','LAR FCALC','Til BA','Til BC','Til EA','Til EC','MDT BA','MDT BC','MDT EA','MDT EC','RPC BA','RPC BC','TGC EA','TGC EC','CSC EA','CSC EC','L1calo pre','L1calo cluDAQ','L1calo cluRoI','L1calo JetEDAQ','L1calo JetERoI','MUCTPI','CTP','L2SV','SFI','SFO','LVL2','EF']
49  res=""
50  for i in range(0,64):
51  if (mask & (1 << i)): res+=masklist[i]+", "
52  # chop off last comma-space
53  if len(res)>1: res=res[:-2]
54  return res
55 
56 
57 class LBParams:
58  """Class to hold information from the LB_Params folder"""
59  def __init__(self,run,lb,start,stop):
60  self.run=run
61  self.lb=lb
62  self.start=start
63  self.stop=stop
64 
65 class RunParams:
66  """class to hold information from the Params folders"""
67  def __init__(self,run,start,runtype,daqconfig,detmask,filetag,rec,datasource):
68  self.run=run
69  self.start=start
70  self.runtype=str(runtype)
71  self.daqconfig=str(daqconfig)
72  self.detmask=int(detmask)
73  self.filetag=str(filetag)
74  # in M4, the logic on the recording flag is wrong!
75  self.rec=bool(not rec)
76  self.datasource=str(datasource)
77  # informaton to be filled in from EOR_Params
78  self.stop=None
79  self.totaltime=None
80  self.cleanstop=None
81  # information to be filled in from LB_Params
82  self.maxlb=None
83  # information to be filled in from FinalSFOStat
84  self.partname=None
85  self.recevents=None
86  self.storedevents=None
87  # information to be filled in from EventCounters
88  # partname and storedevents can come from EventCounters or FinalSFOStat
89  self.l1events=None
90  self.l2events=None
91  self.efevents=None
92  self.errcode=0
93  self.errlist=[]
94 
95  def addEORInfo(self,stop,totaltime,cleanstop,maxlb):
96  self.stop=stop
97  self.totaltime=totaltime
98  self.cleanstop=cleanstop
99  if maxlb is not None:
100  self.maxlb=maxlb
101 
102  def updateEORInfo(self,daqconfig):
103  if (self.daqconfig=="unknown"):
104  self.daqconfig=daqconfig
105  else:
106  if (self.daqconfig!=daqconfig):
107  if (self.loglevel>1):
108  self.addMsg("EOR updates DAQConfig")
109 
110  def addSFOStat(self,partname,recevents,storedevents):
111  self.partname=partname
112  self.recevents=int(recevents)
113  self.storedevents=int(storedevents)
114 
115  def addEventCounters(self,partname,l1events,l2events,efevents,storedevents):
116  self.partname=partname
117  self.l1events=l1events
118  self.l2events=l2events
119  self.efevents=efevents
120  if (self.storedevents is None or self.storedevents==0):
121  self.storedevents=int(storedevents)
122 
123  def patchEndTime(self,stop):
124  "Patch end of run time from Trigger info when missing EOR record"
125  self.stop=stop
126  self.totaltime=int((stop-self.start)/1.E9)
127  self.setErr(4)
128 
129  def setErr(self,bit,msg=""):
130  "Set errorcode for bit x"
131  self.errcode=self.errcode | (1 << bit)
132  if (msg!=""): self.errlist+=[msg]
133 
134  def addMsg(self,msg):
135  self.errlist+=[msg]
136 
137  def decodeErr(self):
138  "Decode the errors for the run into a string representation"
139  # Error bits are as follows
140  # 0 NoEOR no EOR record found
141  # 1 BadEOR EOR and SOR inconsistent (NYI)
142  # 2 NoLB_Params No LB_Params record found for SOR
143  # 3 BadLB_Params Bad LB_Params record found for SOR (NYI)
144  # 4 PatchEOR EOR information patched from trigger information
145 
146  errtxt=['NoEOR','BadEOR','NoLBParams','BadLBParams',
147  'PatchEOR']
148  errstr='Run %i errcode %i : ' % (self.run,self.errcode)
149  for i in range(0,len(errtxt)):
150  if (self.errcode & (1 << i)): errstr+=errtxt[i]+' '
151  return errstr
152 
153 
154 
156  "Class to hold info on runs and LBs read from TRIGGER schema"
157  def __init__(self,run,lb,start,stop):
158  self.run=run
159  self.maxlb=lb
160  self.start=start
161  self.stop=stop
162 
163 
165  """Extract information on ATLAS runs from online COOL information"""
166  def __init__(self,cooltdaqdbconn,cooltrigdbconn,coolstatusdbconn,
167  oracle=False,loglevel=1):
168  debug=(loglevel>1)
169  try:
170  self.cooldb=indirectOpen(cooltdaqdbconn,True,debug)
171  if (loglevel>=1):print ("Connected to",cooltdaqdbconn,"for RunControl data")
172  except Exception as e:
173  print (e)
174  sys.exit(-1)
175  if (len(cooltrigdbconn)>0):
176  try:
177  self.cooltrigdb=indirectOpen(cooltrigdbconn,True,debug)
178  if (loglevel>=1): print ("Connected to",cooltrigdbconn,"for CTP data")
179  self.usetrig=True
180  except Exception as e:
181  print (e)
182  sys.exit(-1)
183  else:
184  self.usetrig=False
185  if (len(coolstatusdbconn)>0):
186  try:
187  self.coolstatusdb=indirectOpen(coolstatusdbconn,True,debug)
188  if (loglevel>=1): print ("Connected to",coolstatusdbconn,"for detector status data")
189  except Exception as e:
190  print (e)
191  sys.exit(-1)
192 
193  # store other parameters
194  self.loglevel=loglevel
195  self.coolpath='/TDAQ/RunCtrl'
196  self.cooltlbpath='/TRIGGER/LUMI'
197  self.nowtime=time.time()*1000000000
198  # no restriction on initial selection
199  self.onlyRec=False
200  self.mask=0
201  self.runType=""
202  self.filenameTag=""
203 
204  # intial values
205  self.lbrunmap={}
206  self.runmap={}
207  self.triglbmap={}
208 
209  def close(self):
210  "Close the database connections"
211  self.cooldb.closeDatabase()
212  self.cooltrigdb.closeDatabase()
213  self.cooldb=None
214  self.cooltrigdb=None
215 
216  def setSelection(self,onlyRec=False,mask=0,runType="",filenameTag="",detStatus="",detStatusTag="HEAD"):
217  self.onlyRec=onlyRec
218  self.mask=mask
219  self.runType=runType
220  self.filenameTag=filenameTag
221  self.detstatus=detStatus
222  self.detstatustag=detStatusTag
223 
224  def listFromTime(self,time1=cool.ValidityKeyMin,time2=cool.ValidityKeyMax):
225  "Main entry point - setup and check data given a range of times"
226  self.lbrunmap=self.runsFromTime(time1,time2)
227  # set the limits on run and time from the list of runs returned
228  self.minrun=(1 << 31)-1
229  self.maxrun=0
230  self.mintime=cool.ValidityKeyMax
231  self.maxtime=cool.ValidityKeyMin
232  for (run,value) in self.lbrunmap.items():
233  if (self.loglevel>1): print ("listFromTime: Process run",run)
234  if (run<self.minrun): self.minrun=run
235  if (run>self.maxrun): self.maxrun=run
236  if (value.start<self.mintime): self.mintime=value.start
237  if (value.stop>self.maxtime and value.stop<cool.ValidityKeyMax): self.maxtime=value.stop
238  if (self.loglevel>0):
239  print ("Run range [%i,%i] times (%s,%s)" % (self.minrun,self.maxrun,timeRep(self.mintime),timeRep(self.maxtime)))
240  # now get the runmap
241  self.runmap=self.runsFromSEOR(self.minrun,self.maxrun)
242  # add in the time/LB information and check consistency
243  self.correlateLB()
244  if (self.usetrig):
245  self.correlateTrigger()
246 
247  def listFromRuns(self,run1=0,run2=(1 << 31)-1):
248  "Main entry point - setup and check data given inclusive range of runs"
249  self.runmap=self.runsFromSEOR(run1,run2)
250  # set the limits on run and time from the list of runs returned
251  self.minrun=(1 << 31)-1
252  self.maxrun=0
253  self.mintime=cool.ValidityKeyMax
254  self.maxtime=cool.ValidityKeyMin
255  for runp in self.runmap.values():
256  run=runp.run
257  if (run<self.minrun): self.minrun=run
258  if (run>self.maxrun): self.maxrun=run
259  if (runp.start<self.mintime): self.mintime=runp.start
260  if (runp.start>self.maxtime): self.maxtime=runp.start
261  if (runp.stop is not None and runp.stop>self.maxtime): self.maxtime=runp.stop
262  # get the LBParams info based on the derived time range
263  self.lbrunmap=self.runsFromTime(self.mintime,self.maxtime)
264  # add in the time/LB information and check consistency
265  self.correlateLB()
266  if (self.usetrig):
267  self.correlateTrigger()
268 
269 
270  def runsFromTime(self,time1=cool.ValidityKeyMin,time2=cool.ValidityKeyMax):
271  """Query /TDAQ/RunCtrl/LB_Params to get list of runs/LBs in time range,
272  returning a map of run numbers to LB_Params objects"""
273  folderLB_Params=self.cooldb.getFolder(self.coolpath+'/LB_Params')
274  itr=folderLB_Params.browseObjects(time1,time2,cool.ChannelSelection.all())
275  srun=-1
276  slbmax = None
277  sstart = None
278  send = None
279  runlist={}
280  while itr.goToNext():
281  obj=itr.currentRef()
282  # ignore openended IOVs which start before the time interval
283  # these will be unclosed LB records from old runs
284  if (obj.until()<cool.ValidityKeyMax or obj.since()>=time1):
285  payload=obj.payload()
286  run=payload['RunNumber']
287  lb=payload['LuminosityBlock']
288  if (run!=srun):
289  # seeing a new run - store old one if needed
290  if (srun>-1):
291  runlist[srun]=LBParams(srun,slbmax,sstart,send)
292  srun=run
293  slbmax=lb
294  sstart=obj.since()
295  send=obj.until()
296  else:
297  if (lb>slbmax): slbmax=lb
298  if (obj.until()>send): send=obj.until()
299  if (obj.since()<sstart): sstart=obj.since()
300  itr.close()
301  # store last run
302  if (srun>-1):
303  runlist[srun]=LBParams(srun,slbmax,sstart,send)
304  if (self.loglevel>0): print ("Run list from LB_Params has %i entries" % len(runlist))
305  return runlist
306 
307  def runsFromSEOR(self,run1=0,run2=(1 << 31)-1):
308  """Query /TDAQ/RunCtrl/LB_Params to get details of runs in runrange
309  Use both SOR_Params and EOR_Params to catch runs which ended badly.
310  Return a map of runs to RunParams objects"""
311  # get detector status information if needed
312  iov1=run1 << 32
313  iov2=(run2+1) << 32
314  if (iov2>cool.ValidityKeyMax): iov2=cool.ValidityKeyMax
315  if (self.detstatus!=""):
316  if (self.loglevel>0):
317  print ("Applying detector status cuts: %s" % self.detstatus)
318  gooddetstatus=statusCutsToRange(self.coolstatusdb,'/GLOBAL/DETSTATUS/LBSUMM',iov1,iov2,self.detstatustag,self.detstatus)
319  else:
320  gooddetstatus=RangeList(iov1,iov2)
321 
322  runlist={}
323  folderSOR_Params=self.cooldb.getFolder(self.coolpath+'/SOR_Params')
324  itr=folderSOR_Params.browseObjects((run1 << 32),(run2 << 32),cool.ChannelSelection.all())
325  while itr.goToNext():
326  obj=itr.currentRef()
327  payload=obj.payload()
328  run=payload['RunNumber']
329  # correction for inverted RecEnabled logic here
330  if (self.checkSelection(not payload['RecordingEnabled'],payload['DetectorMask'],payload['RunType'],payload['FilenameTag']) and len(gooddetstatus.getAllowedRanges(run << 32, (run+1) << 32))>0):
331  runlist[run]=RunParams(run,payload['SORTime'],payload['RunType'],payload['DAQConfiguration'],payload['DetectorMask'],payload['FilenameTag'],payload['RecordingEnabled'],payload['DataSource'])
332  itr.close()
333  if (self.loglevel>0):
334  print ("SOR_Params has data for %i runs" % len(runlist))
335 
336  # now query EOR_Params and fill in missing info
337  neor=0
338  folderEOR_Params=self.cooldb.getFolder(self.coolpath+'/EOR_Params')
339  itr=folderEOR_Params.browseObjects((run1 << 32),(run2 << 32),cool.ChannelSelection.all())
340  while itr.goToNext():
341  obj=itr.currentRef()
342  payload=obj.payload()
343  run=payload['RunNumber']
344  #maxlb=(obj.until() & 0xFFFFFFF)-1
345  #if (maxlb==0 or maxlb==0xFFFFFFFF): maxlb=None
346  maxlb=None
347  # note that run may not be found if filtered from SOR list by
348  # selection
349  if (run in runlist.keys()):
350  runlist[run].addEORInfo(payload['EORTime'],payload['TotalTime'],payload['CleanStop'],maxlb)
351  runlist[run].updateEORInfo(payload['DAQConfiguration'])
352  neor+=1
353  if (self.loglevel>0):
354  print ("EOR_Params has data for %i runs" % neor)
355  itr.close()
356 
357  # now query FinalSFOStats and fill in event counts
358  nsfo=0
359  folderSFOStat=self.cooldb.getFolder(self.coolpath+'/FinalSFOStat')
360  itr=folderSFOStat.browseObjects((run1 << 32),(run2 << 32),cool.ChannelSelection.all())
361  while itr.goToNext():
362  obj=itr.currentRef()
363  payload=obj.payload()
364  run=obj.since() >> 32
365  if (run in runlist.keys()):
366  runlist[run].addSFOStat(payload['PartitionName'],payload['ReceivedEvents'],payload['StoredEvents'])
367  nsfo+=1
368  itr.close()
369  if (self.loglevel>0):
370  print ("FinalSFOStat has data for %i runs" % nsfo)
371 
372  # now query EventCounters and fill in trigger counts/partition name
373  nevc=0
374  folderEvtCount=self.cooldb.getFolder(self.coolpath+'/EventCounters')
375  itr=folderEvtCount.browseObjects((run1 << 32),(run2 << 32),cool.ChannelSelection.all())
376  while itr.goToNext():
377  obj=itr.currentRef()
378  payload=obj.payload()
379  run=obj.since() >> 32
380  if (run in runlist.keys()):
381  runlist[run].addEventCounters(payload['PartitionName'],payload['L1Events'],payload['L2Events'],payload['EFEvents'],payload['RecordedEvents'])
382  nevc+=1
383  itr.close()
384  if (self.loglevel>0):
385  print ("EventCounters has data for %i runs" % nevc)
386 
387  return runlist
388 
389  def correlateLB(self):
390  """Go through the runmap and lookup LB info, also flag missing EOR
391  in the error structures"""
392  for runp in self.runmap.values():
393  run=runp.run
394  if run in self.lbrunmap.keys():
395  lbinfo=self.lbrunmap[run]
396  if (runp.maxlb is None):
397  runp.maxlb=lbinfo.lb
398  else:
399  runp.setErr(2)
400  if runp.cleanstop is None:
401  runp.setErr(0)
402 
403  def checkSelection(self,rec,mask,runtype,tag):
404  "Check whether run passes selection cuts"
405  if (self.onlyRec and not rec): return False
406  # mask - all specified bits must be set
407  if ((self.mask & mask) != self.mask): return False
408  # run type and filenametag: specified string must be included in value
409  if (self.runType!="" and runtype.upper().find(self.runType.upper())==-1): return False
410  if (self.filenameTag!="" and tag.find(self.filenameTag)==-1): return False
411  return True
412 
413  def correlateTrigger(self):
414  "Retrieve run/LB information from trigger and correlate with RunCtrl"
415  srun=-1
416  slbmax = None
417  sstart = None
418  send = None
419  self.triglbmap={}
420  folderTrigLBLB=self.cooltrigdb.getFolder(self.cooltlbpath+'/LBLB')
421  itr=folderTrigLBLB.browseObjects((self.minrun << 32),((self.maxrun+1) << 32),cool.ChannelSelection.all())
422  while itr.goToNext():
423  obj=itr.currentRef()
424  since=obj.since()
425  run=since >> 32
426  lb=since & 0xFFFFFFFF
427  payload=obj.payload()
428  start=payload['StartTime']
429  end=payload['EndTime']
430  if (run!=srun):
431  # seeing a new run - store old one if needed
432  if (srun>-1):
433  self.triglbmap[srun]=TrigLBParams(srun,slbmax,sstart,send)
434  srun=run
435  slbmax=lb
436  sstart=start
437  send=end
438  else:
439  if (lb>slbmax): slbmax=lb
440  if (start<sstart): sstart=start
441  if (end>send): send=end
442  itr.close()
443  # store last run
444  if (srun>-1):
445  self.triglbmap[srun]=TrigLBParams(srun,slbmax,sstart,send)
446  if (self.loglevel>0):
447  print ("Trigger LB map has data for %i runs" % len(self.triglbmap))
448 
449  # now loop through primary run list and add trigger information
450  nbad=0
451  npatch=0
452  for runp in self.runmap.values():
453  run=runp.run
454  if run in self.triglbmap.keys():
455  triglb=self.triglbmap[run]
456  if (runp.stop is None):
457  if (self.loglevel>1):
458  print ("Trigger end time will substitute %i %i" % (run,triglb.stop))
459  runp.patchEndTime(triglb.stop)
460  npatch+=1
461  else:
462  nbad+=1
463  if (self.loglevel>0):
464  print ("Missing trigger information for %i runs, patched EOR for %i" % (nbad,npatch))
465 
466  def listErrors(self):
467  "List runs which have errors to text output"
468  nerr=0
469  for runp in self.runmap.values():
470  if (runp.errcode>0):
471  print (runp.decodeErr())
472  if (len(runp.errlist)>0):
473  for i in runp.errlist:
474  print ("Run %i %s" % (runp.run,i))
475  nerr+=1
476  print ("Total of %i runs with errors" % nerr)
477 
478  def listRuns(self,format="",lastfirst=False):
479  "List run details to text output"
480  if (self.loglevel>=1):
481  title=" Run Events LumiB"
482  if ('t' in format):
483  title+=' StartTime StopTime'
484  if ('a' in format):
485  title+=' L1Events L2Events EFEvents'
486  if ('e' in format):
487  title+=' ErrC'
488  if ('r' in format):
489  title+=' Rec Cln'
490  if ('c' in format):
491  title+=' RunType DetectorMask'
492  if ('d' in format):
493  title+=' DAQConfiguration PartitionName FilenameTag '
494  print (title)
495  runkeys=self.runmap.keys()
496  runkeys.sort(reverse=lastfirst)
497  for irun in runkeys:
498  runp=self.runmap[irun]
499  line="%8i %8i %6i" % (runp.run,noneZero(runp.storedevents),noneZero(runp.maxlb))
500  if ('t' in format):
501  line+=' %20s %20s' % (timeRep(runp.start),timeRep(runp.stop))
502  if ('a' in format):
503  line+=' %8i %8i %8i' % (noneZero(runp.l1events),noneZero(runp.l2events),noneZero(runp.efevents))
504  if ('e' in format):
505  line+=' %4i' % runp.errcode
506  if ('r' in format):
507  line+=' %3s %3s' % (boolRep(runp.rec),boolRep(runp.cleanstop))
508  if ('c' in format):
509  line+=' %-20s %16x' % (runp.runtype,runp.detmask)
510  if ('d' in format):
511  line+=' %-20s %-16s %-20s' % (runp.daqconfig,noneStr(runp.partname),runp.filetag)
512  print (line)
513 
514 
515 
516  def makeWebSummary(self,filename,header,lastfirst=False):
517  htfile=open(filename,'w')
518  htfile.write("""<head>
519 <title>Run Summary for %s</title></head>
520 <body>
521 <h2>COOL/RunControl Run Summary for %s</h2>
522 
523 Data extracted from /TDAQ/RunCtrl SOR_Params, EOR_Params and LB_Params folders
524 for runs %i to %i (times %s to %s) on <b>%s</b>. All time are in <b>UTC</b>,
525 two hours behind Geneva local time. <font color=\"008000\">Green</font> runs
526 were recorded with clean stop, <font color=\"FF0000\">red</font> runs were
527 recorded without clean stop or RunCtrl EOR record.
528 Black runs were not recorded.
529 <p>""" % (header,header,self.minrun,self.maxrun,timeRep(self.mintime),timeRep(self.maxtime),timeRep(self.nowtime)))
530  htfile.write("<table border=\"0\">\n<tr align=\"left\"><th>Run</th><th>Events</th><th>L1</th><th>L2</th><th>EF</th><th>MaxLB</th><th>Start time</th><th>Stop time</th><th>Duration</th><th>Rec</th><th>Clean</th><th>RunType</th><th>DetMask</th><th>DAQConfig</th><th>Partition</th><th>FilenameTag</th></tr>\n")
531  # loop over the runs
532  detmasklist=[]
533  runkeys=self.runmap.keys()
534  runkeys.sort(reverse=lastfirst)
535  #for runp in self.runmap.values():
536  for irun in runkeys:
537  runp=self.runmap[irun]
538  if (runp.storedevents is not None):
539  storeevt=str(runp.storedevents)
540  else:
541  storeevt="---"
542  if (runp.maxlb is not None):
543  maxlb=str(runp.maxlb)
544  else:
545  maxlb='---'
546  start=timeRep(runp.start)
547  stop=timeRep(runp.stop)
548  if (runp.totaltime is not None):
549  tottime=str(runp.totaltime)
550  else:
551  tottime='---'
552  rec=boolRep(runp.rec)
553  clean=boolRep(runp.cleanstop)
554  # set colour based on status
555  col='000000' # black for non-recorded runs
556  if (runp.rec):
557  if (runp.cleanstop is True):
558  col='008000' # green - for runs with EOR and cleanstop
559  else:
560  col='FF0000' # red - for runs without EOR or cleanstop
561  detmask=runp.detmask
562  if (detmask==0):
563  ldetmask=""
564  else:
565  ldetmask="<a href=#maskdecode%x>" % detmask
566  if (detmask not in detmasklist): detmasklist+=[detmask]
567  htfile.write("<tr style=\"color:#%s\"><td>%i</td><td>%s</td><td>%i</td><td>%i</td><td>%i</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s%x</td><td>%s</td><td>%s</td><td>%s</td></tr>\n" % (col,runp.run,storeevt,noneZero(runp.l1events),noneZero(runp.l2events),noneZero(runp.efevents),maxlb,start,stop,tottime,rec,clean,runp.runtype,ldetmask,detmask,runp.daqconfig,noneStr(runp.partname),runp.filetag))
568  htfile.write("</table>\n")
569  htfile.write("<p>\nTotal of %i runs analysed\n<p>" % len(self.runmap))
570  # add information on decoding the detmask
571  detmasklist.sort()
572  htfile.write("Detector mask decoding for these runs:\n<ul>\n")
573  for mask in detmasklist:
574  htfile.write("<li><a name=maskdecode%x><b>%x</b>: %s</li>\n" % (mask,mask,maskDecode(mask)))
575  htfile.write("</ul>\n")
576  htfile.write("\n</body>\n")
577  htfile.close()
578 
python.RunLister.RunParams.decodeErr
def decodeErr(self)
Definition: RunLister.py:137
python.RunLister.coolRunLister.onlyRec
onlyRec
Definition: RunLister.py:198
python.RunLister.coolRunLister.correlateTrigger
def correlateTrigger(self)
Definition: RunLister.py:413
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.RunLister.TrigLBParams.run
run
Definition: RunLister.py:158
python.RunLister.RunParams.addMsg
def addMsg(self, msg)
Definition: RunLister.py:134
python.RunLister.coolRunLister.runsFromSEOR
def runsFromSEOR(self, run1=0, run2=(1<< 31) -1)
Definition: RunLister.py:307
python.RunLister.coolRunLister.nowtime
nowtime
Definition: RunLister.py:196
python.RunLister.TrigLBParams.__init__
def __init__(self, run, lb, start, stop)
Definition: RunLister.py:157
python.RunLister.coolRunLister.filenameTag
filenameTag
Definition: RunLister.py:201
python.RunLister.coolRunLister
Definition: RunLister.py:164
python.RunLister.RunParams
Definition: RunLister.py:65
python.RunLister.RunParams.recevents
recevents
Definition: RunLister.py:85
python.RunLister.RunParams.daqconfig
daqconfig
Definition: RunLister.py:71
python.RunLister.coolRunLister.runType
runType
Definition: RunLister.py:200
python.RunLister.TrigLBParams.stop
stop
Definition: RunLister.py:161
python.RunLister.LBParams.lb
lb
Definition: RunLister.py:61
python.RunLister.coolRunLister.listRuns
def listRuns(self, format="", lastfirst=False)
Definition: RunLister.py:478
python.RunLister.coolRunLister.listFromTime
def listFromTime(self, time1=cool.ValidityKeyMin, time2=cool.ValidityKeyMax)
Definition: RunLister.py:224
python.RunLister.coolRunLister.listErrors
def listErrors(self)
Definition: RunLister.py:466
python.RunLister.RunParams.storedevents
storedevents
Definition: RunLister.py:86
python.RunLister.coolRunLister.cooltrigdb
cooltrigdb
Definition: RunLister.py:176
python.RunLister.RunParams.__init__
def __init__(self, run, start, runtype, daqconfig, detmask, filetag, rec, datasource)
Definition: RunLister.py:67
python.RunLister.coolRunLister.close
def close(self)
Definition: RunLister.py:209
upper
int upper(int c)
Definition: LArBadChannelParser.cxx:49
python.RunLister.coolRunLister.detstatustag
detstatustag
Definition: RunLister.py:222
python.RunLister.coolRunLister.makeWebSummary
def makeWebSummary(self, filename, header, lastfirst=False)
Definition: RunLister.py:516
python.RunLister.coolRunLister.runmap
runmap
Definition: RunLister.py:205
python.RunLister.LBParams.run
run
Definition: RunLister.py:60
python.RunLister.coolRunLister.checkSelection
def checkSelection(self, rec, mask, runtype, tag)
Definition: RunLister.py:403
python.RunLister.RunParams.filetag
filetag
Definition: RunLister.py:73
python.Bindings.values
values
Definition: Control/AthenaPython/python/Bindings.py:797
python.RunLister.RunParams.l1events
l1events
Definition: RunLister.py:89
python.RunLister.coolRunLister.listFromRuns
def listFromRuns(self, run1=0, run2=(1<< 31) -1)
Definition: RunLister.py:247
python.RunLister.LBParams.stop
stop
Definition: RunLister.py:63
python.RunLister.TrigLBParams
Definition: RunLister.py:155
python.RunLister.noneZero
def noneZero(value)
Definition: RunLister.py:31
python.RunLister.LBParams.start
start
Definition: RunLister.py:62
python.RunLister.coolRunLister.coolpath
coolpath
Definition: RunLister.py:194
python.RunLister.RunParams.efevents
efevents
Definition: RunLister.py:91
python.RunLister.RunParams.start
start
Definition: RunLister.py:69
python.RunLister.coolRunLister.__init__
def __init__(self, cooltdaqdbconn, cooltrigdbconn, coolstatusdbconn, oracle=False, loglevel=1)
Definition: RunLister.py:166
python.RunLister.RunParams.addSFOStat
def addSFOStat(self, partname, recevents, storedevents)
Definition: RunLister.py:110
python.RunLister.RunParams.totaltime
totaltime
Definition: RunLister.py:79
python.RunLister.coolRunLister.detstatus
detstatus
Definition: RunLister.py:221
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
python.RunLister.coolRunLister.mask
mask
Definition: RunLister.py:199
python.RunLister.TrigLBParams.start
start
Definition: RunLister.py:160
python.RunLister.coolRunLister.correlateLB
def correlateLB(self)
Definition: RunLister.py:389
python.RunLister.RunParams.maxlb
maxlb
Definition: RunLister.py:82
python.RunLister.coolRunLister.loglevel
loglevel
Definition: RunLister.py:193
python.RunLister.coolRunLister.maxrun
maxrun
Definition: RunLister.py:229
python.RunLister.RunParams.stop
stop
Definition: RunLister.py:78
python.RunLister.RunParams.detmask
detmask
Definition: RunLister.py:72
python.RunLister.RunParams.rec
rec
Definition: RunLister.py:75
python.RunLister.LBParams
Definition: RunLister.py:57
python.RunLister.RunParams.addEventCounters
def addEventCounters(self, partname, l1events, l2events, efevents, storedevents)
Definition: RunLister.py:115
python.RunLister.RunParams.setErr
def setErr(self, bit, msg="")
Definition: RunLister.py:129
python.RunLister.coolRunLister.lbrunmap
lbrunmap
Definition: RunLister.py:204
python.RunLister.RunParams.l2events
l2events
Definition: RunLister.py:90
python.RunLister.coolRunLister.runsFromTime
def runsFromTime(self, time1=cool.ValidityKeyMin, time2=cool.ValidityKeyMax)
Definition: RunLister.py:270
python.RunLister.coolRunLister.setSelection
def setSelection(self, onlyRec=False, mask=0, runType="", filenameTag="", detStatus="", detStatusTag="HEAD")
Definition: RunLister.py:216
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
python.RunLister.coolRunLister.cooldb
cooldb
Definition: RunLister.py:169
python.RunLister.coolRunLister.maxtime
maxtime
Definition: RunLister.py:231
python.RunLister.noneStr
def noneStr(value)
Definition: RunLister.py:38
python.RunLister.timeRep
def timeRep(value)
Definition: RunLister.py:13
python.DetStatusCoolLib.statusCutsToRange
def statusCutsToRange(dbconn, foldername, since, until, tag, statusreq)
Definition: DetStatusCoolLib.py:11
python.RunLister.TrigLBParams.maxlb
maxlb
Definition: RunLister.py:159
Trk::open
@ open
Definition: BinningType.h:40
python.RunLister.coolRunLister.minrun
minrun
Definition: RunLister.py:228
python.RunLister.RunParams.partname
partname
Definition: RunLister.py:84
python.RunLister.LBParams.__init__
def __init__(self, run, lb, start, stop)
Definition: RunLister.py:59
python.RunLister.RunParams.errlist
errlist
Definition: RunLister.py:93
python.RunLister.coolRunLister.triglbmap
triglbmap
Definition: RunLister.py:206
python.RunLister.coolRunLister.usetrig
usetrig
Definition: RunLister.py:178
python.RunLister.maskDecode
def maskDecode(mask)
Definition: RunLister.py:45
python.RunLister.coolRunLister.cooltlbpath
cooltlbpath
Definition: RunLister.py:195
python.RunLister.RunParams.patchEndTime
def patchEndTime(self, stop)
Definition: RunLister.py:123
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
python.RunLister.RunParams.addEORInfo
def addEORInfo(self, stop, totaltime, cleanstop, maxlb)
Definition: RunLister.py:95
python.RunLister.RunParams.datasource
datasource
Definition: RunLister.py:76
python.RunLister.boolRep
def boolRep(value)
Definition: RunLister.py:21
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
python.RunLister.RunParams.updateEORInfo
def updateEORInfo(self, daqconfig)
Definition: RunLister.py:102
python.AtlCoolLib.indirectOpen
def indirectOpen(coolstr, readOnly=True, debug=False)
Definition: AtlCoolLib.py:130
python.RunLister.RunParams.runtype
runtype
Definition: RunLister.py:70
python.RunLister.RunParams.errcode
errcode
Definition: RunLister.py:92
python.RunLister.coolRunLister.mintime
mintime
Definition: RunLister.py:230
python.RunLister.RunParams.run
run
Definition: RunLister.py:68
python.RunLister.RunParams.cleanstop
cleanstop
Definition: RunLister.py:80
python.RunLister.coolRunLister.coolstatusdb
coolstatusdb
Definition: RunLister.py:186