4 print "ERROR in Matrix"
5 print "overwritting",key,
"not allowed"
7 self.update({float(key):
WF(float(key),value)})
17 print "overwritting",key,
"not allowed"
21 self.update({key:value})
26 value=self[keypair[1]]
27 self.update({keypair[0]:value})
41 print 'steps',s,stepsDict[s]
42 steps.append(stepsDict[s])
47 return range(lumis[0],(lumis[1]+1))
50 jsonFile2015 =
findFileInPath(
"DPGAnalysis/Skims/data/Cert_13TeV_16Dec2015ReReco_Collisions15_25ns_50ns_JSON.txt")
53 with open(jsonFile2015)
as data_file:
54 data_json2015 = json.load(data_file)
58 def selectedLS(list_runs=[],maxNum=-1,l_json=data_json2015):
60 if type(list_runs[0]) !=int:
61 print "ERROR: list_runs must be a list of intergers"
67 if str(run)
in l_json.keys():
71 for LSsegment
in l_json[str(run)] :
73 ls_count += (LSsegment[-1] - LSsegment[0] + 1)
74 if (ls_count > maxNum) & (maxNum != -1):
77 if runNumber
in local_dict.keys():
78 local_dict[runNumber].
append(LSsegment)
80 local_dict[runNumber] = [LSsegment]
84 print "run %s is NOT present in json %s\n\n"%(run, l_json)
87 if ( len(local_dict.keys()) > 0 ) :
90 print "No luminosity section interval passed the json and your selection; returning None"
98 InputInfoNDefault=2000000
100 def __init__(self,dataSet,label='',run=[],ls={},files=1000,events=InputInfoNDefault,split=10,location='CAF',ib_blacklist=None,ib_block=None) :
112 def das(self, das_options):
113 if len(self.
run)
is not 0
or self.
ls:
118 command =
";".
join([
"das_client.py %s --query '%s'" % (das_options, query)
for query
in self.
queries()[:3] ])
119 command =
"({0})".
format(command)
121 command =
"das_client.py %s --query '%s'" % (das_options, self.
queries()[0])
125 command +=
" | grep -E -v "
127 command +=
" | sort -u"
131 if len(self.
run) != 0:
132 return "echo '{\n"+
",".
join((
'"%d":[[1,268435455]]\n'%(x,)
for x
in self.
run))+
"}'"
134 return "echo '{\n"+
",".
join((
'"%d" : %s\n'%( int(x),self.
ls[x])
for x
in self.ls.keys()))+
"}'"
138 query_by =
"block" if self.
ib_block else "dataset"
149 return [
"file {0}={1} run={2}".
format(query_by, query_source, query_run)
for query_run
in self.ls.keys()]
160 if len(self.
run)
is not 0:
161 return [
"file {0}={1} run={2} site=T2_CH_CERN".
format(query_by, query_source, query_run)
for query_run
in self.
run]
164 return [
"file {0}={1} site=T2_CH_CERN".
format(query_by, query_source)]
176 if TELL:
print last,dictlist
179 return copy.copy(dictlist[0])
181 reducedlist=dictlist[0:
max(0,last-1)]
182 if TELL:
print reducedlist
184 d=copy.copy(dictlist[last])
186 d.update(dictlist[last-1])
188 reducedlist.append(d)
189 return merge(reducedlist,TELL)
194 if TELL:
print "original dict, BEF: %s"%d
196 if TELL:
print "copy-removed dict, AFT: %s"%e
202 stCond={
'--conditions':
'auto:run1_mc'}
204 return {
'--relval':
'%s000,%s'%(N,s)}
206 return {
'--relval':
'%s000000,%s'%(N,s)}
210 if (
'INPUT' in steps[s]):
211 oldD=steps[s][
'INPUT'].dataSet
212 for (ref,newRef)
in listOfPairs:
214 steps[s][
'INPUT'].dataSet=oldD.replace(ref,newRef)
215 if '--pileup_input' in steps[s]:
216 for (ref,newRef)
in listOfPairs:
217 if ref
in steps[s][
'--pileup_input']:
218 steps[s][
'--pileup_input']=steps[s][
'--pileup_input'].
replace(ref,newRef)
225 def genvalid(fragment,d,suffix='all',fi='',dataSet=''):
229 c[
'-s']=c[
'-s'].
replace(
'genvalid',
'genvalid_'+suffix)
231 c[
'--filein']=
'lhe:%d'%(fi,)
233 c[
'--filein']=
'das:%s'%(dataSet,)
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 ...
static std::string join(char **cmd)
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