ATLAS Offline Software
Loading...
Searching...
No Matches
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
23namespace SG {
24 typedef std::string SourceID;
25}
26
27namespace 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
64 virtual StatusCode beginInputFile(const SG::SourceID&) {return beginInputFile();}
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
#define ASG_TOOL_CLASS0(CLASSNAME)
This file contains the class definition for the IMetaDataTool class.
This class provides the interface for MetaDataTools.
Base class for dual-use tools that provide file metadata access.
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
std::unique_ptr< xAOD::TruthMetaDataAuxContainer > m_truthMetaAux
The merged trigger menu auxiliary container.
virtual StatusCode initialize()
Function initialising the tool.
TruthMetaDataTool(const std::string &name="TruthMetaDataTool")
Declare the correct constructor for Athena.
std::unique_ptr< xAOD::TruthMetaDataContainer > m_truthMeta
The merged trigger menu container.
virtual StatusCode endInputFile(const SG::SourceID &)
Function collecting the metadata from a new input file.
virtual StatusCode beginInputFile()
Function collecting the configuration metadata from the input file.
virtual StatusCode beginInputFile(const SG::SourceID &)
Function collecting the metadata from a new input file.
std::string m_outputKey
The key of the truth metadata for the output file.
std::string m_inputKey
The key of the truth metadata in the input file.
virtual StatusCode metaDataStop()
Function writing out the collected metadata.
virtual StatusCode metaDataStop(const SG::SourceID &)
Function writing the collected metadata to the output.
Forward declaration.