|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "GaudiKernel/DataSvc.h"
32 msg(MSG::ERROR) <<
"Could not find StoreGateSvc" <<
endmsg;
43 return StatusCode::SUCCESS;
59 msg(MSG::ERROR) <<
"Could not record McEventCollection" <<
endmsg;
64 HepMC3::GenEvent*
evt =
new HepMC3::GenEvent();
72 const auto cs =
evt->cross_section();
90 HepMC::GenCrossSection* cs=
evt->cross_section();
93 xs=cs->cross_section();
99 return StatusCode::SUCCESS;
106 return StatusCode::SUCCESS;
StatusCode record(T *p2BRegistered, const TKEY &key)
Record an object with a key.
bool contains(const TKEY &key) const
Look up a keyed object in TDS (compare also tryRetrieve) returns false if object not available in TDS...
HepMCReadFromFile(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::unique_ptr< HepMC::IO_GenEvent > m_hepmcio
std::string m_mcEventKey
StoreGate key for the MC event collection (defaults to GEN_EVENT)
bool msgLvl(const MSG::Level lvl) const
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
Base class for common behaviour of MC truth algorithms.
::StatusCode StatusCode
StatusCode definition for legacy code.
#define CHECK(...)
Evaluate an expression and check for errors.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
virtual StatusCode initialize() override