3 from __future__
import print_function
4 import string, os, time,re
28 runnumber=
int(lumifilename.split(
'_')[4])
34 command =
'lumiData2.py -c ' +connectionString+
' -P '+authpath+
' listrun' 36 command+=
' --minrun '+
str(minrun)
37 statusAndOutput = commands.getstatusoutput(command)
38 rlist= eval(statusAndOutput[1])
40 lastAnalyzedRunNumber = rlist[-1]
41 print(
'Last run in DB: ', lastAnalyzedRunNumber)
43 print(
'No qualified run found in DB')
44 lastAnalyzedRunNumber=
int(minrun)
47 p=re.compile(
'^CMS_LUMI_RAW_\d\d\d\d\d\d\d\d_\d\d\d\d\d\d\d\d\d_\d\d\d\d_\d.root$')
48 files=
list(
filter(os.path.isfile,[os.path.join(dropbox,x)
for x
in os.listdir(dropbox)
if p.match(x)]))
49 files.sort(key=
lambda x: os.path.getmtime(os.path.join(dropbox,x)))
55 print(
'Last lumi file produced by HF: ', lastRaw +
', Run: ', lastRecordedRun)
59 if lastRecordedRun != lastAnalyzedRunNumber:
61 if len(file.split(
'_'))!=7:
continue 65 if thisrun>lastAnalyzedRunNumber :
66 runsToBeAnalyzed[
str(thisrun)] = file
67 return runsToBeAnalyzed
70 from RecoLuminosity.LumiDB
import argparse
72 parser = argparse.ArgumentParser(prog=os.path.basename(sys.argv[0]),description=
"Lumi Data scan")
73 parser.add_argument(
'-c',dest=
'connect',action=
'store',required=
True,help=
'connect string to lumiDB')
74 parser.add_argument(
'-d',dest=
'dropbox',action=
'store',required=
True,help=
'location of the lumi root files')
75 parser.add_argument(
'-P',dest=
'authpath',action=
'store',required=
False,help=
'auth path')
76 parser.add_argument(
'-L',dest=
'logpath',action=
'store',required=
False,help=
'log path')
77 parser.add_argument(
'-f',dest=
'loaderconf',action=
'store',required=
True,help=
'path to loder config file')
78 parser.add_argument(
'--minrun',dest=
'minrun',action=
'store',required=
False,help=
'minimum run to serch')
79 args=parser.parse_args()
81 lumiauthpath=args.authpath
83 lumilogpath=args.logpath
84 loaderconf=args.loaderconf
85 runsToBeAnalyzed =
getRunsToBeUploaded(args.connect,args.dropbox,lumiauthpath,minrun=args.minrun)
88 rs=sorted(runsToBeAnalyzed.keys())
91 if runCounter==1:
print(
'List of processed runs: ')
92 print(
'Run: ', run,
' file: ', runsToBeAnalyzed[run])
93 logFile=open(os.path.join(lumilogpath,
'loadDB_run'+run+
'.log'),
'w',0)
96 command =
'$LOCALRT/test/$SCRAM_ARCH/cmmdLoadLumiDB -r '+run+
' -L "file:'+runsToBeAnalyzed[run]+
'"'+
' -f '+loaderconf+
' --debug' 97 statusAndOutput = commands.getstatusoutput(command)
98 logFile.write(command+
'\n')
99 logFile.write(statusAndOutput[1])
100 if not statusAndOutput[0] == 0:
101 print(
'ERROR while loading info onto DB for run ' + run)
102 print(statusAndOutput[1])
113 if runCounter == 0:
print(
'No runs to be analyzed')
115 if __name__==
'__main__':
def getRunsToBeUploaded(connectionString, dropbox, authpath='', minrun=180250)
S & print(S &os, JobReport::InputFile const &f)
def getRunnumberFromFileName(lumifilename)
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