CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
core.ProvenanceAnalyzer.ProvenanceAnalyzer Class Reference
Inheritance diagram for core.ProvenanceAnalyzer.ProvenanceAnalyzer:

Public Member Functions

def __init__ (self, cfg_ana, cfg_comp, looperName)
 
def cmsswVNums (self, release)
 
def declareHandles (self)
 
def miniAODVersion (self, vnums)
 
def process (self, event)
 

Public Attributes

 lastId
 
 provenance
 

Detailed Description

Definition at line 12 of file ProvenanceAnalyzer.py.

Constructor & Destructor Documentation

def core.ProvenanceAnalyzer.ProvenanceAnalyzer.__init__ (   self,
  cfg_ana,
  cfg_comp,
  looperName 
)

Definition at line 17 of file ProvenanceAnalyzer.py.

17  def __init__(self, cfg_ana, cfg_comp, looperName):
18  super(ProvenanceAnalyzer, self).__init__(cfg_ana, cfg_comp, looperName)
19  self.lastId = (0,0)
20  self.provenance = []
21 
def __init__(self, cfg_ana, cfg_comp, looperName)

Member Function Documentation

def core.ProvenanceAnalyzer.ProvenanceAnalyzer.cmsswVNums (   self,
  release 
)

Definition at line 25 of file ProvenanceAnalyzer.py.

References createfilelist.int, and python.rootplot.root2matplotlib.replace().

Referenced by core.ProvenanceAnalyzer.ProvenanceAnalyzer.process().

25  def cmsswVNums(self, release):
26  vpieces = release.split("_")[1:]
27  vnums = [ int(v) for v in vpieces[:3] ]
28  if len(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","")))
33  else:
34  vnums.append(0)
35  return tuple(vnums)
def replace(string, replacements)
def core.ProvenanceAnalyzer.ProvenanceAnalyzer.declareHandles (   self)

Definition at line 22 of file ProvenanceAnalyzer.py.

22  def declareHandles(self):
23  super(ProvenanceAnalyzer, self).declareHandles()
24 
def core.ProvenanceAnalyzer.ProvenanceAnalyzer.miniAODVersion (   self,
  vnums 
)

Definition at line 36 of file ProvenanceAnalyzer.py.

Referenced by core.ProvenanceAnalyzer.ProvenanceAnalyzer.process().

36  def miniAODVersion(self, vnums):
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)
41  return (2015,1.0)
42  elif vnums[:2] == (7,2):
43  return (2014,2.1)
44  elif vnums[:2] == (7,0):
45  if vnums >= (7,0,9,1): return (2014,2.0)
46  return (2014,1.0)
47  else:
48  return (-999,-999)
49 
def core.ProvenanceAnalyzer.ProvenanceAnalyzer.process (   self,
  event 
)

Definition at line 50 of file ProvenanceAnalyzer.py.

References core.ProvenanceAnalyzer.ProvenanceAnalyzer.cmsswVNums(), triggerObjects_cff.id, core.ProvenanceAnalyzer.ProvenanceAnalyzer.lastId, list(), core.ProvenanceAnalyzer.ProvenanceAnalyzer.miniAODVersion(), edm.print(), core.ProvenanceAnalyzer.ProvenanceAnalyzer.provenance, cond::UserLogInfo.provenance, cond::LogDBEntry_t.provenance, python.rootplot.root2matplotlib.replace(), and writedatasetfile.run.

50  def process(self, event):
51  eid = ( event.input.eventAuxiliary().id().run(),
52  event.input.eventAuxiliary().id().luminosityBlock() )
53  if eid != self.lastId:
54  #import pdb; pdb.set_trace()
55  history = event.input.object().processHistory()
56  for i in reversed(list(range(history.size()))):
57  conf = history.at(i)
58  release = conf.releaseVersion().replace('"',"")
59  vnums = self.cmsswVNums(release)
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)))
62  self.provenance = [
63  ('release', release),
64  ('releaseVersion', vnums),
65  ('miniAODVersion', self.miniAODVersion(vnums)),
66  ]
67  break
68  self.lastId = eid
69  for key,value in self.provenance:
70  setattr(event, key, value)
71  return True
72 
def replace(string, replacements)
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
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

Member Data Documentation

core.ProvenanceAnalyzer.ProvenanceAnalyzer.lastId
core.ProvenanceAnalyzer.ProvenanceAnalyzer.provenance