Definition at line 100 of file checkRuns.py.
References bitset_utilities.append(), beamvalidation.exit(), getListOfRunsAndLumiFromFile(), if(), eostools.ls(), print(), sistrip::SpyUtilities.range(), submitPVValidationJobs.split(), and str.
102 filesDir =
"LatestRuns/Results/";
103 fileList =
ls(filesDir)
104 listOfRunsAndLumi = {};
106 if(
not listOfRunsAndLumi):
107 listOfRunsAndLumi =
getListOfRunsAndLumiFromFile(-1,
"/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions10/7TeV/StreamExpress/Cert_132440-149442_7TeV_StreamExpress_Collisions10_JSON_v3.txt");
109 runKeys = listOfRunsAndLumi.keys();
112 for fileName
in fileList:
113 regExp = re.search(
'(\D+)(\d+)_(\d+)_(\d+).txt',fileName);
115 error =
"Can't find reg exp";
117 runFiles.append(long(regExp.group(3)));
123 runsAndLumisInRR = {};
126 for lumiRange
in listOfRunsAndLumi[run]:
128 for l
in range(lumiRange[0],lumiRange[1]+1):
129 RRList.append(long(l));
131 runsAndLumisInRR[run] = RRList;
133 runsAndLumisProcessed = {}
134 for fileName
in fileList:
135 file = open(filesDir+fileName)
137 if line.find(
"Runnumber") != -1:
138 run = long(line.replace(
'\n',
'').
split(
' ')[1])
139 elif line.find(
"LumiRange") != -1:
140 lumiLine = line.replace(
'\n',
'').
split(
' ')
141 begLumi = long(lumiLine[1])
142 endLumi = long(lumiLine[3])
143 if begLumi != endLumi:
144 error =
"The lumi range is greater than 1 for run " +
str(run) +
" " + line +
" in file: " + runListDir + fileName
147 if not run
in runsAndLumisProcessed:
148 runsAndLumisProcessed[run] = []
149 if begLumi
in runsAndLumisProcessed[run]:
150 print(
"Lumi " +
str(begLumi) +
" in event " +
str(run) +
" already exist. This MUST not happen but right now I will ignore this lumi!")
152 runsAndLumisProcessed[run].
append(begLumi)
158 for lumi
in runsAndLumisInRR[run]:
161 if(run
not in runFiles):
162 print(
"Can't find run", run,
"in the files!")
164 elif(
not lumi
in runsAndLumisProcessed[run]):
165 missingLumis.append(lumi)
166 if(len(missingLumis) != 0):
167 print(
"In run", run,
"these lumis are missing ->", missingLumis)
boost::dynamic_bitset append(const boost::dynamic_bitset<> &bs1, const boost::dynamic_bitset<> &bs2)
this method takes two bitsets bs1 and bs2 and returns result of bs2 appended to the end of bs1 ...
const uint16_t range(const Frame &aFrame)
if(conf_.getParameter< bool >("UseStripCablingDB"))
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def getListOfRunsAndLumiFromFile