CMS 3D CMS Logo

Functions
lumiReport Namespace Reference

Functions

def dumptocsv (fieldnames, result, filename)
 
def toCSVLumiByLSXing (lumidata, scalefactor, filename, irunlsdict=None, noWarning=True)
 
def toScreenConfHlt (hltconfdata, iresults=[], toFile=None)
 
def toScreenHeader (commandname, datatagname, normtag, worktag, updatetag, lumitype, toFile=None)
 
def toScreenLSBeam (beamdata, iresults=[], dumpIntensity=False, toFile=None)
 
def toScreenLSEffective (lumidata, resultlines, scalefactor, irunlsdict=None, noWarning=True, toFile=None)
 
def toScreenLSHlt (hltdata, iresults=[], toFile=None)
 
def toScreenLSTrg (trgdata, iresults=[], irunlsdict=None, noWarning=True, toFile=None, withoutmask=False)
 
def toScreenLumiByLS (lumidata, resultlines, scalefactor, irunlsdict=None, noWarning=True, toFile=None)
 
def toScreenNormDetail (normname, norminfo, normvalues)
 
def toScreenNormSummary (allnorms)
 
def toScreenOverview (lumidata, resultlines, scalefactor, irunlsdict=None, noWarning=True, toFile=None)
 
def toScreenSingleTag (taginfo)
 
def toScreenTags (tagdata)
 
def toScreenTotDelivered (lumidata, resultlines, scalefactor, irunlsdict=None, noWarning=True, toFile=None)
 
def toScreenTotEffective (lumidata, resultlines, scalefactor, irunlsdict=None, noWarning=True, toFile=None)
 

Function Documentation

def lumiReport.dumptocsv (   fieldnames,
  result,
  filename 
)
utility method to dump result to csv file

Definition at line 14 of file lumiReport.py.

References join(), and str.

Referenced by toScreenConfHlt(), toScreenLSBeam(), toScreenLSEffective(), toScreenLSHlt(), toScreenLSTrg(), toScreenLumiByLS(), toScreenOverview(), toScreenTotDelivered(), and toScreenTotEffective().

14 def dumptocsv(fieldnames,result,filename):
15  '''
16  utility method to dump result to csv file
17  '''
18  assert(filename)
19  if filename.upper()=='STDOUT':
20  r=sys.stdout
21  r.write(','.join(fieldnames)+'\n')
22  for l in result:
23  r.write(str(l)+'\n')
24  else:
25  r=csvReporter.csvReporter(filename)
26  r.writeRow(fieldnames)
27  r.writeRows(result)
28  r.close()
29 
def dumptocsv(fieldnames, result, filename)
Definition: lumiReport.py:14
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
#define str(s)
def lumiReport.toCSVLumiByLSXing (   lumidata,
  scalefactor,
  filename,
  irunlsdict = None,
  noWarning = True 
)
input:{run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),recordedlumi(6),calibratedlumierror(7),bxdata(8),beamdata(9),fillnum(10)]}
output:
fieldnames=['Run:Fill','LS','UTCTime','Delivered(/ub)','Recorded(/ub)','BX']

Definition at line 878 of file lumiReport.py.

References CommonUtil.flatten(), join(), edm.print(), str, and CommonUtil.transposed().

878 def toCSVLumiByLSXing(lumidata,scalefactor,filename,irunlsdict=None,noWarning=True):
879  '''
880  input:{run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),recordedlumi(6),calibratedlumierror(7),bxdata(8),beamdata(9),fillnum(10)]}
881  output:
882  fieldnames=['Run:Fill','LS','UTCTime','Delivered(/ub)','Recorded(/ub)','BX']
883  '''
884  result=[]
885  assert(filename)
886  fieldnames=['run:fill','ls','UTCTime','delivered(/ub)','recorded(/ub)','[bx,Hz/ub]']
887  datarunlsdict={}#{run:[ls,...]}from data. construct it only if there is irunlsdict to compare with
888  for run in sorted(lumidata):
889  rundata=lumidata[run]
890  if rundata is None:
891  result.append([str(run)+':0','n/a','n/a','n/a','n/a','n/a'])
892  if irunlsdict and irunlsdict[run]:
893  print('[WARNING] selected but no lumi data for run '+str(run))
894  continue
895  fillnum=0
896  if rundata and rundata[0][10]:
897  fillnum=rundata[0][10]
898  if irunlsdict and not noWarning:
899  existdata=[x[1] for x in rundata if x[1] ]
900  datarunlsdict[run]=existdata
901  for lsdata in rundata:
902  lumilsnum=lsdata[0]
903  cmslsnum=0
904  if lsdata and lsdata[1]:
905  cmslsnum=lsdata[1]
906  tsStr='n/a'
907  if lsdata and lsdata[2]:
908  ts=lsdata[2]
909  tsStr=ts.strftime('%m/%d/%y %H:%M:%S')
910  deliveredlumi=0.
911  if lsdata[5]:
912  deliveredlumi=lsdata[5]
913  recordedlumi=0.
914  if lsdata[6]:
915  recordedlumi=lsdata[6]
916  (bxidxlist,bxvaluelist,bxerrorlist)=lsdata[8]
917  if irunlsdict and irunlsdict[run]:
918  if run in irunlsdict and cmslsnum in irunlsdict[run]:
919  if bxidxlist and bxvaluelist:
920  bxresult=[]
921  bxinfo=CommonUtil.transposed([bxidxlist,bxvaluelist])
922  bxresult=CommonUtil.flatten([str(run)+':'+str(fillnum),str(lumilsnum)+':'+str(cmslsnum),tsStr,deliveredlumi*scalefactor,recordedlumi*scalefactor,bxinfo])
923  result.append(bxresult)
924  else:
925  result.append([str(run)+':'+str(fillnum),str(lumilsnum)+':'+str(cmslsnum),tsStr,deliveredlumi*scalefactor,recordedlumi*scalefactor])
926  else:
927  if bxidxlist and bxvaluelist:
928  bxresult=[]
929  bxinfo=CommonUtil.transposed([bxidxlist,bxvaluelist])
930  bxresult=CommonUtil.flatten([str(run)+':'+str(fillnum),str(lumilsnum)+':'+str(cmslsnum),tsStr,deliveredlumi*scalefactor,recordedlumi*scalefactor,bxinfo])
931  result.append(bxresult)
932  else:
933  result.append([str(run)+':'+str(fillnum),str(lumilsnum)+':'+str(cmslsnum),tsStr,deliveredlumi*scalefactor,recordedlumi*scalefactor])
934  r=None
935  if filename.upper()=='STDOUT':
936  r=sys.stdout
937  r.write(','.join(fieldnames)+'\n')
938  for l in result:
939  r.write(str(l)+'\n')
940  else:
941  r=csvReporter.csvReporter(filename)
942  r.writeRow(fieldnames)
943  r.writeRows(result)
944 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def toCSVLumiByLSXing(lumidata, scalefactor, filename, irunlsdict=None, noWarning=True)
Definition: lumiReport.py:878
def transposed(lists, defaultval=None)
Definition: CommonUtil.py:148
def flatten(obj)
Definition: CommonUtil.py:6
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
#define str(s)
def lumiReport.toScreenConfHlt (   hltconfdata,
  iresults = [],
  toFile = None 
)
input : {runnumber,[(hltpath,l1seedexpr,l1bitname),...]}

Definition at line 1063 of file lumiReport.py.

References dumptocsv(), join(), edm.print(), python.rootplot.root2matplotlib.replace(), str, and dataformats.wrap_onspace().

1063 def toScreenConfHlt(hltconfdata,iresults=[],toFile=None):
1064  '''
1065  input : {runnumber,[(hltpath,l1seedexpr,l1bitname),...]}
1066  '''
1067  result=[]
1068  for r in iresults:
1069  pp=r[1]
1070  pp=' '.join([pp[i:i+25] for i in range(0,len(pp),25)])
1071  sdepr=r[2]
1072  sdepr=' '.join([sdepr[i:i+25] for i in range(0,len(sdepr),25)])
1073  lb=r[3]
1074  lb=' '.join([lb[i:i+25] for i in range(0,len(lb),25)])
1075  result.append([r[0],pp,sdepr,lb])
1076  for run in sorted(hltconfdata):
1077  pathdata=hltconfdata[run]
1078  if pathdata is None:
1079  result.append([str(run),'n/a','n/a','n/a'])
1080  continue
1081  for thispathinfo in pathdata:
1082  thispath=thispathinfo[0]
1083  thispath=' '.join([thispath[i:i+25] for i in range(0,len(thispath),25)])
1084  thisseed=thispathinfo[1]
1085  thisseed=' '.join([thisseed[i:i+25] for i in range(0,len(thisseed),25)]).replace('"','')
1086  thisbit=thispathinfo[2]
1087  if not thisbit:
1088  thisbit='n/a'
1089  else:
1090  thisbit=' '.join([thisbit[i:i+25] for i in range(0,len(thisbit),25)]).replace('"','')
1091  result.append([str(run),thispath,thisseed,thisbit])
1092  if not toFile:
1093  labels=[('Run','hltpath','l1seedexpr','l1bit')]
1094  print(' == = ')
1095  print(tablePrinter.indent (labels+result, hasHeader = True, separateRows = False,
1096  prefix = '| ', postfix = ' |', justify = 'left',
1097  delim = ' | ', wrapfunc = lambda x: wrap_onspace(x,25) ))
1098  else:
1099  filename=toFile
1100  fieldnames=['Run','hltpath','l1seedexpr','l1bit']
1101  dumptocsv(fieldnames,sortedresult,filename)
1102 
def replace(string, replacements)
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def toScreenConfHlt(hltconfdata, iresults=[], toFile=None)
Definition: lumiReport.py:1063
def dumptocsv(fieldnames, result, filename)
Definition: lumiReport.py:14
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def wrap_onspace(text, width)
Definition: dataformats.py:48
#define str(s)
def lumiReport.toScreenHeader (   commandname,
  datatagname,
  normtag,
  worktag,
  updatetag,
  lumitype,
  toFile = None 
)
input:
   commandname: commandname
   datataginfo: tagname
   normtag: normtag
   worktag: working version
   updatetag: updated version if amy

Definition at line 30 of file lumiReport.py.

References join().

Referenced by toScreenLSBeam().

30 def toScreenHeader(commandname,datatagname,normtag,worktag,updatetag,lumitype,toFile=None):
31  '''
32  input:
33  commandname: commandname
34  datataginfo: tagname
35  normtag: normtag
36  worktag: working version
37  updatetag: updated version if amy
38  '''
39  gmtnowStr=time.asctime(time.gmtime())+' UTC'
40  updatetagStr='None'
41  if updatetag:
42  updatetagStr=updatetag
43  header=''.join(['*']*80)+'\n'
44  header+='* '+gmtnowStr+'\n'
45  header+='* lumitype: '+lumitype+' , datatag: '+datatagname+' , normtag: '+normtag+' , worktag: '+worktag+'\n'
46  header+='* \n'
47  header+='* by:\n'
48  header+='* '+commandname+'\n'
49  header+='* \n'
50  header+='* update: '+updatetag+'\n'
51  header+=''.join(['*']*80)+'\n'
52  if not toFile:
53  sys.stdout.write(header)
54  else:
55  assert(toFile)
56  if toFile.upper()=='STDOUT':
57  r=sys.stdout
58  else:
59  r=open(toFile,'wb')
60  r.write(header)
61 
def toScreenHeader(commandname, datatagname, normtag, worktag, updatetag, lumitype, toFile=None)
Definition: lumiReport.py:30
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def lumiReport.toScreenLSBeam (   beamdata,
  iresults = [],
  dumpIntensity = False,
  toFile = None 
)
input: {run:[(lumilsnum(0),cmslsnum(1),beamstatus(2),beamenergy(3),ncollidingbunches(4),beaminfolist(4)),..]}
beaminfolist:[(bxidx,b1,b2)]

Definition at line 1103 of file lumiReport.py.

References dumptocsv(), join(), edm.print(), str, toScreenHeader(), and dataformats.wrap_onspace().

1103 def toScreenLSBeam(beamdata,iresults=[],dumpIntensity=False,toFile=None):
1104  '''
1105  input: {run:[(lumilsnum(0),cmslsnum(1),beamstatus(2),beamenergy(3),ncollidingbunches(4),beaminfolist(4)),..]}
1106  beaminfolist:[(bxidx,b1,b2)]
1107  '''
1108  result=[]
1109  for rline in iresults:
1110  result.append(rline)
1111  for run in sorted(beamdata):
1112  perrundata=beamdata[run]
1113  if perrundata is None:
1114  ll=[str(run),'n/a','n/a']
1115  if dumpIntensity:
1116  ll.extend('n/a')
1117  continue
1118  for lsdata in perrundata:
1119  lumilsnum=lsdata[0]
1120  cmslsnum=lsdata[1]
1121  beamstatus=lsdata[2]
1122  beamenergy=lsdata[3]
1123  ncollidingbx=lsdata[4]
1124  if not dumpIntensity:
1125  result.append([str(run),str(lumilsnum)+':'+str(cmslsnum),beamstatus,'%.2f'%beamenergy,str(ncollidingbx)])
1126  continue
1127  allbxinfo=lsdata[5]
1128  allbxresult=[]
1129  for thisbxinfo in allbxinfo:
1130  thisbxresultStr='(n/a,n/a,n/a,n/a)'
1131  bxidx=thisbxinfo[0]
1132  b1=thisbxinfo[1]
1133  b2=thisbxinfo[2]
1134  thisbxresultStr=','.join(['%d'%bxidx,'%.3e'%b1,'%.3e'%b2])
1135  allbxresult.append(thisbxresultStr)
1136  allbxresultStr=' '.join(allbxresult)
1137  result.append([str(run),str(lumilsnum)+':'+str(cmslsnum),beamstatus,'%.2f'%beamenergy,str(ncollidingbx),allbxresultStr])
1138 
1139  if not toFile:
1140  labels=[('Run','LS','beamstatus','egev','ncollidingbx')]
1141  if dumpIntensity:
1142  labels=[('Run','LS','beamstatus','egev','ncollidingbx','(bxidx,b1,b2)')]
1143  print(' == = ')
1144  print(tablePrinter.indent (labels+result, hasHeader = True, separateRows = False,
1145  prefix = '| ', postfix = ' |', justify = 'left',
1146  delim = ' | ', wrapfunc = lambda x: wrap_onspace(x,25) ))
1147  else:
1148  fieldnames=['Run','LS','beamstatus','egev','ncollidingbx']
1149  if dumpIntensity:
1150  fieldnames.append('(bxidx,b1,b2)')
1151  filename=toFile
1152  dumptocsv(fieldnames,result,filename)
1153 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def dumptocsv(fieldnames, result, filename)
Definition: lumiReport.py:14
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def wrap_onspace(text, width)
Definition: dataformats.py:48
#define str(s)
def toScreenLSBeam(beamdata, iresults=[], dumpIntensity=False, toFile=None)
Definition: lumiReport.py:1103
def lumiReport.toScreenLSEffective (   lumidata,
  resultlines,
  scalefactor,
  irunlsdict = None,
  noWarning = True,
  toFile = None 
)
input:  {run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),recordedlumi(6),calibratedlumierror(7),{hltpath:[l1name,l1prescale,hltprescale,efflumi]}(8),bxdata(9),beamdata(10),fillnum(11)]}

Definition at line 541 of file lumiReport.py.

References mps_setup.append, dumptocsv(), objects.autophobj.float, createfilelist.int, CommonUtil.lumiUnitForPrint(), edm.print(), split, str, and dataformats.wrap_onspace_strict().

541 def toScreenLSEffective(lumidata,resultlines,scalefactor,irunlsdict=None,noWarning=True,toFile=None):
542  '''
543  input: {run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),recordedlumi(6),calibratedlumierror(7),{hltpath:[l1name,l1prescale,hltprescale,efflumi]}(8),bxdata(9),beamdata(10),fillnum(11)]}
544  '''
545  result=[]#[run,ls,hltpath,l1bitname,hltpresc,l1presc,efflumi]
546  totalrow=[]
547  totSelectedLSDict={}
548  totRecordedDict={}
549  totEffectiveDict={}
550 
551  totOldSelectedLSDict={}
552  totOldRecordedDict={}
553  totOldEffectiveDict={}
554 
555  maxlslumi = 0.0
556  datarunlsdict={}#{run:[ls,...]}from data. construct it only if there is irunlsdict to compare with
557  for rline in resultlines:
558  runfillstr=rline[0]
559  [runnumstr,fillnumstr]=runfillstr.split(':')
560  if irunlsdict and not noWarning:
561  if rline[1] is not 'n/a':
562  datarunlsdict[int(runnumstr)]=[]
563  myls=rline[1]
564  mypath=rline[2]
565 
566  if myls and myls!='n/a' and mpath and mpath!='n/a':
567  totOldSelectedLSDict[mypath]=0
568  totOldRecordedDict[mypath]=0.
569  totOldEffectiveDict[mypath]=0.
570  if myls!='n/a':
571  [luls,cmls]=myls.split(':')
572  if cmls!='0':
573  if mypath in totOldSelectedLSDict:
574  totOldSelectedLSDict[mypath]+=1
575  if irunlsdict and not noWarning:
576  datarunlsdict[int(runnumstr)].append(int(myls))
577  myrecorded=0.
578  if rline[6]!='n/a':
579  myrecorded=float(rline[6])
580  if myrecorded>maxlslumi:maxlslumi=myrecorded
581  if mypath in totOldRecordedDict:
582  totOldRecordedDict[mypath]+=myrecorded
583  rline[6]=myrecorded
584  myeff={}
585  if rline[7]!='n/a':
586  myeff=float(rline[7])
587  if mypath in totOldEffectiveDict:
588  totOldEffectiveDict[mypath]+=myeff
589  rline[7]=myeff
590  result.append(rline)
591 
592  for run in lumidata.keys():#loop over runs
593  lsdata=lumidata[run]
594  if not lsdata:
595  result.append([str(run),'n/a','n/a','n/a','n/a','n/a','n/a','n/a'])
596  if irunlsdict and irunlsdict[run] and not noWarning:
597  datarunlsdict[run]=None
598  continue
599  fillnum=0
600  if lsdata[0] and lsdata[0][11]:
601  fillnum=lsdata[0][11]
602  datarunlsdict[run]=[]
603  for thisls in lsdata:
604  lumilsnum=thisls[0]
605  cmslsnum=thisls[1]#triggered ls
606  if not cmslsnum: continue
607  efflumiDict=thisls[8]# this ls has no such path?
608  recordedlumi=0.
609  if thisls[6]:
610  recordedlumi=thisls[6]
611  if recordedlumi>maxlslumi:maxlslumi=recordedlumi
612  if not efflumiDict:
613  result.append([str(run)+':'+str(fillnum),str(lumilsnum)+':'+str(cmslsnum),'n/a','n/a','n/a','n/a',recordedlumi,'n/a'])
614  continue
615 
616  for hltpathname in sorted(efflumiDict):
617  if hltpathname and hltpathname !='n/a' :
618  if hltpathname not in totRecordedDict:
619  totRecordedDict[hltpathname]=0.
620  if hltpathname not in totSelectedLSDict:
621  totSelectedLSDict[hltpathname]=0
622  if hltpathname not in totEffectiveDict:
623  totEffectiveDict[hltpathname]=0.
624  totSelectedLSDict[hltpathname]+=1
625  totRecordedDict[hltpathname]+=recordedlumi
626  pathdata=efflumiDict[hltpathname]
627  l1name=pathdata[0]
628  cleanl1name='n/a'
629  if l1name:
630  cleanl1name=l1name.replace('"','')
631  l1presc='0'
632  if pathdata[1]:
633  l1presc=str(pathdata[1])
634  hltpresc='0'
635  if pathdata[2]:
636  hltpresc=str(pathdata[2])
637  lumival=0.
638  if pathdata[3]:
639  lumival=pathdata[3]
640  result.append([str(run)+':'+str(fillnum),str(lumilsnum)+':'+str(cmslsnum),hltpathname,cleanl1name,hltpresc,l1presc,recordedlumi,lumival])
641  if hltpathname and hltpathname !='n/a' :
642  totEffectiveDict[hltpathname]+=lumival
643  if irunlsdict and not noWarning:
644  datarunlsdict[run].append(int(cmslsnum))
645  sortedresult=sorted(result,key=lambda x : int(str(x[0]).split(':')[0]))
646  if irunlsdict and not noWarning:
647  for run,cmslslist in irunlsdict.items():
648  if run not in datarunlsdict.keys() or datarunlsdict[run] is None:
649  sys.stdout.write('[WARNING] selected run '+str(run)+' not in lumiDB or has no HLT data\n')
650  continue
651  if cmslslist:
652  for ss in cmslslist:
653  if ss not in datarunlsdict[run]:
654  sys.stdout.write('[WARNING] selected run/ls '+str(run)+' '+str(ss)+' not in lumiDB or has no qualified data\n')
655 
656  if not toFile:
657  (lsunitstring,unitdenomitor)=CommonUtil.lumiUnitForPrint(maxlslumi*scalefactor)
658  labels = [('Run:Fill','LS','HLTpath','L1bit','HLTpresc','L1presc','Recorded('+lsunitstring+')','Effective('+lsunitstring+')')]
659  perlsresult=[]
660  for entry in sortedresult:
661  reclumi=entry[6]
662  if reclumi!='n/a':
663  reclumi='%.3f'%float(float(reclumi*scalefactor)/float(unitdenomitor))
664  efflumi=entry[7]
665  if efflumi!='n/a':
666  efflumi='%.3f'%float(float(efflumi*scalefactor)/float(unitdenomitor))
667  perlsresult.append([entry[0],entry[1],entry[2],entry[3],entry[4],entry[5],reclumi,efflumi])
668  print(' == = ')
669  print(tablePrinter.indent (labels+perlsresult, hasHeader = True, separateRows = False,
670  prefix = '| ', postfix = ' |', justify = 'right',
671  delim = ' | ', wrapfunc = lambda x: wrap_onspace_strict(x,25) ))
672  for mpath in sorted(totRecordedDict):
673  totSelectedLS=totSelectedLSDict[mpath]
674  if mpath in totOldSelectedLSDict:
675  totSelectedLS+=totOldSelectedLS[mpath]
676  totRecorded=totRecordedDict[mpath]
677  if mpath in totOldRecordedDict:
678  totRecorded+=totOldRecorded[mpath]
679  totRecorded=float(totRecorded*scalefactor)/float(unitdenomitor)
680  totEffective=totEffectiveDict[mpath]
681  if mpath in totOldEffectiveDict:
682  totEffective+=totOldEffective[mpath]
683  totEffective=float(totEffective*scalefactor)/float(unitdenomitor)
684  totalrow.append([str(totSelectedLS),mpath,'%.3f'%(totRecorded),'%.3f'%(totEffective)])
685  lastrowlabels = [ ('Selected LS','HLTPath','Recorded('+lsunitstring+')','Effective('+lsunitstring+')')]
686  print(' == = Total : ')
687  print(tablePrinter.indent (lastrowlabels+totalrow, hasHeader = True, separateRows = False, prefix = '| ',
688  postfix = ' |', justify = 'right', delim = ' | ',
689  wrapfunc = lambda x: wrap_onspace (x, 20)))
690  else:
691  fieldnames = ['Run:Fill','LS','HLTpath','L1bit','HLTpresc','L1presc','Recorded(/ub)','Effective(/ub)']
692  filename=toFile
693  dumptocsv(fieldnames,sortedresult,filename)
694 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def dumptocsv(fieldnames, result, filename)
Definition: lumiReport.py:14
def lumiUnitForPrint(t)
Definition: CommonUtil.py:32
def wrap_onspace_strict(text, width)
Definition: dataformats.py:64
def toScreenLSEffective(lumidata, resultlines, scalefactor, irunlsdict=None, noWarning=True, toFile=None)
Definition: lumiReport.py:541
#define str(s)
double split
Definition: MVATrainer.cc:139
def lumiReport.toScreenLSHlt (   hltdata,
  iresults = [],
  toFile = None 
)
input:{runnumber:[(cmslsnum,[(hltpath,hltprescale,l1pass,hltaccept),...]),(cmslsnum,[])})}

Definition at line 1010 of file lumiReport.py.

References dumptocsv(), join(), edm.print(), and str.

1010 def toScreenLSHlt(hltdata,iresults=[],toFile=None):
1011  '''
1012  input:{runnumber:[(cmslsnum,[(hltpath,hltprescale,l1pass,hltaccept),...]),(cmslsnum,[])})}
1013  '''
1014  result=[]
1015  for r in iresults:
1016  result.append(r)
1017  for run in hltdata.keys():
1018  if hltdata[run] is None:
1019  ll=[str(run),'n/a','n/a','n/a','n/a','n/a']
1020  continue
1021  perrundata=hltdata[run]
1022  for lsdata in perrundata:
1023  cmslsnum=lsdata[0]
1024  allpathinfo=lsdata[1]
1025  allpathresult=[]
1026  for thispathinfo in allpathinfo:
1027  thispathname=thispathinfo[0]
1028  thispathpresc=thispathinfo[1]
1029  thisl1pass=None
1030  thishltaccept=None
1031  thispathresult=[]
1032  thispathresult.append(thispathname)
1033  if thispathpresc is None:
1034  thispathpresc='n/a'
1035  else:
1036  thispathresult.append('%d'%thispathpresc)
1037  thisl1pass=thispathinfo[2]
1038  if thispathinfo[2] is None:
1039  thispathresult.append('n/a')
1040  else:
1041  thispathresult.append('%d'%thisl1pass)
1042  thishltaccept=thispathinfo[3]
1043  if thispathinfo[3] is None:
1044  thispathresult.append('n/a')
1045  else:
1046  thispathresult.append('%d'%thishltaccept)
1047 
1048  thispathresultStr='('+','.join(thispathresult)+')'
1049  allpathresult.append(thispathresultStr)
1050  result.append([str(run),str(cmslsnum),', '.join(allpathresult)])
1051 
1052  if not toFile:
1053  print(' == = ')
1054  labels = [('Run', 'LS', '(hltpath,presc,l1pass,hltaccept)')]
1055  print(tablePrinter.indent (labels+result, hasHeader = True, separateRows = False,
1056  prefix = '| ', postfix = ' |', justify = 'left',
1057  delim = ' | ', wrapfunc = lambda x: wrap_onspace (x,70) ))
1058  else:
1059  fieldnames=['Run','LS','(hltpath,presc,l1pass,hltaccept)']
1060  filename=toFile
1061  dumptocsv(fieldnames,result,filename)
1062 
def toScreenLSHlt(hltdata, iresults=[], toFile=None)
Definition: lumiReport.py:1010
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def dumptocsv(fieldnames, result, filename)
Definition: lumiReport.py:14
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
#define str(s)
def lumiReport.toScreenLSTrg (   trgdata,
  iresults = [],
  irunlsdict = None,
  noWarning = True,
  toFile = None,
  withoutmask = False 
)
input:{run:[[cmslsnum,deadfrac,deadtimecount,bitzero_count,bitzero_prescale,[(name,count,presc,mask),]],..]

Definition at line 945 of file lumiReport.py.

References mps_setup.append, dumptocsv(), createfilelist.int, join(), edm.print(), and str.

945 def toScreenLSTrg(trgdata,iresults=[],irunlsdict=None,noWarning=True,toFile=None,withoutmask=False):
946  '''
947  input:{run:[[cmslsnum,deadfrac,deadtimecount,bitzero_count,bitzero_prescale,[(name,count,presc,mask),]],..]
948  '''
949  result=[]
950  datarunlsdict={}#{run:[ls,...]}from data. construct it only if there is irunlsdict to compare with
951  for rline in iresults:
952  runnumStr=rline[0]
953  cmslsnumStr=rline[1]
954  if irunlsdict and not noWarning:
955  if runnumStr is not 'n/a' and int(runnumStr) not in datarunlsdict:
956  datarunlsdict[int(runnumstr)]=[]
957  if cmslsnumStr!='n/a':
958  datarunlsdict[int(runnumStr)].append(int(cmslsnumStr))
959  result.append(rline)
960  for run in trgdata.keys():
961  rundata=trgdata[run]
962  if not rundata:
963  ll=[str(run),'n/a','n/a','n/a']
964  result.append(ll)
965  if irunlsdict and not noWarning:
966  print('[WARNING] selected but no trg data for run '+str(run))
967  continue
968  if irunlsdict and not noWarning:
969  existdata=[x[0] for x in rundata if x[0] ]
970  datarunlsdict[run]=existdata
971  deadfrac=0.0
972  bitdataStr='n/a'
973  for lsdata in rundata:
974  cmslsnum=lsdata[0]
975  deadfrac=lsdata[1]
976  deadcount=lsdata[2]
977  bitdata=lsdata[5]# already sorted by name
978  if bitdata:
979  if withoutmask:
980  flatbitdata=["("+x[0]+',%d'%x[1]+',%d'%x[2]+")" for x in bitdata if x[0]!='False']
981  bitdataStr=' '.join(flatbitdata)
982  else:
983  #consider trg mask by default
984  flatbitdata=["("+x[0]+',%d'%x[1]+',%d'%x[2]+")" for x in bitdata if x[0]!='False' and x[3]]
985  bitdataStr=' '.join(flatbitdata)
986  if irunlsdict and irunlsdict[run]:
987  if run in irunlsdict and cmslsnum in irunlsdict[run]:
988  result.append([str(run),str(cmslsnum),'%.4f'%(deadfrac),bitdataStr])
989  else:
990  result.append([str(run),str(cmslsnum),'%.4f'%(deadfrac),bitdataStr])
991  if irunlsdict and not noWarning:
992  for run,cmslslist in irunlsdict.items():
993  if run not in datarunlsdict.keys() or datarunlsdict[run] is None:
994  sys.stdout.write('[WARNING] selected run '+str(run)+' not in lumiDB or has no qualified data\n')
995  continue
996  if cmslslist:
997  for ss in cmslslist:
998  if ss not in datarunlsdict[run]:
999  sys.stdout.write('[WARNING] selected run/ls '+str(run)+' '+str(ss)+' not in lumiDB\n')
1000 
1001  if not toFile:
1002  print(' == = ')
1003  labels = [('Run', 'LS', 'dfrac','(bitname,count,presc)')]
1004  print(tablePrinter.indent (labels+result, hasHeader = True, separateRows = False,prefix = '| ', postfix = ' |', justify = 'left',delim = ' | ', wrapfunc = lambda x: wrap_onspace (x,70) ))
1005  else:
1006  filename=toFile
1007  fieldnames=['Run','LS','dfrac','(bitname,count,presc)']
1008  dumptocsv(fieldnames,result,filename)
1009 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def toScreenLSTrg(trgdata, iresults=[], irunlsdict=None, noWarning=True, toFile=None, withoutmask=False)
Definition: lumiReport.py:945
def dumptocsv(fieldnames, result, filename)
Definition: lumiReport.py:14
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
#define str(s)
def lumiReport.toScreenLumiByLS (   lumidata,
  resultlines,
  scalefactor,
  irunlsdict = None,
  noWarning = True,
  toFile = None 
)
input:
lumidata {run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),recordedlumi(6),calibratedlumierror(7),(bxidx,bxvalues,bxerrs)(8),(bxidx,b1intensities,b2intensities)(9),fillnum(10),pu(11)]}
{run:None}  None means no run in lumiDB, 
{run:[]} [] means no lumi for this run in lumiDB
{run:[....deliveredlumi(5),recordedlumi(6)None]} means no trigger in lumiDB
{run:cmslsnum(1)==0} means either not cmslsnum or is cms but not selected, therefore set recordedlumi=0,efflumi=0
resultlines [[resultrow1],[resultrow2],...,] existing result row

Definition at line 395 of file lumiReport.py.

References mps_setup.append, dumptocsv(), objects.autophobj.float, CommonUtil.guessUnit(), createfilelist.int, CommonUtil.lumiUnitForPrint(), edm.print(), split, and str.

395 def toScreenLumiByLS(lumidata,resultlines,scalefactor,irunlsdict=None,noWarning=True,toFile=None):
396  '''
397  input:
398  lumidata {run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),recordedlumi(6),calibratedlumierror(7),(bxidx,bxvalues,bxerrs)(8),(bxidx,b1intensities,b2intensities)(9),fillnum(10),pu(11)]}
399  {run:None} None means no run in lumiDB,
400  {run:[]} [] means no lumi for this run in lumiDB
401  {run:[....deliveredlumi(5),recordedlumi(6)None]} means no trigger in lumiDB
402  {run:cmslsnum(1)==0} means either not cmslsnum or is cms but not selected, therefore set recordedlumi=0,efflumi=0
403  resultlines [[resultrow1],[resultrow2],...,] existing result row
404  '''
405  result=[]
406  totalrow = []
407 
408  totalDeliveredLS = 0
409  totalSelectedLS = 0
410  totalDelivered = 0.0
411  totalRecorded = 0.0
412 
413  totOldDeliveredLS = 0
414  totOldSelectedLS = 0
415  totOldDelivered = 0.0
416  totOldRecorded = 0.0
417 
418  maxlslumi = 0.0
419  datarunlsdict={}#{run:[ls,...]}from data. construct it only if there is irunlsdict to compare with
420  for rline in resultlines:
421  runfillstr=rline[0]
422  [runnumstr,fillnumstr]=runfillstr.split(':')
423  if irunlsdict and not noWarning:
424  if rline[1] is not 'n/a':
425  datarunlsdict[int(runnumstr)]=[]
426  myls=rline[1]
427  if myls!='n/a':
428  [luls,cmls]=myls.split(':')
429  totOldDeliveredLS+=1
430  if cmls!='0':
431  totOldSelectedLS+=1
432  if irunlsdict and not noWarning:
433  datarunlsdict[int(runnumstr)].append(int(myls))
434  dl=rline[5]
435  if rline[5]!='n/a':
436  dl=float(rline[5])#delivered in /ub
437  if dl>maxlslumi: maxlslumi=dl
438  rline[5]=dl
439  totOldDelivered+=dl
440  rl=rline[6]
441  if rline[6]!='n/a':
442  rl=float(rline[6])#recorded in /ub
443  rline[6]=rl
444  totOldRecorded+=rl
445  result.append(rline)
446 
447  for run in lumidata.keys():
448  lsdata=lumidata[run]
449  if not lsdata:
450  #result.append([str(run),'n/a','n/a','n/a','n/a','n/a','n/a','n/a'])
451  if irunlsdict and irunlsdict[run] and not noWarning:
452  datarunlsdict[run]=None
453  #print '[WARNING] selected but no lumi data for run '+str(run)
454  continue
455  fillnum=0
456  if lsdata[0] and lsdata[0][10]:
457  fillnum=lsdata[0][10]
458  existdata=[]
459  #if irunlsdict and not noWarning:
460  # existdata=[x[1] for x in rundata if x[1] ]
461  # datarunlsdict[run]=existdata
462  for perlsdata in lsdata:
463  lumilsnum=perlsdata[0]
464  cmslsnum=perlsdata[1]#triggered ls
465  if not noWarning:
466  if cmslsnum:
467  existdata.append(cmslsnum)
468  ts=perlsdata[2]
469  bs=perlsdata[3]
470  begev=perlsdata[4]
471  deliveredlumi=perlsdata[5]
472  npu=perlsdata[11]
473  if deliveredlumi>maxlslumi: maxlslumi=deliveredlumi
474  recordedlumi=0.
475  if perlsdata[6]:
476  recordedlumi=perlsdata[6]
477  if irunlsdict and irunlsdict[run]:
478  if run in irunlsdict and lumilsnum in irunlsdict[run]:
479  result.append([str(run)+':'+str(fillnum),str(lumilsnum)+':'+str(cmslsnum),ts.strftime('%m/%d/%y %H:%M:%S'),bs,'%.1f'%begev,deliveredlumi,recordedlumi,npu])
480  totalDelivered+=deliveredlumi
481  totalRecorded+=recordedlumi
482  totalDeliveredLS+=1
483  totalSelectedLS+=1
484  else:
485  result.append([str(run)+':'+str(fillnum),str(lumilsnum)+':'+str(cmslsnum),ts.strftime('%m/%d/%y %H:%M:%S'),bs,'%.1f'%begev,deliveredlumi,recordedlumi,npu])
486  totalDelivered+=deliveredlumi
487  totalRecorded+=recordedlumi
488  totalDeliveredLS+=1
489  if cmslsnum :
490  totalSelectedLS+=1
491  datarunlsdict[run]=existdata
492  sortedresult=sorted(result,key=lambda x : int(str(x[0]).split(':')[0]))
493  if irunlsdict and not noWarning:
494  for run,cmslslist in irunlsdict.items():
495  if run not in datarunlsdict.keys() or datarunlsdict[run] is None:
496  sys.stdout.write('[WARNING] selected run '+str(run)+' not in lumiDB or has no qualified data\n')
497  continue
498  if cmslslist:
499  for ss in cmslslist:
500  if ss not in datarunlsdict[run]:
501  sys.stdout.write('[WARNING] lumi or trg for selected run/ls '+str(run)+' '+str(ss)+' not in lumiDB\n')
502  if not toFile:
503  (lsunitstring,unitdenomitor)=CommonUtil.lumiUnitForPrint(maxlslumi*scalefactor)
504  labels = [ ('Run:Fill','LS','UTCTime','Beam Status','E(GeV)','Del('+lsunitstring+')','Rec('+lsunitstring+')','avgPU') ]
505  perlsresult=[]
506  for entry in sortedresult:
507  delumi=entry[5]
508  if delumi!='n/a':
509  delumi='%.3f'%float(float(delumi*scalefactor)/float(unitdenomitor))
510  reclumi=entry[6]
511  if reclumi!='n/a':
512  reclumi='%.3f'%float(float(reclumi*scalefactor)/float(unitdenomitor))
513  avgPU=entry[7]
514  if avgPU!='n/a':
515  if avgPU>0:
516  avgPU='%.3f'%avgPU
517  else:
518  avgPU='0'
519  perlsresult.append([entry[0],entry[1],entry[2],entry[3],entry[4],delumi,reclumi,avgPU])
520  totdeliveredlumi=0.0
521  deliveredlumiunit='/ub'
522  (totdeliveredlumi,deliveredlumiunit)=CommonUtil.guessUnit((totalDelivered+totOldDelivered)*scalefactor)
523  totrecordedlumi=0.0
524  recordedlumiunit='/ub'
525  (totrecordedlumi,recordedlumiunit)=CommonUtil.guessUnit((totalRecorded+totOldRecorded)*scalefactor)
526  lastrowlabels = [ ('Delivered LS','Selected LS', 'Delivered('+deliveredlumiunit+')', 'Recorded('+recordedlumiunit+')')]
527  totalrow.append ([str(totalDeliveredLS+totOldDeliveredLS),str(totalSelectedLS+totOldSelectedLS),'%.3f'%(totdeliveredlumi),'%.3f'%(totrecordedlumi)])
528  print(' == = ')
529  print(tablePrinter.indent (labels+perlsresult, hasHeader = True, separateRows = False, prefix = '| ',
530  postfix = ' |', justify = 'right', delim = ' | ',
531  wrapfunc = lambda x: wrap_onspace_strict (x, 22)))
532  print(' == = Total : ')
533  print(tablePrinter.indent (lastrowlabels+totalrow, hasHeader = True, separateRows = False, prefix = '| ',
534  postfix = ' |', justify = 'right', delim = ' | ',
535  wrapfunc = lambda x: wrap_onspace (x, 20)))
536  else:
537  fieldnames=['Run:Fill','LS','UTCTime','Beam Status','E(GeV)','Delivered(/ub)','Recorded(/ub)','avgPU']
538  filename=toFile
539  dumptocsv(fieldnames,sortedresult,filename)
540 
def toScreenLumiByLS(lumidata, resultlines, scalefactor, irunlsdict=None, noWarning=True, toFile=None)
Definition: lumiReport.py:395
def guessUnit(inverseubval)
Definition: CommonUtil.py:61
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def dumptocsv(fieldnames, result, filename)
Definition: lumiReport.py:14
def lumiUnitForPrint(t)
Definition: CommonUtil.py:32
#define str(s)
double split
Definition: MVATrainer.cc:139
def lumiReport.toScreenNormDetail (   normname,
  norminfo,
  normvalues 
)
list norm detail
input:
    normname
    norminfo=[data_id[0],lumitype(1)istypedefault[2],comment[3],creationtime[4]]
    normvalues={since:[corrector(0),{paramname:paramvalue}(1),amodetag(2),egev(3),comment(4)]}

Definition at line 79 of file lumiReport.py.

References objects.autophobj.float, edm.print(), and str.

79 def toScreenNormDetail(normname,norminfo,normvalues):
80  '''
81  list norm detail
82  input:
83  normname
84  norminfo=[data_id[0],lumitype(1)istypedefault[2],comment[3],creationtime[4]]
85  normvalues={since:[corrector(0),{paramname:paramvalue}(1),amodetag(2),egev(3),comment(4)]}
86  '''
87  lumitype=norminfo[1]
88  istypedefault=norminfo[2]
89  print('==========================================================')
90  print('* Norm: '+normname)
91  print('* Type: '+lumitype)
92  print('* isDefault: '+str(istypedefault))
93  print('==========================================================')
94  labels=[('Since','Func','Parameters','amodetag','egev','comment')]
95 
96  result=[]
97  print(' == = ')
98  for since in sorted(normvalues):
99  normdata=normvalues[since]
100  correctorStr=normdata[0]
101  paramDict=normdata[1]
102  paramDictStr=''
103  count=0
104  for pname in sorted(paramDict):
105  pval=paramDict[pname]
106  if count!=0:
107  paramDictStr+=' '
108  try:
109  fpval=float(pval)
110  if fpval<1.:
111  paramDictStr+=pname+':'+'%.4f'%fpval
112  else:
113  paramDictStr+=pname+':'+'%.2f'%fpval
114  except ValueError:
115  paramDictStr+=pname+':'+pval
116  count+=1
117  amodetag=normdata[2]
118  egev=str(normdata[3])
119  comment=normdata[4]
120  result.append([str(since),correctorStr,paramDictStr,amodetag,egev,comment])
121  print(tablePrinter.indent (labels+result, hasHeader = True, separateRows = False,prefix = '| ', postfix = ' |', justify = 'left',delim = ' | ', wrapfunc = lambda x: wrap_onspace (x,40) ))
122 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def toScreenNormDetail(normname, norminfo, normvalues)
Definition: lumiReport.py:79
#define str(s)
def lumiReport.toScreenNormSummary (   allnorms)
list all known norms summary
input: {normname:[data_id(0),lumitype(1),istypedefault(2),comment(3),creationtime(4)]}

Definition at line 62 of file lumiReport.py.

References edm.print(), and str.

62 def toScreenNormSummary(allnorms):
63  '''
64  list all known norms summary
65  input: {normname:[data_id(0),lumitype(1),istypedefault(2),comment(3),creationtime(4)]}
66  '''
67  result=[]
68  labels=[('Name','Type','IsTypeDefault','Comment','CreationTime')]
69  print(' == = ')
70  sorted_allnorms=sorted(six.iteritems(allnorms),key=lambda x:x[0],reverse=True)
71  for (normname,normvalues) in sorted_allnorms:
72  lumitype=normvalues[1]
73  istypedefault=str(normvalues[2])
74  commentStr=normvalues[3]
75  creationtime=normvalues[4]
76  result.append([normname,lumitype,istypedefault,commentStr,creationtime])
77  print(tablePrinter.indent (labels+result, hasHeader = True, separateRows = False,prefix = '| ', postfix = ' |', justify = 'left',delim = ' | ', wrapfunc = lambda x: wrap_onspace (x,20) ))
78 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
#define str(s)
def toScreenNormSummary(allnorms)
Definition: lumiReport.py:62
def lumiReport.toScreenOverview (   lumidata,
  resultlines,
  scalefactor,
  irunlsdict = None,
  noWarning = True,
  toFile = None 
)
input:
lumidata {run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),recordedlumi(6),calibratedlumierror(7),(bxidx,bxvalues,bxerrs)(8),(bxidx,b1intensities,b2intensities)(9),fillnum(10)]}
resultlines [[resultrow1],[resultrow2],...,] existing result row

Definition at line 263 of file lumiReport.py.

References dumptocsv(), objects.autophobj.float, CommonUtil.guessUnit(), createfilelist.int, edm.print(), split, CommonUtil.splitlistToRangeString(), and str.

263 def toScreenOverview(lumidata,resultlines,scalefactor,irunlsdict=None,noWarning=True,toFile=None):
264  '''
265  input:
266  lumidata {run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),recordedlumi(6),calibratedlumierror(7),(bxidx,bxvalues,bxerrs)(8),(bxidx,b1intensities,b2intensities)(9),fillnum(10)]}
267  resultlines [[resultrow1],[resultrow2],...,] existing result row
268  '''
269  result=[]
270 
271  totOldDeliveredLS=0
272  totOldSelectedLS=0
273  totOldDelivered=0.0
274  totOldRecorded=0.0
275 
276  totaltable=[]
277  totalDeliveredLS = 0
278  totalSelectedLS = 0
279  totalDelivered = 0.0
280  totalRecorded = 0.0
281  datarunlsdict={}#{run:[ls,...]}from data. construct it only if there is irunlsdict to compare with
282  for r in resultlines:
283  runfillstr=r[0]
284  [runnumstr,fillnumstr]=runfillstr.split(':')
285  if irunlsdict and not noWarning:
286  if r[1] is not 'n/a':
287  datarunlsdict[int(runnumstr)]=[]
288  dl=0.0
289  if(r[2]!='n/a'):
290  dl=float(r[2])#delivered in /ub because it comes from file!
291  (rr,lumiu)=CommonUtil.guessUnit(dl)
292  r[2]='%.3f'%(rr)+' ('+lumiu+')'
293  dls=0
294  if(r[1]!='n/a'):
295  dls=int(r[1])
296  totOldDeliveredLS+=dls
297  totOldDelivered+=dl
298  rls=0
299  if(r[3]!='n/a'):
300  rlsstr=r[3]
301  listcomp=rlsstr.split(', ')
302  for lstr in listcomp:
303  enddigs=lstr[1:-1].split('-')
304  lsmin=int(enddigs[0])
305  lsmax=int(enddigs[1])
306  rls=lsmax-lsmin+1
307  totOldSelectedLS+=rls
308  if(r[4]!='n/a'):
309  rcd=float(r[4])#recorded in /ub because it comes from file!
310  (rrcd,rlumiu)=CommonUtil.guessUnit(rcd)
311  r[4]='%.3f'%(rrcd)+' ('+rlumiu+')'
312  totOldRecorded+=rcd
313  result.append(r)
314  for run in lumidata.keys():
315  lsdata=lumidata[run]
316  if not lsdata:
317  result.append([str(run)+':0','n/a','n/a','n/a','n/a'])
318  if irunlsdict and irunlsdict[run] and not noWarning:
319  datarunlsdict[run]=None
320  continue
321  fillnum=0
322  if lsdata[0] and lsdata[0][10]:
323  fillnum=lsdata[0][10]
324  deliveredData=[]
325  recordedData=[]
326  nls=0
327  existdata=[]
328  selectedcmsls=[]
329  for perlsdata in lsdata:
330  lumilsnum=perlsdata[0]
331  cmslsnum=perlsdata[1]
332  if not noWarning:
333  if cmslsnum:
334  existdata.append(cmslsnum)
335  if irunlsdict and irunlsdict[run]:
336  if lumilsnum and lumilsnum in irunlsdict[run]:
337  if perlsdata[5] is not None:
338  deliveredData.append(perlsdata[5])
339  if perlsdata[6]:
340  recordedData.append(perlsdata[6])
341  selectedcmsls.append(lumilsnum)
342  else:
343  deliveredData.append(perlsdata[5])
344  if perlsdata[6]:
345  recordedData.append(perlsdata[6])
346  if cmslsnum:
347  selectedcmsls.append(cmslsnum)
348  datarunlsdict[run]=existdata
349  nls=len(deliveredData)
350  totdelivered=sum(deliveredData)
351  totalDelivered+=totdelivered
352  totalDeliveredLS+=len(deliveredData)
353  (totdeliveredlumi,deliveredlumiunit)=CommonUtil.guessUnit(totdelivered)
354  totrecorded=sum(recordedData)
355  totalRecorded+=totrecorded
356  (totrecordedlumi,recordedlumiunit)=CommonUtil.guessUnit(totrecorded)
357  totalSelectedLS+=len(selectedcmsls)
358  if len(selectedcmsls)==0:
359  selectedlsStr='n/a'
360  else:
361  selectedlsStr = CommonUtil.splitlistToRangeString(selectedcmsls)
362  if not toFile:
363  result.append([str(run)+':'+str(fillnum),str(nls),'%.3f'%(totdeliveredlumi*scalefactor)+' ('+deliveredlumiunit+')',selectedlsStr,'%.3f'%(totrecordedlumi*scalefactor)+' ('+recordedlumiunit+')'])
364  else:
365  result.append([str(run)+':'+str(fillnum),nls,totdelivered*scalefactor,selectedlsStr,totrecorded*scalefactor])
366  sortedresult=sorted(result,key=lambda x : int(str(x[0]).split(':')[0]))
367  if irunlsdict and not noWarning:
368  for run,cmslslist in irunlsdict.items():
369  if run not in datarunlsdict.keys() or datarunlsdict[run] is None:
370  sys.stdout.write('[WARNING] selected run '+str(run)+' not in lumiDB or has no qualified data\n')
371  continue
372  if cmslslist:
373  for ss in cmslslist:
374  if ss not in datarunlsdict[run]:
375  sys.stdout.write('[WARNING] lumi or trg for selected run/ls '+str(run)+' '+str(ss)+' not in lumiDB\n')
376  if not toFile:
377  labels = [('Run:Fill', 'Delivered LS', 'Delivered','Selected LS','Recorded')]
378  print(' == = ')
379  print(tablePrinter.indent (labels+sortedresult, hasHeader = True, separateRows = False,
380  prefix = '| ', postfix = ' |', justify = 'right',
381  delim = ' | ', wrapfunc = lambda x: wrap_onspace (x,20) ))
382  print(' == = Total : ')
383  (totalDeliveredVal,totalDeliveredUni)=CommonUtil.guessUnit(totalDelivered+totOldDelivered)
384  (totalRecordedVal,totalRecordedUni)=CommonUtil.guessUnit(totalRecorded+totOldRecorded)
385  totrowlabels = [('Delivered LS','Delivered('+totalDeliveredUni+')','Selected LS','Recorded('+totalRecordedUni+')')]
386  totaltable.append([str(totalDeliveredLS+totOldDeliveredLS),'%.3f'%(totalDeliveredVal*scalefactor),str(totalSelectedLS+totOldSelectedLS),'%.3f'%(totalRecordedVal*scalefactor)])
387  print(tablePrinter.indent (totrowlabels+totaltable, hasHeader = True, separateRows = False, prefix = '| ',
388  postfix = ' |', justify = 'right', delim = ' | ',
389  wrapfunc = lambda x: wrap_onspace (x, 20)))
390  else:
391  fieldnames = ['Run:Fill', 'DeliveredLS', 'Delivered(/ub)','SelectedLS','Recorded(/ub)']
392  filename=toFile
393  dumptocsv(fieldnames,sortedresult,filename)
394 
def toScreenOverview(lumidata, resultlines, scalefactor, irunlsdict=None, noWarning=True, toFile=None)
Definition: lumiReport.py:263
def guessUnit(inverseubval)
Definition: CommonUtil.py:61
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def splitlistToRangeString(inPut)
Definition: CommonUtil.py:258
def dumptocsv(fieldnames, result, filename)
Definition: lumiReport.py:14
#define str(s)
double split
Definition: MVATrainer.cc:139
def lumiReport.toScreenSingleTag (   taginfo)
input: {run:(lumidataid,trgdataid,hltdataid,comment)}

Definition at line 138 of file lumiReport.py.

References join(), edm.print(), and str.

138 def toScreenSingleTag(taginfo):
139  '''
140  input: {run:(lumidataid,trgdataid,hltdataid,comment)}
141  '''
142  result=[]
143  labels=[('Run','Data Id','Insertion Time','Patch Comment')]
144  print(' == = ')
145  for run in sorted(taginfo):
146  (lumidataid,trgdataid,hltdataid,(ctimestr,comment))=taginfo[run]
147  payloadid='-'.join([str(lumidataid),str(trgdataid),str(hltdataid)])
148  result.append([str(run),payloadid,ctimestr,comment])
149  print(tablePrinter.indent (labels+result, hasHeader = True, separateRows = False,prefix = '| ', postfix = ' |', justify = 'left',delim = ' | ', wrapfunc = lambda x: wrap_onspace (x,25) ))
150 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
#define str(s)
def toScreenSingleTag(taginfo)
Definition: lumiReport.py:138
def lumiReport.toScreenTags (   tagdata)

Definition at line 123 of file lumiReport.py.

References edm.print(), and str.

123 def toScreenTags(tagdata):
124  result=[]
125  labels=[('Name','Min Run','Max Run','Creation Time')]
126  print(' == = ')
127  for tagid in sorted(tagdata):
128  taginfo=tagdata[tagid]
129  name=taginfo[0]
130  minRun=str(taginfo[1])
131  maxRun='Open'
132  if taginfo[2]!=0:
133  maxRun=str(taginfo[2])
134  creationtime=taginfo[3]
135  result.append([name,minRun,maxRun,creationtime])
136  print(tablePrinter.indent (labels+result, hasHeader = True, separateRows = False,prefix = '| ', postfix = ' |', justify = 'left',delim = ' | ', wrapfunc = lambda x: wrap_onspace (x,20) ))
137 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def toScreenTags(tagdata)
Definition: lumiReport.py:123
#define str(s)
def lumiReport.toScreenTotDelivered (   lumidata,
  resultlines,
  scalefactor,
  irunlsdict = None,
  noWarning = True,
  toFile = None 
)
inputs:
lumidata {run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),calibratedlumierror(6),(bxidx,bxvalues,bxerrs)(7),(bxidx,b1intensities,b2intensities)(8),fillnum)(9)]}  
resultlines [[resultrow1],[resultrow2],...,] existing result row
            ('Run:Fill', 'N_LS','N_CMSLS','Delivered','UTCTime','E(GeV)')
irunlsdict: run/ls selection list. irunlsdict=None means no filter

Definition at line 151 of file lumiReport.py.

References dumptocsv(), objects.autophobj.float, CommonUtil.guessUnit(), createfilelist.int, edm.print(), split, and str.

151 def toScreenTotDelivered(lumidata,resultlines,scalefactor,irunlsdict=None,noWarning=True,toFile=None):
152  '''
153  inputs:
154  lumidata {run:[lumilsnum(0),cmslsnum(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),calibratedlumierror(6),(bxidx,bxvalues,bxerrs)(7),(bxidx,b1intensities,b2intensities)(8),fillnum)(9)]}
155  resultlines [[resultrow1],[resultrow2],...,] existing result row
156  ('Run:Fill', 'N_LS','N_CMSLS','Delivered','UTCTime','E(GeV)')
157  irunlsdict: run/ls selection list. irunlsdict=None means no filter
158  '''
159  result=[]
160  totOldDeliveredLS=0
161  totOldCMSLS=0
162  totOldDelivered=0.0
163  datarunlsdict={}#{run:[ls,...]}from data. construct it only if there is irunlsdict to compare with
164  for r in resultlines:
165  runfillstr=r[0]
166  [runnumstr,fillnumstr]=runfillstr.split(':')
167  if irunlsdict and not noWarning:
168  if r[1] is not 'n/a':
169  datarunlsdict[int(runnumstr)]=[]
170  dl=0.0
171  if(r[3]!='n/a'): #delivered
172  dl=float(r[3])#in /ub because it comes from file!
173  (rr,lumiu)=CommonUtil.guessUnit(dl)
174  r[3]='%.3f'%(rr)+' ('+lumiu+')'
175  sls=0
176  if(r[1]!='n/a'): #n_ls
177  sls=int(r[1])
178  totcmsls=0
179  if(r[2]!='n/a'):#n_cmsls
180  totcmsls=int(r[2])
181  totOldDeliveredLS+=sls
182  totOldCMSLS+=totcmsls
183  totOldDelivered+=dl
184  if(r[5]!='n/a'): #egev
185  egv=float(r[5])
186  r[5]='%.1f'%egv
187  result.append(r)
188  totls=0
189  totcmsls=0
190  totdelivered=0.0
191  totaltable=[]
192  for run in lumidata.keys():
193  lsdata=lumidata[run]
194  if not lsdata:
195  result.append([str(run)+':0','n/a','n/a','n/a','n/a','n/a'])
196  if irunlsdict and not noWarning:
197  datarunlsdict[run]=None
198  continue
199  fillnum=0
200  if lsdata[0] and lsdata[0][9]:
201  fillnum=lsdata[0][9]
202  deliveredData=[]
203  nls=0
204  existdata=[]
205  selectedcmsls=[]
206  for perlsdata in lsdata:
207  lumilsnum=perlsdata[0]
208  cmslsnum=perlsdata[1]
209  if not noWarning:
210  if cmslsnum:
211  existdata.append(cmslsnum)
212  if irunlsdict and irunlsdict[run]:
213  if lumilsnum and lumilsnum in irunlsdict[run]:
214  deliveredData.append(perlsdata[5])
215  if cmslsnum:
216  selectedcmsls.append(cmslsnum)
217  else:
218  deliveredData.append(perlsdata[5])
219  if cmslsnum:
220  selectedcmsls.append(cmslsnum)
221  datarunlsdict[run]=existdata
222  nls=len(deliveredData)
223  ncmsls=0
224  if selectedcmsls:
225  ncmsls=len(selectedcmsls)
226  totcmsls+=ncmsls
227  totls+=nls
228  totlumi=sum(deliveredData)
229  totdelivered+=totlumi
230  (totlumival,lumiunit)=CommonUtil.guessUnit(totlumi)
231  beamenergyPerLS=[float(x[4]) for x in lsdata if x[3]=='STABLE BEAMS']
232  avgbeamenergy=0.0
233  if len(beamenergyPerLS):
234  avgbeamenergy=sum(beamenergyPerLS)/len(beamenergyPerLS)
235  runstarttime='n/a'
236  if lsdata[0] and lsdata[0][2]:
237  runstarttime=lsdata[0][2]
238  runstarttime=runstarttime.strftime("%m/%d/%y %H:%M:%S")
239  if not toFile:
240  result.append([str(run)+':'+str(fillnum),str(nls),str(ncmsls),'%.3f'%(totlumival*scalefactor)+' ('+lumiunit+')',runstarttime,'%.1f'%(avgbeamenergy)])
241  else:
242  result.append([str(run)+':'+str(fillnum),str(nls),str(ncmsls),(totlumi*scalefactor),runstarttime,'%.1f'%(avgbeamenergy)])
243  sortedresult=sorted(result,key=lambda x : int(str(x[0]).split(':')[0]))
244  #print 'sortedresult ',sortedresult
245  if not toFile:
246  labels = [('Run:Fill', 'N_LS','N_CMSLS','Delivered','UTCTime','E(GeV)')]
247  print(' == = ')
248  print(tablePrinter.indent (labels+sortedresult, hasHeader = True, separateRows = False,
249  prefix = '| ', postfix = ' |', justify = 'right',
250  delim = ' | ', wrapfunc = lambda x: wrap_onspace (x,40) ))
251  print(' == = Total : ')
252  (totalDeliveredVal,totalDeliveredUni)=CommonUtil.guessUnit(totdelivered+totOldDelivered)
253  totrowlabels = [('Delivered LS','Total CMS LS','Delivered('+totalDeliveredUni+')')]
254  totaltable.append([str(totls+totOldDeliveredLS),str(totcmsls+totOldCMSLS),'%.3f'%(totalDeliveredVal*scalefactor)])
255  print(tablePrinter.indent (totrowlabels+totaltable, hasHeader = True, separateRows = False, prefix = '| ',
256  postfix = ' |', justify = 'right', delim = ' | ',
257  wrapfunc = lambda x: wrap_onspace (x, 20)))
258  else:
259  fieldnames = ['Run:Fill', 'N_LS','N_CMSLS','Delivered(/ub)','UTCTime','E(GeV)']
260  filename=toFile
261  dumptocsv(fieldnames,sortedresult,filename)
262 
def guessUnit(inverseubval)
Definition: CommonUtil.py:61
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def toScreenTotDelivered(lumidata, resultlines, scalefactor, irunlsdict=None, noWarning=True, toFile=None)
Definition: lumiReport.py:151
def dumptocsv(fieldnames, result, filename)
Definition: lumiReport.py:14
#define str(s)
double split
Definition: MVATrainer.cc:139
def lumiReport.toScreenTotEffective (   lumidata,
  resultlines,
  scalefactor,
  irunlsdict = None,
  noWarning = True,
  toFile = None 
)
input:  {run:[lumilsnum(0),triggeredls(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),recordedlumi(6),calibratedlumierror(7),{hltpath:[l1name,l1prescale,hltprescale,efflumi]}(8),bxdata(9),beamdata](10),fillnum(11)}
screen Run,SelectedLS,Recorded,HLTPath,L1Bit,Effective

Definition at line 695 of file lumiReport.py.

References mps_setup.append, dumptocsv(), objects.autophobj.float, CommonUtil.guessUnit(), createfilelist.int, join(), list(), edm.print(), split, CommonUtil.splitlistToRangeString(), str, and dataformats.wrap_onspace_strict().

695 def toScreenTotEffective(lumidata,resultlines,scalefactor,irunlsdict=None,noWarning=True,toFile=None):
696 
697  '''
698  input: {run:[lumilsnum(0),triggeredls(1),timestamp(2),beamstatus(3),beamenergy(4),deliveredlumi(5),recordedlumi(6),calibratedlumierror(7),{hltpath:[l1name,l1prescale,hltprescale,efflumi]}(8),bxdata(9),beamdata](10),fillnum(11)}
699  screen Run,SelectedLS,Recorded,HLTPath,L1Bit,Effective
700  '''
701  result=[]#[run,selectedlsStr,recordedofthisrun,hltpath,l1bit,efflumi]
702 
703  totdict={}#{hltpath:[nls,toteff]}
704  selectedcmsls=[]
705  alltotrecorded=0.0
706  alleffective=0.0
707  recordedPerpathPerrun={}#{path:{run:recorded}}
708  selectedPerpathPerrun={}#{path:{run:totselected}}
709  datarunlsdict={}#{run:[ls,...]}from data. construct it only if there is irunlsdict to compare with
710  for rline in resultlines:
711  runfillstr=rline[0]
712  [runnumstr,fillnumstr]=runfillstr.split(':')
713  myls=rline[1]
714  if irunlsdict and not noWarning:
715  if myls is not 'n/a':
716  datarunlsdict[int(runnumstr)]=[]
717  mypath=rline[3]
718  if mypath!='n/a':
719  mypath=mypath.split('(')[0]
720  if mypath not in totdict:
721  totdict[mypath]=[0,0.0]
722  recordedPerpathPerrun[mypath]={}
723  selectedPerpathPerrun[mypath]={}
724  if myls!='n/a':
725  listcomp=myls.split(', ')
726  for lstr in listcomp:
727  enddigs=lstr[1:-1].split('-')
728  lsmin=int(enddigs[0])
729  lsmax=int(enddigs[1])
730  rls=lsmax-lsmin+1
731  totdict[mypath][0]+=rls
732  selectedPerrun[mypath].setdefault(int(myrun),totdict[mypath][0])
733  myrecorded=rline[2]
734  if myrecorded!='n/a':
735  recordedPerpathPerrun[mypath].setdefault(int(myrun),float(myrecorded))
736  (rr,lumiu)=CommonUtil.guessUnit(float(myrecorded))
737  rline[2]='%.3f'%(rr)+' ('+lumiu+')'
738  myeff=rline[5]
739  if myeff!='n/a':
740  reff=float(myeff)
741  (rr,lumiu)=CommonUtil.guessUnit(float(reff))
742  rline[5]='%.3f'%(rr)+' ('+lumiu+')'
743  totdict[mypath][1]+=reff
744  result.append(rline)
745  for run in lumidata.keys():#loop over runs
746  lsdata=lumidata[run]
747  hprescdict={}
748  lprescdict={}
749  if not lsdata:
750  result.append([str(run),'n/a','n/a','n/a','n/a','n/a'])
751  if irunlsdict and irunlsdict[run] and not noWarning:
752  datarunlsdict[run]=None
753  continue
754  fillnum=0
755  if lsdata[0] and lsdata[0][11]:
756  fillnum=lsdata[0][11]
757  selectedcmsls=[x[1] for x in lsdata if x[1]]
758  totefflumiDict={}
759  totrecorded=0.0
760  toteffective=0.0
761  pathmap={}#{hltpathname:1lname}
762  existdata=[]
763  for thisls in lsdata:
764  cmslsnum=thisls[1]
765  if not noWarning:
766  if cmslsnum:
767  existdata.append(cmslsnum)
768  efflumiDict=thisls[8]# this ls has no such path?
769  recordedlumi=0.0
770  if thisls[6]:
771  recordedlumi=thisls[6]
772  totrecorded+=recordedlumi
773  if not efflumiDict:#no hltdata for this LS
774  lumival=0.
775  if cmslsnum in selectedcmsls:
776  selectedcmsls.remove(cmslsnum)
777  continue
778  for hltpathname in sorted(efflumiDict):
779  pathdata=efflumiDict[hltpathname]
780  if hltpathname not in totefflumiDict:
781  totefflumiDict[hltpathname]=0.0
782  pathmap[hltpathname]='n/a'
783  l1name=pathdata[0]
784  l1presc=pathdata[1]
785  hltpresc=pathdata[2]
786  lumival=pathdata[3]
787  recordedPerpathPerrun.setdefault(hltpathname,{})
788  selectedPerpathPerrun.setdefault(hltpathname,{})
789  if hltpathname not in totdict:
790  totdict[hltpathname]=[0,0.0]
791  if l1presc is None or hltpresc is None:#if found all null prescales and if it is in the selectedcmsls, remove it because incomplete
792  if cmslsnum in selectedcmsls:
793  selectedcmsls.remove(cmslsnum)
794  else:
795  if hltpathname not in hprescdict:
796  hprescdict[hltpathname]=[]
797  hprescdict[hltpathname].append(hltpresc)
798  if l1name not in lprescdict:
799  lprescdict[l1name]=[]
800  lprescdict[l1name].append(l1presc)
801  if cmslsnum!=0:
802  totdict[hltpathname][0]+=1
803  if lumival:
804  totdict[hltpathname][1]+=lumival
805  totefflumiDict[hltpathname]+=lumival
806  pathmap[hltpathname]=l1name
807  recordedPerpathPerrun[hltpathname][run]=totrecorded
808  selectedPerpathPerrun[hltpathname][run]=len(selectedcmsls)
809  if len(selectedcmsls)==0:
810  selectedlsStr='n/a'
811  else:
812  selectedlsStr = CommonUtil.splitlistToRangeString(selectedcmsls)
813  if irunlsdict and not noWarning:
814  datarunlsdict[run]=selectedcmsls
815 
816  for name in sorted(totefflumiDict):
817  lname=pathmap[name]
818  totrecordedinrun=recordedPerpathPerrun[name][run]
819  hprescs=list(set(hprescdict[name]))
820  hprescStr='('+','.join(['%d'%(x) for x in hprescs])+')'
821  (totrecval,totrecunit)=CommonUtil.guessUnit(totrecordedinrun*scalefactor)
822  effval='n/a'
823 
824  effvalStr='n/a'
825  lprescStr='n/a'
826  cleanlname=''
827  if lname!='n/a':
828  effval=totefflumiDict[name]*scalefactor
829  lprescs=list(set(lprescdict[lname]))
830  lprescStr='('+','.join(['%d'%(x) for x in lprescs])+')'
831  cleanlname=lname.replace('"','')
832  (efflumival,efflumiunit)=CommonUtil.guessUnit(effval)
833  effvalStr='%.3f'%(efflumival)+'('+efflumiunit+')'
834  if not toFile:
835  result.append([str(run)+':'+str(fillnum),selectedlsStr,'%.3f'%(totrecval)+'('+totrecunit+')',name+hprescStr,cleanlname+lprescStr,effvalStr])
836  else:
837  result.append([str(run)+':'+str(fillnum),selectedlsStr,totrecordedinrun*scalefactor,name+hprescStr,cleanlname+lprescStr,effval])
838 
839  if irunlsdict and not noWarning:
840  for run,cmslslist in irunlsdict.items():
841  if run not in datarunlsdict.keys() or datarunlsdict[run] is None:
842  sys.stdout.write('[WARNING] selected run '+str(run)+' not in lumiDB or has no HLT data\n')
843  continue
844  if cmslslist:
845  for ss in cmslslist:
846  if ss not in datarunlsdict[run]:
847  sys.stdout.write('[WARNING] selected run/ls '+str(run)+' '+str(ss)+' not in lumiDB or has no HLT data\n')
848 
849  sortedresult=sorted(result,key=lambda x : int(str(x[0]).split(':')[0]))
850 
851  if not toFile:
852  labels = [('Run:Fill','SelectedLS','Recorded','HLTpath(Presc)','L1bit(Presc)','Effective')]
853  print(' == = ')
854  print(tablePrinter.indent (labels+sortedresult, hasHeader = True, separateRows = False,
855  prefix = '| ', postfix = ' |', justify = 'right',
856  delim = ' | ', wrapfunc = lambda x: wrap_onspace_strict(x,22) ))
857  print(' == = Total : ')
858  lastrowlabels=[('HLTPath','SelectedLS','Recorded','Effective')]
859  totresult=[]
860  for hname in sorted(totdict):
861  hdata=totdict[hname]
862  totnls=hdata[0]
863  (toteffval,toteffunit)=CommonUtil.guessUnit(hdata[1]*scalefactor)
864  alltotrecorded=0.0
865  selectedThispath=selectedPerpathPerrun[hname]
866  for runnumber,nselected in selectedThispath.items():
867  if nselected==0: continue
868  alltotrecorded+=recordedPerpathPerrun[hname][runnumber]
869  (alltotrecordedVal,alltotrecordedunit)=CommonUtil.guessUnit(alltotrecorded*scalefactor)
870  totresult.append([hname,str(totnls),'%.3f'%(alltotrecordedVal)+'('+alltotrecordedunit+')','%.3f'%(toteffval)+'('+toteffunit+')'])
871  print(tablePrinter.indent (lastrowlabels+totresult, hasHeader = True, separateRows = False,prefix = '| ', postfix = ' |', justify = 'right',
872  delim = ' | ', wrapfunc = lambda x: wrap_onspace (x,20) ))
873  else:
874  fieldnames=['Run:Fill','SelectedLS','Recorded','HLTpath(Presc)','L1bit(Presc)','Effective(/ub)']
875  filename=toFile
876  dumptocsv(fieldnames,sortedresult,filename)
877 
def guessUnit(inverseubval)
Definition: CommonUtil.py:61
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def splitlistToRangeString(inPut)
Definition: CommonUtil.py:258
def dumptocsv(fieldnames, result, filename)
Definition: lumiReport.py:14
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def wrap_onspace_strict(text, width)
Definition: dataformats.py:64
def toScreenTotEffective(lumidata, resultlines, scalefactor, irunlsdict=None, noWarning=True, toFile=None)
Definition: lumiReport.py:695
#define str(s)
double split
Definition: MVATrainer.cc:139
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