ATLAS Offline Software
McAodWriterTool.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // McAodWriterTool.h
8 // Header file for class McAodWriterTool
9 // Author: S.Binet<binet@cern.ch>
11 #ifndef MCPARTICLETOOLS_MCAODWRITERTOOL_H
12 #define MCPARTICLETOOLS_MCAODWRITERTOOL_H
13 
14 // STL includes
15 #include <string>
16 #include <fstream>
17 
18 // FrameWork includes
19 #include "GaudiKernel/ServiceHandle.h"
21 
22 // McParticleKernel includes
24 
25 // Forward declaration
27 
28 class McAodWriterTool : virtual public IIOMcAodTool,
29  public AthAlgTool
30 {
31 
33  // Public methods:
35  public:
36 
37  // Copy constructor:
38 
40  McAodWriterTool( const std::string& type,
41  const std::string& name,
42  const IInterface* parent );
43 
45  virtual ~McAodWriterTool();
46 
47  // Athena algorithm's Hooks
51 
53  // Const methods:
55 
57  // Non-const methods:
59 
62  StatusCode write( const TruthParticleContainer* mcParts );
63 
65  // Protected methods:
67  protected:
68 
72 
76  void setupBackend( Gaudi::Details::PropertyBase& ioBackendURL );
77 
79  // Protected data:
81  protected:
82 
88  StringProperty m_ioBackendURL;
89 
92  StringProperty m_truthParticlesName;
93 
96  std::ofstream* m_ioBackend;
97 };
98 
101 
105 
106 #endif //> MCPARTICLETOOLS_MCAODWRITERTOOL_H
McAodWriterTool::m_ioBackend
std::ofstream * m_ioBackend
Abstract base class for the back-end.
Definition: McAodWriterTool.h:96
McAodWriterTool::initialize
StatusCode initialize()
Definition: McAodWriterTool.cxx:79
TruthParticleContainer
Definition: PhysicsAnalysis/TruthParticleID/McParticleEvent/McParticleEvent/TruthParticleContainer.h:42
McAodWriterTool::setupBackend
void setupBackend(Gaudi::Details::PropertyBase &ioBackendURL)
Method to configure the back-end to write out the TruthParticleContainer.
Definition: McAodWriterTool.cxx:159
McAodWriterTool::~McAodWriterTool
virtual ~McAodWriterTool()
Destructor:
Definition: McAodWriterTool.cxx:67
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
McAodWriterTool::write
StatusCode write(const TruthParticleContainer *mcParts)
Process the TruthParticleContainer through the I/O backend.
Definition: McAodWriterTool.cxx:123
McAodWriterTool::finalize
StatusCode finalize()
Definition: McAodWriterTool.cxx:96
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
IIOMcAodTool.h
IIOMcAodTool
Definition: IIOMcAodTool.h:25
McAodWriterTool::m_truthParticlesName
StringProperty m_truthParticlesName
Location of the TruthParticleContainer to be written out.
Definition: McAodWriterTool.h:92
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
McAodWriterTool::McAodWriterTool
McAodWriterTool()
Default constructor:
AthAlgTool
Definition: AthAlgTool.h:26
McAodWriterTool::m_ioBackendURL
StringProperty m_ioBackendURL
URL of the I/O back-end (only "ASCII" for now...) glued with the name of the output file name.
Definition: McAodWriterTool.h:88
McAodWriterTool::execute
StatusCode execute()
Definition: McAodWriterTool.cxx:105
McAodWriterTool
Definition: McAodWriterTool.h:30