CMS 3D CMS Logo

specificLumi.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 ########################################################################
3 # Command to produce perbunch and specific lumi #
4 # #
5 # Author: Zhen Xie #
6 ########################################################################
7 #
8 # dump all fills into files.
9 # allfills.txt all the existing fills.
10 # fill_num.txt all the runs in the fill
11 # dumpFill -o outputdir
12 # dumpFill -f fillnum generate runlist for the given fill
13 #
14 import os,os.path,sys,math,array,datetime,time,calendar,re
15 import coral
16 
17 from RecoLuminosity.LumiDB import argparse,sessionManager,lumiTime,CommonUtil,lumiCalcAPI,lumiParameters,revisionDML,normDML
18 MINFILL=1800
19 MAXFILL=9999
20 allfillname='allfills.txt'
21 
22 def getFillFromDB(schema,fillnum):
23  '''
24  output: {run:starttime}
25  '''
26  runtimesInFill={}
27  fillrundict=lumiCalcAPI.fillrunMap(schema,fillnum)
28  if len(fillrundict)>0:
29  runs=fillrundict.values()[0]
30  runlsdict=dict(list(zip(runs,[None]*len(runs))))
31  runresult=lumiCalcAPI.runsummary(schema,runlsdict)
32  for perrundata in runresult:
33  runtimesInFill[perrundata[0]]=perrundata[7]
34  return runtimesInFill
35 
36 def listfilldir(indir):
37  '''
38  list all fills contained in the given dir
39  input: indir
40  output: [fill]
41  '''
42  fillnamepat=r'^[0-9]{4}$'
43  p=re.compile(fillnamepat)
44  processedfills=[]
45  dirList=os.listdir(indir)
46  for fname in dirList:
47  if p.match(fname) and os.path.isdir(os.path.join(indir,fname)):#found fill dir
48  allfs=os.listdir(os.path.join(indir,fname))
49  for myfile in allfs:
50  sumfilenamepat=r'^[0-9]{4}_bxsum_CMS.txt$'
51  s=re.compile(sumfilenamepat)
52  if s.match(myfile):
53  #only if fill_summary_CMS.txt file exists
54  processedfills.append(int(fname))
55  return processedfills
56 
57 def lastcompleteFill(infile):
58  '''
59  parse infile to find LASTCOMPLETEFILL
60  input: input file name
61  output: last completed fill number
62  '''
63  lastfill=None
64  hlinepat=r'(LASTCOMPLETEFILL )([0-9]{4})'
65  h=re.compile(hlinepat)
66  dqmfile=open(infile,'r')
67  for line in dqmfile:
68  result=h.match(line)
69  if result:
70  lastfill=result.group(2)
71  break
72  return int(lastfill)
73 
74 def calculateSpecificLumi(lumi,lumierr,beam1intensity,beam1intensityerr,beam2intensity,beam2intensityerr):
75  '''
76  calculate specific lumi
77  input: instlumi, instlumierror,beam1intensity,beam1intensityerror,beam2intensity,beam2intensityerror
78  output (specific lumi value,specific lumi error)
79  '''
80  specificlumi=0.0
81  specificlumierr=0.0
82  if beam1intensity<0: beam1intensity=0
83  if beam2intensity<0: beam2intensity=0
84  if beam1intensity>0.0 and beam2intensity>0.0:
85  specificlumi=float(lumi)/(float(beam1intensity)*float(beam2intensity))
86  specificlumierr=specificlumi*math.sqrt(lumierr**2/lumi**2+beam1intensityerr**2/beam1intensity**2+beam2intensityerr**2/beam2intensity**2)
87  return (specificlumi,specificlumierr)
88 
89 def getFillFromFile(fillnum,inputdir):
90  '''
91  parse fill_xxx.txt files in the input directory for runs, starttime in the fill
92  input: fillnumber, input dir
93  output: {run:tarttime}
94  '''
95  runtimesInFill={}
96  #look for files 'fill_num.txt' in inputdir
97  for filename in os.listdir(inputdir):
98  mpat=r'^fill_[0-9]{4}.txt$'
99  m=re.compile(mpat)
100  if m.match(filename) is None:
101  continue
102  filename=filename.strip()
103  if filename.find('.')==-1: continue
104  basename,extension=filename.split('.')
105  if not extension or extension!='txt':
106  continue
107  if basename.find('_')==-1: continue
108  prefix,number=basename.split('_')
109  if not number : continue
110  if fillnum!=int(number):continue
111  f=open(os.path.join(inputdir,'fill_'+number+'.txt'),'r')
112  for line in f:
113  l=line.strip()
114  fields=l.split(',')
115  if len(fields)<2 : continue
116  runtimesInFill[int(fields[0])]=fields[1]
117  f.close()
118  return runtimesInFill
119 
120 #####output methods####
121 def filltofiles(allfills,runsperfill,runtimes,dirname):
122  '''
123  write runnumber:starttime map per fill to files
124  '''
125  f=open(os.path.join(dirname,allfillname),'w')
126  for fill in allfills:
127  print >>f,'%d'%(fill)
128  f.close()
129  for fill,runs in runsperfill.items():
130  filename='fill_'+str(fill)+'.txt'
131  if len(runs)!=0:
132  f=open(os.path.join(dirname,filename),'w')
133  for run in runs:
134  print >>f,'%d,%s'%(run,runtimes[run])
135  f.close()
136 
137 def specificlumiTofile(fillnum,filldata,outdir):
138  #
139  #input : fillnum
140  # filldata: {bxidx:[[lstime,beamstatusfrac,lumivalue,lumierror,speclumi,speclumierr]],[]}
141  #sorted by bxidx, sorted by lstime inside list
142  #check outdir/fillnum subdir exists; if not, create it; else outdir=outdir/fillnum
143  #
144  if not filldata:
145  print 'empty input data, do nothing for fill ',fillnum
146  return
147  timedict={}#{lstime:[[stablebeamfrac,lumi,lumierr,speclumi,speclumierr]]}
148  filloutdir=os.path.join(outdir,str(fillnum))
149  if not os.path.exists(filloutdir):
150  os.mkdir(filloutdir)
151  for cmsbxidx,perbxdata in filldata.items():
152  lhcbucket=0
153  if cmsbxidx!=0:
154  lhcbucket=(cmsbxidx-1)*10+1
155  a=sorted(perbxdata,key=lambda x:x[0])
156  filename=str(fillnum)+'_lumi_'+str(lhcbucket)+'_CMS.txt'
157  linedata=[]
158  for perlsdata in a:
159  ts=int(perlsdata[0])
160  beamstatusfrac=perlsdata[1]
161  lumi=perlsdata[2]
162  lumierror=perlsdata[3]
163  #beam1intensity=perlsdata[4]
164  #beam2intensity=perlsdata[5]
165  speclumi=perlsdata[4]
166  speclumierror= perlsdata[5]
167  if lumi>0:
168  linedata.append([ts,beamstatusfrac,lumi,lumierror,speclumi,speclumierror])
169  if ts not in timedict:
170  timedict[ts]=[]
171  timedict[ts].append([beamstatusfrac,lumi,lumierror,speclumi,speclumierror])
172  if len(linedata)>10:#at least 10 good ls
173  f=open(os.path.join(filloutdir,filename),'w')
174  for line in linedata:
175  print >>f, '%d\t%e\t%e\t%e\t%e\t%e'%(line[0],line[1],line[2],line[3],line[4],line[5])
176  f.close()
177  #print 'writing avg file'
178  summaryfilename=str(fillnum)+'_lumi_CMS.txt'
179  f=None
180  lstimes=sorted(timedict.keys())
181  fillseg=[]
182  lscounter=0
183  for lstime in lstimes:
184  allvalues=timedict[lstime]
185  transposedvalues=CommonUtil.transposed(allvalues,0.0)
186  bstatfrac=transposedvalues[0][0]#beamstatus does not change with bx position
187  lumivals=transposedvalues[1]
188  lumitot=sum(lumivals)
189  if bstatfrac==1.0 :
190  fillseg.append([lstime,lumitot])
191  lumierrs=transposedvalues[2]
192  lumierrortot=math.sqrt(sum(map(lambda x:x**2,lumierrs)))
193  specificvals=transposedvalues[3]
194  specificavg=sum(specificvals)/float(len(specificvals))#avg spec lumi
195  specificerrs=transposedvalues[4]
196  specifictoterr=math.sqrt(sum(map(lambda x:x**2,specificerrs)))
197  specificerravg=specifictoterr/float(len(specificvals))
198  if lscounter==0:
199  f=open(os.path.join(filloutdir,summaryfilename),'w')
200  lscounter+=1
201  print >>f,'%d\t%e\t%e\t%e\t%e\t%e'%(lstime,bstatfrac,lumitot,lumierrortot,specificavg,specificerravg)
202  if f is not None:
203  f.close()
204  #print 'writing summary file'
205  fillsummaryfilename=str(fillnum)+'_bxsum_CMS.txt'
206  f=open(os.path.join(filloutdir,fillsummaryfilename),'w')
207  if len(fillseg)==0:
208  print >>f,'%s'%('#no stable beams')
209  f.close()
210  return
211  previoustime=fillseg[0][0]
212  boundarytime=fillseg[0][0]
213  #print 'boundary time ',boundarytime
214  summaryls={}
215  summaryls[boundarytime]=[]
216  for [lstime,lumitot] in fillseg:#fillseg is everything with stable beam flag
217  if lstime-previoustime>50.0:
218  boundarytime=lstime
219  #print 'found new boundary ',boundarytime
220  summaryls[boundarytime]=[]
221  # print 'appending ',boundarytime,lstime,lumitot
222  summaryls[boundarytime].append([lstime,lumitot])
223  previoustime=lstime
224  #print summaryls
225 
226  summarylstimes=summaryls.keys()
227  summarylstimes.sort()
229  for bts in summarylstimes:
230  startts=bts
231  tsdatainseg=summaryls[bts]
232  #print 'tsdatainseg ',tsdatainseg
233  stopts=tsdatainseg[-1][0]
234  plu=max(CommonUtil.transposed(tsdatainseg,0.0)[1])
235  lui=sum(CommonUtil.transposed(tsdatainseg,0.0)[1])*lumip.lslengthsec()
236  print >>f,'%d\t%d\t%e\t%e'%(startts,stopts,plu,lui)
237  f.close()
238 
239 def getSpecificLumi(schema,fillnum,inputdir,dataidmap,normmap,xingMinLum=0.0,amodetag='PROTPHYS',bxAlgo='OCC1'):
240  '''
241  specific lumi in 1e-30 (ub-1s-1) unit
242  lumidetail occlumi in 1e-27
243  1309_lumi_401_CMS.txt
244  time(in seconds since January 1,2011,00:00:00 UTC) stab(fraction of time spent in stable beams for this time bin) l(lumi in Hz/ub) dl(point-to-point error on lumi in Hz/ub) sl(specific lumi in Hz/ub) dsl(error on specific lumi)
245  20800119.0 1 -0.889948 0.00475996848729 0.249009 0.005583287562 -0.68359 6.24140208607 0.0 0.0 0.0 0.0 0.0 0.0 0.0383576 0.00430892097862 0.0479095 0.00430892097862 66.6447 4.41269758764 0.0 0.0 0.0
246  result [(time,beamstatusfrac,lumi,lumierror,speclumi,speclumierror)]
247  '''
249  fillbypos={}#{bxidx:[[ts,beamstatusfrac,lumi,lumierror,spec1,specerror],[]]}
250  runtimesInFill=getFillFromDB(schema,fillnum)#{runnum:starttimestr}
251  runlist=runtimesInFill.keys()
252  if not runlist: return fillbypos
253  irunlsdict=dict(list(zip(runlist,[None]*len(runlist))))
254  #prirunlsdict
255  GrunsummaryData=lumiCalcAPI.runsummaryMap(session.nominalSchema(),irunlsdict)
256  lumidetails=lumiCalcAPI.deliveredLumiForIds(schema,irunlsdict,dataidmap,GrunsummaryData,beamstatusfilter=None,normmap=normmap,withBXInfo=True,bxAlgo=bxAlgo,xingMinLum=xingMinLum,withBeamIntensity=True,lumitype='HF')
257  #
258  #output: {run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),calibratedlumierr(6),(bxvalues,bxerrs)(7),(bxidx,b1intensities,b2intensities)(8),fillnum(9)]}
259  #
260  totalstablebeamls=0
261  orderedrunlist=sorted(lumidetails)
262  for run in orderedrunlist:
263  perrundata=lumidetails[run]
264  for perlsdata in perrundata:
265  beamstatus=perlsdata[3]
266  if beamstatus=='STABLE BEAMS':
267  totalstablebeamls+=1
268  #print 'totalstablebeamls in fill ',totalstablebeamls
269  if totalstablebeamls<10:#less than 10 LS in a fill has 'stable beam', it's no a good fill
270  print 'fill ',fillnum,' , having less than 10 stable beam lS, is not good, skip'
271  return fillbypos
273  for run in orderedrunlist:
274  perrundata=lumidetails[run]
275  for perlsdata in perrundata:
276  beamstatusfrac=0.0
277  tsdatetime=perlsdata[2]
278  ts=calendar.timegm(tsdatetime.utctimetuple())
279  beamstatus=perlsdata[3]
280  if beamstatus=='STABLE BEAMS':
281  beamstatusfrac=1.0
282  (bxidxlist,bxvaluelist,bxerrolist)=perlsdata[7]
283  #instbxvaluelist=[x/lumiparam.lslengthsec() for x in bxvaluelist if x]
284  instbxvaluelist=[x for x in bxvaluelist if x]
285  maxlumi=0.0
286  if len(instbxvaluelist)!=0:
287  maxlumi=max(instbxvaluelist)
288  avginstlumi=0.0
289  if len(instbxvaluelist)!=0:
290  avginstlumi=sum(instbxvaluelist)
291  (intbxidxlist,b1intensities,b2intensities)=perlsdata[8]#contains only non-zero bx
292  for bxidx in bxidxlist:
293  idx=bxidxlist.index(bxidx)
294  instbxvalue=bxvaluelist[idx]
295  bxerror=bxerrolist[idx]
296  if instbxvalue<max(xingMinLum,maxlumi*0.2):
297  continue
298  bintensityPos=-1
299  try:
300  bintensityPos=intbxidxlist.index(bxidx)
301  except ValueError:
302  pass
303  if bintensityPos<=0:
304  fillbypos.setdefault(bxidx,[]).append([ts,beamstatusfrac,instbxvalue,bxerror,0.0,0.0])
305  continue
306  b1intensity=b1intensities[bintensityPos]
307  b2intensity=b2intensities[bintensityPos]
308  speclumi=calculateSpecificLumi(instbxvalue,bxerror,b1intensity,0.0,b2intensity,0.0)
309  fillbypos.setdefault(bxidx,[]).append([ts,beamstatusfrac,instbxvalue,bxerror,speclumi[0],speclumi[1]])
310  return fillbypos
311 
312 
313 ##############################
314 ## ######################## ##
315 ## ## ################## ## ##
316 ## ## ## Main Program ## ## ##
317 ## ## ################## ## ##
318 ## ######################## ##
319 ##############################
320 
321 if __name__ == '__main__':
322  parser = argparse.ArgumentParser(prog=os.path.basename(sys.argv[0]),description = "specific lumi",formatter_class=argparse.ArgumentDefaultsHelpFormatter)
323  amodetagChoices = [ "PROTPHYS","IONPHYS",'PAPHYS' ]
324  xingAlgoChoices =[ "OCC1","OCC2","ET"]
325  # parse arguments
326  parser.add_argument('-c',dest='connect',
327  action='store',
328  required=False,
329  help='connect string to lumiDB,optional',
330  default='frontier://LumiCalc/CMS_LUMI_PROD')
331  parser.add_argument('-P',dest='authpath',
332  action='store',
333  help='path to authentication file,optional')
334  parser.add_argument('-i',dest='inputdir',
335  action='store',
336  required=False,
337  help='output dir',
338  default='.')
339  parser.add_argument('-o',dest='outputdir',
340  action='store',
341  required=False,
342  help='output dir',
343  default='.')
344  parser.add_argument('-f','--fill',dest='fillnum',
345  action='store',
346  required=False,
347  help='specific fill',
348  default=None)
349  parser.add_argument('--minfill',dest='minfill',
350  type=int,
351  action='store',
352  required=False,
353  default=MINFILL,
354  help='min fill')
355  parser.add_argument('--maxfill',dest='maxfill',
356  type=int,
357  action='store',
358  required=False,
359  default=MAXFILL,
360  help='maximum fillnumber '
361  )
362  parser.add_argument('--amodetag',dest='amodetag',
363  action='store',
364  choices=amodetagChoices,
365  required=False,
366  help='specific accelerator mode choices [PROTOPHYS,IONPHYS,PAPHYS] (optional)')
367  parser.add_argument('--xingMinLum', dest = 'xingMinLum',
368  type=float,
369  default=1e-03,
370  required=False,
371  help='Minimum luminosity considered for lumibylsXing action')
372  parser.add_argument('--xingAlgo', dest = 'bxAlgo',
373  default='OCC1',
374  required=False,
375  help='algorithm name for per-bunch lumi ')
376  parser.add_argument('--normtag',dest='normtag',action='store',
377  required=False,
378  help='norm tag',
379  default=None)
380  parser.add_argument('--datatag',dest='datatag',action='store',
381  required=False,
382  help='data tag',
383  default=None)
384  #
385  #command configuration
386  #
387  parser.add_argument('--siteconfpath',dest='siteconfpath',action='store',
388  help='specific path to site-local-config.xml file, optional. If path undefined, fallback to cern proxy&server')
389  #
390  #switches
391  #
392  parser.add_argument('--without-correction',dest='withoutNorm',action='store_true',
393  help='without any correction/calibration' )
394  parser.add_argument('--debug',dest='debug',action='store_true',
395  help='debug')
396  options=parser.parse_args()
397  if options.authpath:
398  os.environ['CORAL_AUTH_PATH'] = options.authpath
399 
405  svc=sessionManager.sessionManager(options.connect,authpath=options.authpath,debugON=options.debug)
406  session=svc.openSession(isReadOnly=True,cpp2sqltype=[('unsigned int','NUMBER(10)'),('unsigned long long','NUMBER(20)')])
407 
408  fillstoprocess=[]
409  maxfillnum=options.maxfill
410  minfillnum=options.minfill
411  if options.fillnum is not None: #if process a specific single fill
412  fillstoprocess.append(int(options.fillnum))
413  else:
414  session.transaction().start(True)
415  schema=session.nominalSchema()
416  allfillsFromDB=lumiCalcAPI.fillInRange(schema,fillmin=minfillnum,fillmax=maxfillnum,amodetag=options.amodetag)
417  processedfills=listfilldir(options.outputdir)
418  lastcompletedFill=lastcompleteFill(os.path.join(options.inputdir,'runtofill_dqm.txt'))
419  for pf in processedfills:
420  if pf>lastcompletedFill:
421  print '\tremove unfinished fill from processed list ',pf
422  processedfills.remove(pf)
423  for fill in allfillsFromDB:
424  if fill not in processedfills :
425  if int(fill)<=lastcompletedFill:
426  if int(fill)>minfillnum and int(fill)<maxfillnum:
427  fillstoprocess.append(fill)
428  else:
429  print 'ongoing fill...',fill
430  session.transaction().commit()
431  print 'fills to process : ',fillstoprocess
432  if len(fillstoprocess)==0:
433  print 'no fill to process, exit '
434  exit(0)
435 
436 
437  print '===== Start Processing Fills',fillstoprocess
438  print '====='
439  filldata={}
440  #
441  # check datatag
442  #
443  reqfillmin=min(fillstoprocess)
444  reqfillmax=max(fillstoprocess)
445  session.transaction().start(True)
446  runlist=lumiCalcAPI.runList(session.nominalSchema(),options.fillnum,runmin=None,runmax=None,fillmin=reqfillmin,fillmax=reqfillmax,startT=None,stopT=None,l1keyPattern=None,hltkeyPattern=None,amodetag=options.amodetag,nominalEnergy=None,energyFlut=None,requiretrg=False,requirehlt=False)
447 
448  datatagname=options.datatag
449  if not datatagname:
450  (datatagid,datatagname)=revisionDML.currentDataTag(session.nominalSchema())
451  dataidmap=revisionDML.dataIdsByTagId(session.nominalSchema(),datatagid,runlist=runlist,withcomment=False)
452  #{run:(lumidataid,trgdataid,hltdataid,())}
453  else:
454  dataidmap=revisionDML.dataIdsByTagName(session.nominalSchema(),datatagname,runlist=runlist,withcomment=False)
455 
456  #
457  # check normtag and get norm values if required
458  #
459  normname='NONE'
460  normid=0
461  normvalueDict={}
462  if not options.withoutNorm:
463  normname=options.normtag
464  if not normname:
465  normmap=normDML.normIdByType(session.nominalSchema(),lumitype='HF',defaultonly=True)
466  if len(normmap):
467  normname=normmap.keys()[0]
468  normid=normmap[normname]
469  else:
470  normid=normDML.normIdByName(session.nominalSchema(),normname)
471  if not normid:
472  raise RuntimeError('[ERROR] cannot resolve norm/correction')
473  sys.exit(-1)
474  normvalueDict=normDML.normValueById(session.nominalSchema(),normid) #{since:[corrector(0),{paramname:paramvalue}(1),amodetag(2),egev(3),comment(4)]}
475  session.transaction().commit()
476  for fillnum in fillstoprocess:# process per fill
477  session.transaction().start(True)
478  filldata=getSpecificLumi(session.nominalSchema(),fillnum,options.inputdir,dataidmap,normvalueDict,xingMinLum=options.xingMinLum,amodetag=options.amodetag,bxAlgo=options.bxAlgo)
479  specificlumiTofile(fillnum,filldata,options.outputdir)
480  session.transaction().commit()
481 
482 
Definition: start.py:1
def lastcompleteFill(infile)
Definition: specificLumi.py:57
def normIdByName(schema, normname)
Definition: normDML.py:60
def dataIdsByTagName(schema, tagname, runlist=None, withcomment=False, lumitype='HF')
Definition: revisionDML.py:689
def specificlumiTofile(fillnum, filldata, outdir)
def currentDataTag(schema, lumitype='HF')
Definition: revisionDML.py:513
def normIdByType(schema, lumitype='HF', defaultonly=True)
Definition: normDML.py:92
def runsummaryMap(schema, irunlsdict, dataidmap, lumitype='HF')
Definition: lumiCalcAPI.py:21
def calculateSpecificLumi(lumi, lumierr, beam1intensity, beam1intensityerr, beam2intensity, beam2intensityerr)
Definition: specificLumi.py:74
def getFillFromFile(fillnum, inputdir)
Definition: specificLumi.py:89
def filltofiles(allfills, runsperfill, runtimes, dirname)
output methods####
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
def transposed(lists, defaultval=None)
Definition: CommonUtil.py:146
T min(T a, T b)
Definition: MathUtil.h:58
def fillrunMap(schema, fillnum=None, runmin=None, runmax=None, startT=None, stopT=None, l1keyPattern=None, hltkeyPattern=None, amodetag=None)
Definition: lumiCalcAPI.py:41
def fillInRange(schema, fillmin=1000, fillmax=9999, amodetag='PROTPHYS', startT=None, stopT=None)
Definition: lumiCalcAPI.py:35
def getFillFromDB(schema, fillnum)
Definition: specificLumi.py:22
def normValueById(schema, normid)
Definition: normDML.py:181
def dataIdsByTagId(schema, tagid, runlist=None, withcomment=False, lumitype='HF')
Definition: revisionDML.py:798
#define str(s)
def runsummary(schema, irunlsdict)
Lumi data management and calculation API # # Author: Zhen Xie #.
Definition: lumiCalcAPI.py:10
def getSpecificLumi(schema, fillnum, inputdir, dataidmap, normmap, xingMinLum=0.0, amodetag='PROTPHYS', bxAlgo='OCC1')
def deliveredLumiForIds(schema, irunlsdict, dataidmap, runsummaryMap, beamstatusfilter=None, timeFilter=None, normmap=None, withBXInfo=False, bxAlgo=None, xingMinLum=None, withBeamIntensity=False, lumitype='HF', minbiasXsec=None)
Definition: lumiCalcAPI.py:369
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def listfilldir(indir)
Definition: specificLumi.py:36
def runList(schema, datatagid, runmin=None, runmax=None, fillmin=None, fillmax=None, startT=None, stopT=None, l1keyPattern=None, hltkeyPattern=None, amodetag=None, nominalEnergy=None, energyFlut=0.2, requiretrg=True, requirehlt=True, preselectedruns=None, lumitype='HF')
Definition: lumiCalcAPI.py:47