ATLAS Offline Software
Loading...
Searching...
No Matches
McAodWriterTool.h
Go to the documentation of this file.
1
2
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
28class 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
48 StatusCode initialize();
49 StatusCode execute();
50 StatusCode finalize();
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
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
McAodWriterTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
std::ofstream * m_ioBackend
Abstract base class for the back-end.
StatusCode finalize()
StatusCode initialize()
StatusCode write(const TruthParticleContainer *mcParts)
Process the TruthParticleContainer through the I/O backend.
void setupBackend(Gaudi::Details::PropertyBase &ioBackendURL)
Method to configure the back-end to write out the TruthParticleContainer.
virtual ~McAodWriterTool()
Destructor:
StringProperty m_ioBackendURL
URL of the I/O back-end (only "ASCII" for now...) glued with the name of the output file name.
McAodWriterTool()
Default constructor:
StringProperty m_truthParticlesName
Location of the TruthParticleContainer to be written out.