ATLAS Offline Software
EvgenAnalysisAlg.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaPython import PyAthena
4 
5 
7  """\
8  Base class for implementing event generator interfaces in Python.
9  Author: Andy Buckley
10  """
11 
12  def __init__(self, name="EvgenAnalysisAlg"):
13  super(EvgenAnalysisAlg, self).__init__(name=name)
14  self.McEventKey = "GEN_EVENT"
15 
16  def events(self):
17  "Get the current MC event collection"
18  return self.evtStore[self.McEventKey]
19 
20  def event(self):
21  "Get the first event in the collection"
22  return self.events()[0]
23 
24  # TODO: add histo helpers cf. C++ GenAnalysisAlg
python.EvgenAnalysisAlg.EvgenAnalysisAlg.McEventKey
McEventKey
Definition: EvgenAnalysisAlg.py:14
python.EvgenAnalysisAlg.EvgenAnalysisAlg.event
def event(self)
Definition: EvgenAnalysisAlg.py:20
python.EvgenAnalysisAlg.EvgenAnalysisAlg
Definition: EvgenAnalysisAlg.py:6
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
python.EvgenAnalysisAlg.EvgenAnalysisAlg.__init__
def __init__(self, name="EvgenAnalysisAlg")
Definition: EvgenAnalysisAlg.py:12
python.EvgenAnalysisAlg.EvgenAnalysisAlg.events
def events(self)
Definition: EvgenAnalysisAlg.py:16
PyAthena::Alg
Definition: PyAthenaAlg.h:33