3from AthenaPython
import PyAthena
4from AthenaPython.PyAthena
import StatusCode
10 Base class for implementing event generator interfaces in Python.
15 super(EvgenAlg, self).
__init__(name=name)
20 return StatusCode.Success
23 return StatusCode.Success
26 return StatusCode.Success
30 self.
msg.
debug(
"Initializing [%s]", self.getName())
36 from AthenaPython.PyAthena
import McEventCollection
38 from AthenaPython.PyAthena
import HepMC3
as HepMC
40 from AthenaPython.PyAthena
import HepMC
as HepMC
41 self.
msg.
debug(
"Executing [%s]", self.getName())
52 ROOT.SetOwnership(mcevts,
False)
59 if mcevts.size() == 0:
60 evt = HepMC.GenEvent()
64 ROOT.SetOwnership(evt,
False)
68 PyAthena.HepMC.fillBarcodesAttribute(evt)
ServiceHandle< StoreGateSvc > & evtStore()
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
virtual StatusCode execute() override
virtual StatusCode finalize() override
virtual StatusCode initialize() override
__init__(self, name="EvgenAlg")
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring