ATLAS Offline Software
Loading...
Searching...
No Matches
HepMcReaderTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5// HepMcReaderTool.h
6// Header file for class HepMcReaderTool
7// Author: S.Binet<binet@cern.ch>
9#ifndef MCPARTICLETOOLS_HEPMCREADERTOOL_H
10#define MCPARTICLETOOLS_HEPMCREADERTOOL_H 1
11
12// STL includes
13#include <string>
14
15// FrameWork includes
16#include "GaudiKernel/ServiceHandle.h"
18
19// McParticleKernel includes
21
22// Forward declaration
25
26
27class HepMcReaderTool : public extends<AthAlgTool, IIOHepMcTool>
28{
29
30 public:
31
33 HepMcReaderTool( const std::string& type, const std::string& name, const IInterface* parent );
34
36 virtual ~HepMcReaderTool();
37
38 // Athena algorithm's Hooks
39 StatusCode initialize();
40 StatusCode execute();
41 StatusCode finalize();
42
45 StatusCode read( HepMC::GenEvent* evt );
46
47 protected:
48
52
56 void setupFrontend( Gaudi::Details::PropertyBase& ioFrontendURL );
57
58 protected:
59
65 StringProperty m_ioFrontendURL;
66
69 StringProperty m_mcEventsOutputName;
70
73 std::shared_ptr<HepMC3::Reader> m_ioFrontend{nullptr};
74
75};
76#endif //> MCPARTICLETOOLS_HEPMCREADERTOOL_H
void setupFrontend(Gaudi::Details::PropertyBase &ioFrontendURL)
Method to configure the front-end to read out the HepMC::GenEvent.
StatusCode initialize()
Athena Algorithm's Hooks.
StringProperty m_mcEventsOutputName
Location of the McEventCollection to be read out.
StatusCode read(HepMC::GenEvent *evt)
Process the HepMC::GenEvent through the I/O frontend.
std::shared_ptr< HepMC3::Reader > m_ioFrontend
Abstract base class for the back-end.
StringProperty m_ioFrontendURL
URL of the I/O front-end (only "ASCII" for now...) glued with the name of the input file name.
StatusCode finalize()
StatusCode execute()
HepMcReaderTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
virtual ~HepMcReaderTool()
Destructor:
HepMcReaderTool()
Default constructor:
HepMC3::GenEvent GenEvent
Definition GenEvent.h:39