ATLAS Offline Software
TruthMetaDataTool.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 /*
3  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
4 */
5 
6 #ifndef XAODTRUTHCNV_TRUTHMETADATATOOL_H
7 #define XAODTRUTHCNV_TRUTHMETADATATOOL_H
8 
9 // System include(s):
10 #include <string>
11 #include <memory>
12 
13 // Gaudi/Athena include(s):
15 #ifndef XAOD_STANDALONE
17 #endif // XAOD_STANDALONE
18 
19 // EDM include(s):
22 
23 namespace SG {
24  typedef std::string SourceID;
25 }
26 
27 namespace xAODMaker {
28 
35 #ifndef XAOD_STANDALONE
36  , public virtual ::IMetaDataTool
37 #endif // XAOD_STANDALONE
38  {
39 
42 
43  public:
45  TruthMetaDataTool( const std::string& name = "TruthMetaDataTool" );
46 
48  virtual StatusCode initialize();
49 
50  protected:
53 
56  virtual StatusCode beginInputFile();
57 
58  virtual StatusCode endInputFile();
59 
61  virtual StatusCode metaDataStop();
62 
65 
67  virtual StatusCode endInputFile(const SG::SourceID&) {return endInputFile();}
68 
70  virtual StatusCode metaDataStop(const SG::SourceID&) {return metaDataStop();}
71 
73 
74  private:
77 
79  std::string m_inputKey;
81  std::string m_outputKey;
82 
84 
87 
89  std::unique_ptr< xAOD::TruthMetaDataContainer > m_truthMeta;
91  std::unique_ptr< xAOD::TruthMetaDataAuxContainer > m_truthMetaAux;
92 
94 
95  }; // class TruthMetaDataTool
96 
97 } // namespace xAODMaker
98 
99 #endif // XAODTRUTHCNV_TRUTHMETADATATOOL_H
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAODMaker::TruthMetaDataTool::beginInputFile
virtual StatusCode beginInputFile()
Function collecting the configuration metadata from the input file.
Definition: TruthMetaDataTool.cxx:45
IMetaDataTool.h
This file contains the class definition for the IMetaDataTool class.
xAODMaker::TruthMetaDataTool::m_truthMetaAux
std::unique_ptr< xAOD::TruthMetaDataAuxContainer > m_truthMetaAux
The merged trigger menu auxiliary container.
Definition: TruthMetaDataTool.h:91
xAODMaker
Definition: StoreGateSvc.h:72
xAODMaker::TruthMetaDataTool::beginInputFile
virtual StatusCode beginInputFile(const SG::SourceID &)
Function collecting the metadata from a new input file.
Definition: TruthMetaDataTool.h:64
xAODMaker::TruthMetaDataTool::m_truthMeta
std::unique_ptr< xAOD::TruthMetaDataContainer > m_truthMeta
The merged trigger menu container.
Definition: TruthMetaDataTool.h:89
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TruthMetaDataAuxContainer.h
ASG_TOOL_CLASS0
#define ASG_TOOL_CLASS0(CLASSNAME)
Definition: AsgToolMacros.h:62
xAODMaker::TruthMetaDataTool::initialize
virtual StatusCode initialize()
Function initialising the tool.
Definition: TruthMetaDataTool.cxx:31
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
xAODMaker::TruthMetaDataTool::m_outputKey
std::string m_outputKey
The key of the truth metadata for the output file.
Definition: TruthMetaDataTool.h:81
xAODMaker::TruthMetaDataTool
Tool taking care of copying the truth metadata from file to file.
Definition: TruthMetaDataTool.h:38
asg::AsgMetadataTool
Base class for dual-use tools that provide file metadata access.
Definition: AsgMetadataTool.h:48
SG::SourceID
std::string SourceID
Definition: AthenaKernel/AthenaKernel/SourceID.h:25
AsgMetadataTool.h
xAODMaker::TruthMetaDataTool::m_inputKey
std::string m_inputKey
The key of the truth metadata in the input file.
Definition: TruthMetaDataTool.h:79
xAODMaker::TruthMetaDataTool::metaDataStop
virtual StatusCode metaDataStop(const SG::SourceID &)
Function writing the collected metadata to the output.
Definition: TruthMetaDataTool.h:70
IMetaDataTool
This class provides the interface for MetaDataTools.
Definition: IMetaDataTool.h:21
xAODMaker::TruthMetaDataTool::endInputFile
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
Definition: TruthMetaDataTool.cxx:97
TruthMetaDataContainer.h
xAODMaker::TruthMetaDataTool::metaDataStop
virtual StatusCode metaDataStop()
Function writing out the collected metadata.
Definition: TruthMetaDataTool.cxx:101
xAODMaker::TruthMetaDataTool::endInputFile
virtual StatusCode endInputFile(const SG::SourceID &)
Function collecting the metadata from a new input file.
Definition: TruthMetaDataTool.h:67
xAODMaker::TruthMetaDataTool::TruthMetaDataTool
TruthMetaDataTool(const std::string &name="TruthMetaDataTool")
Declare the correct constructor for Athena.
Definition: TruthMetaDataTool.cxx:19