ATLAS Offline Software
Loading...
Searching...
No Matches
WriteHepMC.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRUTHIO_WRITEHEPMC_H
6#define TRUTHIO_WRITEHEPMC_H
7
10#include <memory>
11
13class WriteHepMC : public GenBase {
14public:
15
16 WriteHepMC(const std::string& name, ISvcLocator* pSvcLocator);
17 StatusCode initialize() override;
18 StatusCode execute() override;
19
20 std::string m_outfile;
22 std::string m_format;
23 std::string m_units;
24
25#ifdef HEPMC3
26 std::unique_ptr<HepMC3::Writer> m_hepmcio;
27 HepMC3::Units::MomentumUnit m_momentumunit{};
28 HepMC3::Units::LengthUnit m_lengthunit{};
29#else
30 std::unique_ptr<HepMC::IO_GenEvent> m_hepmcio;
31 HepMC::Units::MomentumUnit m_momentumunit{};
32 HepMC::Units::LengthUnit m_lengthunit{};
33#endif
34};
35
36#endif
GenBase(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition GenBase.cxx:11
StatusCode execute() override
HepMC::Units::MomentumUnit m_momentumunit
Definition WriteHepMC.h:31
WriteHepMC(const std::string &name, ISvcLocator *pSvcLocator)
std::string m_outfile
Definition WriteHepMC.h:20
int m_precision
Definition WriteHepMC.h:21
StatusCode initialize() override
std::string m_units
Definition WriteHepMC.h:23
HepMC::Units::LengthUnit m_lengthunit
Definition WriteHepMC.h:32
std::string m_format
Definition WriteHepMC.h:22
std::unique_ptr< HepMC::IO_GenEvent > m_hepmcio
Definition WriteHepMC.h:30