CMS 3D CMS Logo

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

Public Member Functions

def beginLoop (self, setup)
 
def declareHandles (self)
 
def process (self, event)
 
def readCollections (self, iEvent)
 

Public Attributes

 handles
 
 mchandles
 

Detailed Description

Base Analyzer class. Used in Looper.

Definition at line 8 of file Analyzer.py.

Member Function Documentation

def core.Analyzer.Analyzer.beginLoop (   self,
  setup 
)
Automatically called by Looper, for all analyzers.

Definition at line 15 of file Analyzer.py.

References core.Analyzer.Analyzer.declareHandles().

15  def beginLoop(self, setup):
16  '''Automatically called by Looper, for all analyzers.'''
17  super(Analyzer, self).beginLoop(setup)
18  self.declareHandles()
19 
20 
def declareHandles(self)
Definition: Analyzer.py:11
def beginLoop(self, setup)
Definition: Analyzer.py:15
def core.Analyzer.Analyzer.declareHandles (   self)

Definition at line 11 of file Analyzer.py.

Referenced by core.Analyzer.Analyzer.beginLoop().

11  def declareHandles(self):
12  self.handles = {}
13  self.mchandles = {}
14 
def declareHandles(self)
Definition: Analyzer.py:11
def core.Analyzer.Analyzer.process (   self,
  event 
)
Automatically called by Looper, for all analyzers.
each analyzer in the sequence will be passed the same event instance.
each analyzer can access, modify, and store event information, of any type.

Definition at line 21 of file Analyzer.py.

References edm.print(), and core.Analyzer.Analyzer.readCollections().

21  def process(self, event ):
22  '''Automatically called by Looper, for all analyzers.
23  each analyzer in the sequence will be passed the same event instance.
24  each analyzer can access, modify, and store event information, of any type.'''
25  print(self.cfg_ana.name)
26  self.readCollections( event.input )
27 
def process(self, event)
Definition: Analyzer.py:21
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def readCollections(self, iEvent)
Definition: Analyzer.py:28
def core.Analyzer.Analyzer.readCollections (   self,
  iEvent 
)
You must call this function at the beginning of the process
function of your child analyzer.

Definition at line 28 of file Analyzer.py.

References core.Analyzer.Analyzer.handles, HTTP.RequestManager.handles, and core.Analyzer.Analyzer.mchandles.

Referenced by core.Analyzer.Analyzer.process(), gen.LHEAnalyzer.LHEAnalyzer.process(), MetAnalyzer.MetAnalyzer.process(), gen.LHEWeightAnalyzer.LHEWeightAnalyzer.process(), core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.process(), gen.HiggsDecayModeAnalyzer.HiggsDecayModeAnalyzer.process(), core.TriggerBitFilter.TriggerBitFilter.process(), TriggerAnalyzer.TriggerAnalyzer.process(), gen.GenHeavyFlavourAnalyzer.GenHeavyFlavourAnalyzer.process(), gen.PDFWeightsAnalyzer.PDFWeightsAnalyzer.process(), core.JSONAnalyzer.JSONAnalyzer.process(), core.SkimAnalyzerCount.SkimAnalyzerCount.process(), AlphaTAnalyzer.AlphaTAnalyzer.process(), JetAnalyzer.JetAnalyzer.process(), core.TriggerBitAnalyzer.TriggerBitAnalyzer.process(), DiLeptonAnalyzer.DiLeptonAnalyzer.process(), core.PileUpAnalyzer.PileUpAnalyzer.process(), objects.VertexAnalyzer.VertexAnalyzer.process(), objects.JetAnalyzer.JetAnalyzer.process(), objects.TauAnalyzer.TauAnalyzer.process(), core.AutoFillTreeProducer.AutoFillTreeProducer.process(), gen.GeneratorAnalyzer.GeneratorAnalyzer.process(), objects.PhotonAnalyzer.PhotonAnalyzer.process(), and objects.LeptonAnalyzer.LeptonAnalyzer.process().

28  def readCollections(self, iEvent ):
29  '''You must call this function at the beginning of the process
30  function of your child analyzer.'''
31  # if not self.beginLoopCalled:
32  # # necessary in case the user calls process to go straight to a given event, before looping
33  # self.beginLoop(setup)
34  for str,handle in six.iteritems(self.handles):
35  handle.Load( iEvent )
36  if self.cfg_comp.isMC:
37  for str,handle in six.iteritems(self.mchandles):
38  handle.Load( iEvent )

Member Data Documentation

core.Analyzer.Analyzer.handles

Definition at line 12 of file Analyzer.py.

Referenced by SimpleMuonAnalyzer.SimpleMuonAnalyzer.declareHandles(), ZEleEleAnalyzer.ZEleEleAnalyzer.declareHandles(), ZMuMuAnalyzer.ZMuMuAnalyzer.declareHandles(), TriggerAnalyzer.TriggerAnalyzer.declareHandles(), MetAnalyzer.MetAnalyzer.declareHandles(), SimpleJetAnalyzer.SimpleJetAnalyzer.declareHandles(), objects.TauAnalyzer.TauAnalyzer.declareHandles(), core.TriggerBitFilter.TriggerBitFilter.declareHandles(), core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.declareHandles(), RazorAnalyzer.RazorAnalyzer.declareHandles(), objects.METAnalyzer.METAnalyzer.declareHandles(), core.TriggerBitAnalyzer.TriggerBitAnalyzer.declareHandles(), AlphaTAnalyzer.AlphaTAnalyzer.declareHandles(), MT2Analyzer.MT2Analyzer.declareHandles(), core.AutoFillTreeProducer.AutoFillTreeProducer.declareHandles(), objects.PhotonAnalyzer.PhotonAnalyzer.declareHandles(), JetAnalyzer.JetAnalyzer.declareHandles(), objects.VertexAnalyzer.VertexAnalyzer.declareHandles(), objects.IsoTrackAnalyzer.IsoTrackAnalyzer.declareHandles(), core.PileUpAnalyzer.PileUpAnalyzer.declareHandles(), objects.LeptonAnalyzer.LeptonAnalyzer.declareHandles(), objects.JetAnalyzer.JetAnalyzer.declareHandles(), core.AutoFillTreeProducer.AutoFillTreeProducer.fillTree(), objects.LeptonAnalyzer.LeptonAnalyzer.makeAllElectrons(), objects.LeptonAnalyzer.LeptonAnalyzer.makeAllMuons(), objects.IsoTrackAnalyzer.IsoTrackAnalyzer.makeIsoTrack(), objects.LeptonAnalyzer.LeptonAnalyzer.makeLeptons(), objects.PhotonAnalyzer.PhotonAnalyzer.makePhotons(), objects.TauAnalyzer.TauAnalyzer.makeTaus(), objects.METAnalyzer.METAnalyzer.makeTkMETs(), SimpleMuonAnalyzer.SimpleMuonAnalyzer.process(), SimpleJetAnalyzer.SimpleJetAnalyzer.process(), MetAnalyzer.MetAnalyzer.process(), core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.process(), core.TriggerBitFilter.TriggerBitFilter.process(), TriggerAnalyzer.TriggerAnalyzer.process(), JetAnalyzer.JetAnalyzer.process(), core.TriggerBitAnalyzer.TriggerBitAnalyzer.process(), DiLeptonAnalyzer.DiLeptonAnalyzer.process(), objects.VertexAnalyzer.VertexAnalyzer.process(), core.PileUpAnalyzer.PileUpAnalyzer.process(), objects.JetAnalyzer.JetAnalyzer.process(), objects.PhotonAnalyzer.PhotonAnalyzer.randomCone(), and core.Analyzer.Analyzer.readCollections().