ATLAS Offline Software
RootNtupleOutputMetadataTool.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // RootNtupleOutputMetadataTool.h
8 // Header file for class Athena::RootNtupleOutputMetadataTool
9 // Author Peter van Gemmeren <gemmeren@anl.gov>
10 // Author: S.Binet<binet@cern.ch>
12 #ifndef ATHENAROOTCOMPS_ROOTNTUPLEOUTPUTMETADATATOOL_H
13 #define ATHENAROOTCOMPS_ROOTNTUPLEOUTPUTMETADATATOOL_H 1
14 
21 // fwk
22 #include "GaudiKernel/ServiceHandle.h"
23 #include "GaudiKernel/IIncidentListener.h"
26 
27 class StoreGateSvc;
28 class IConversionSvc;
29 class IClassIDSvc;
30 
31 namespace Athena {
36  : public extends<::AthAlgTool, IIncidentListener, ::IAthenaOutputTool>
37 {
38 
39 public:
41  RootNtupleOutputMetadataTool(const std::string& type,
42  const std::string& name,
43  const IInterface* parent);
44 
47 
49  virtual StatusCode initialize() override;
50  virtual StatusCode finalize() override;
51  virtual StatusCode stop() override;
53  virtual StatusCode postInitialize() override;
54  virtual StatusCode preFinalize() override;
55  virtual StatusCode preExecute() override;
56  virtual StatusCode preStream() override;
57  virtual StatusCode postExecute() override;
59  virtual void handle(const Incident& incident) override;
60 
66 
67 private:
69  RootNtupleOutputMetadataTool(); //< not implemented
72 
73  StatusCode addMetadata(const std::string& key, const void* obj, const std::type_info& ti);
74 
75 private:
81 
83  std::string m_streamName;
84  std::set<std::string> m_treesWritten;
85 
87  std::string m_outputName;
88 
90  std::string m_tupleName;
91 
93 };
94 
95 }//> end namespace Athena
96 
97 #endif
IAthenaOutputTool.h
This file contains the class definition for the IAthenaOutputTool class.
Athena::RootNtupleOutputMetadataTool::postExecute
virtual StatusCode postExecute() override
Definition: RootNtupleOutputMetadataTool.cxx:150
Athena::RootNtupleOutputMetadataTool
This is the AthenaRoot version of AthenaServices/AthenaOutputStreamTool.
Definition: RootNtupleOutputMetadataTool.h:37
Athena::RootNtupleOutputMetadataTool::m_tupleName
std::string m_tupleName
Name of the output tuple.
Definition: RootNtupleOutputMetadataTool.h:90
Athena::RootNtupleOutputMetadataTool::~RootNtupleOutputMetadataTool
virtual ~RootNtupleOutputMetadataTool()
Destructor.
Definition: RootNtupleOutputMetadataTool.cxx:66
Athena::RootNtupleOutputMetadataTool::operator=
RootNtupleOutputMetadataTool & operator=(const RootNtupleOutputMetadataTool &)
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
Athena::RootNtupleOutputMetadataTool::RootNtupleOutputMetadataTool
RootNtupleOutputMetadataTool(const RootNtupleOutputMetadataTool &)
Athena
Some weak symbol referencing magic...
Definition: AthLegacySequence.h:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Athena::RootNtupleOutputMetadataTool::addMetadata
StatusCode addMetadata(const std::string &key, const void *obj, const std::type_info &ti)
Definition: RootNtupleOutputMetadataTool.cxx:279
AthAlgTool.h
Athena::RootNtupleOutputMetadataTool::RootNtupleOutputMetadataTool
RootNtupleOutputMetadataTool()
Default constructor:
Athena::RootNtupleOutputMetadataTool::m_imetaStore
ServiceHandle< StoreGateSvc > m_imetaStore
ServiceHandle to the data store service.
Definition: RootNtupleOutputMetadataTool.h:77
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Athena::RootNtupleOutputMetadataTool::preStream
virtual StatusCode preStream() override
Definition: RootNtupleOutputMetadataTool.cxx:149
Athena::RootNtupleOutputMetadataTool::m_streamName
std::string m_streamName
Name of the stream name.
Definition: RootNtupleOutputMetadataTool.h:83
Athena::RootNtupleOutputMetadataTool::stop
virtual StatusCode stop() override
Definition: RootNtupleOutputMetadataTool.cxx:113
Athena::RootNtupleOutputMetadataTool::copyMetadata
StatusCode copyMetadata()
Connect to the output stream Must writeMetadata BEFORE streaming Only specify "outputName" if one wan...
Definition: RootNtupleOutputMetadataTool.cxx:239
Athena::RootNtupleOutputMetadataTool::preExecute
virtual StatusCode preExecute() override
Definition: RootNtupleOutputMetadataTool.cxx:148
Athena::RootNtupleOutputMetadataTool::m_metaWritten
bool m_metaWritten
Definition: RootNtupleOutputMetadataTool.h:92
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Athena::RootNtupleOutputMetadataTool::m_ometaStore
ServiceHandle< StoreGateSvc > m_ometaStore
Definition: RootNtupleOutputMetadataTool.h:78
Athena::RootNtupleOutputMetadataTool::m_treesWritten
std::set< std::string > m_treesWritten
Definition: RootNtupleOutputMetadataTool.h:84
Athena::RootNtupleOutputMetadataTool::m_outputName
std::string m_outputName
Name of the output name.
Definition: RootNtupleOutputMetadataTool.h:87
Athena::RootNtupleOutputMetadataTool::preFinalize
virtual StatusCode preFinalize() override
Definition: RootNtupleOutputMetadataTool.cxx:147
Athena::RootNtupleOutputMetadataTool::writeMetadata
StatusCode writeMetadata()
Definition: RootNtupleOutputMetadataTool.cxx:177
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Athena::RootNtupleOutputMetadataTool::m_clidSvc
ServiceHandle< IClassIDSvc > m_clidSvc
ServiceHandle to clid service.
Definition: RootNtupleOutputMetadataTool.h:80
Athena::RootNtupleOutputMetadataTool::finalize
virtual StatusCode finalize() override
Definition: RootNtupleOutputMetadataTool.cxx:126
Athena::RootNtupleOutputMetadataTool::postInitialize
virtual StatusCode postInitialize() override
AthenaOutputTool Interface method implementations:
Definition: RootNtupleOutputMetadataTool.cxx:146
python.PyAthena.obj
obj
Definition: PyAthena.py:132
Athena::RootNtupleOutputMetadataTool::initialize
virtual StatusCode initialize() override
Gaudi AlgTool Interface method implementations:
Definition: RootNtupleOutputMetadataTool.cxx:70
Athena::RootNtupleOutputMetadataTool::handle
virtual void handle(const Incident &incident) override
Incident service handle listening for Begin/End InputFile incidents.
Definition: RootNtupleOutputMetadataTool.cxx:153
ServiceHandle< StoreGateSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37