ATLAS Offline Software
Loading...
Searching...
No Matches
RootNtupleOutputMetadataTool.h
Go to the documentation of this file.
1
2
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
19
20
21// fwk
22#include "GaudiKernel/ServiceHandle.h"
23#include "GaudiKernel/IIncidentListener.h"
26
27class StoreGateSvc;
28class IConversionSvc;
29class IClassIDSvc;
30
31namespace Athena {
36 : public extends<::AthAlgTool, IIncidentListener, ::IAthenaOutputTool>
37{
38
39public:
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
64 StatusCode copyMetadata();
65 StatusCode writeMetadata();
66
67private:
69 RootNtupleOutputMetadataTool(); //< not implemented
72
73 StatusCode addMetadata(const std::string& key, const void* obj, const std::type_info& ti);
74
75private:
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
This file contains the class definition for the IAthenaOutputTool class.
virtual StatusCode postInitialize() override
AthenaOutputTool Interface method implementations:
ServiceHandle< StoreGateSvc > m_imetaStore
ServiceHandle to the data store service.
virtual void handle(const Incident &incident) override
Incident service handle listening for Begin/End InputFile incidents.
RootNtupleOutputMetadataTool(const RootNtupleOutputMetadataTool &)
RootNtupleOutputMetadataTool & operator=(const RootNtupleOutputMetadataTool &)
std::string m_tupleName
Name of the output tuple.
RootNtupleOutputMetadataTool()
Default constructor:
StatusCode addMetadata(const std::string &key, const void *obj, const std::type_info &ti)
virtual StatusCode initialize() override
Gaudi AlgTool Interface method implementations:
StatusCode copyMetadata()
Connect to the output stream Must writeMetadata BEFORE streaming Only specify "outputName" if one wan...
std::string m_streamName
Name of the stream name.
RootNtupleOutputMetadataTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard AlgTool Constructor.
std::string m_outputName
Name of the output name.
ServiceHandle< IClassIDSvc > m_clidSvc
ServiceHandle to clid service.
The Athena Transient Store API.
Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc....