11#include "EventInfo/EventInfo.h"
27 return StatusCode::FAILURE;
42 return StatusCode::SUCCESS;
50 if (
ev.event_number()==1){
60 ATH_MSG_WARNING(
"No McEventInfo found in SG - no event numbers available");
63 event_number = og_mc_ei->event_ID()->event_number();
67 event_number = mc_ei->eventNumber();
69 ev.set_event_number(event_number);
72 return StatusCode::SUCCESS;
#define ATH_MSG_WARNING(x)
#define CHECK(...)
Evaluate an expression and check for errors.
std::shared_ptr< HepMC3::Writer > writer
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Property holding a SG store/key/clid from which a ReadHandle is made.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
virtual StatusCode initialize() override
const HepMC::GenEvent * event_const(const EventContext &ctx) const
Access the current signal event (const).
GenBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
StatusCode execute(const EventContext &ctx) override
Execute method.
WriteHepMC(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize() override
HepMC3::Units::MomentumUnit m_momentumunit
std::shared_ptr< HepMC3::Writer > m_hepmcio
HepMC3::Units::LengthUnit m_lengthunit