1 from __future__
import print_function
2 from builtins
import range
5 from PhysicsTools.Heppy.analyzers.core.Analyzer
import Analyzer
6 from PhysicsTools.Heppy.analyzers.core.AutoHandle
import AutoHandle
7 from PhysicsTools.HeppyCore.framework.event
import Event
8 from PhysicsTools.HeppyCore.statistics.counter
import Counter, Counters
10 from DataFormats.FWLite
import Events, Handle,Lumis
17 def __init__(self, cfg_ana, cfg_comp, looperName):
18 super(ProvenanceAnalyzer, self).
__init__(cfg_ana, cfg_comp, looperName)
26 vpieces = release.split(
"_")[1:]
27 vnums = [
int(v)
for v
in vpieces[:3] ]
29 if "patch" in vpieces[3]:
30 vnums.append(
int(vpieces[3].
replace(
"patch",
"")))
31 elif "pre" in vpieces[3]:
32 vnums.append(-100+
int(vpieces[3].
replace(
"pre",
"")))
37 if vnums[:2] == (7,4):
38 if vnums >= (7,4,14,0):
return (2015,2.1)
39 if vnums >= (7,4,12,0):
return (2015,2.0)
40 if vnums >= (7,4, 8,1):
return (2015,1.1)
42 elif vnums[:2] == (7,2):
44 elif vnums[:2] == (7,0):
45 if vnums >= (7,0,9,1):
return (2014,2.0)
51 eid = ( event.input.eventAuxiliary().
id().
run(),
52 event.input.eventAuxiliary().
id().luminosityBlock() )
55 history = event.input.object().processHistory()
56 for i
in reversed(
list(
range(history.size()))):
58 release = conf.releaseVersion().
replace(
'"',
"")
60 if conf.processName()
in (
"PAT",
"RECO",
"REC2"):
61 print(
"processing step %d: process %s, release %r %s, miniAOD %s" % (i, conf.processName(), release, vnums, self.
miniAODVersion(vnums)))
64 (
'releaseVersion', vnums),
70 setattr(event, key, value)
73 import PhysicsTools.HeppyCore.framework.config
as cfg
74 setattr(ProvenanceAnalyzer,
"defaultConfig", cfg.Analyzer(
75 class_object = ProvenanceAnalyzer
def replace(string, replacements)
S & print(S &os, JobReport::InputFile const &f)
def miniAODVersion(self, vnums)
def __init__(self, cfg_ana, cfg_comp, looperName)
def cmsswVNums(self, release)
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