ATLAS Offline Software
Loading...
Searching...
No Matches
RootOutputStreamTool.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
7// RootOutputStreamTool.h
8// Header file for class Athena::RootOutputStreamTool
9// Author Peter van Gemmeren <gemmeren@anl.gov>
11#ifndef ATHENAROOTCOMPS_ROOTOUTPUTSTREAMTOOL_H
12#define ATHENAROOTCOMPS_ROOTOUTPUTSTREAMTOOL_H 1
13
18
20
21// fwk
22#include "GaudiKernel/ServiceHandle.h"
24
25class StoreGateSvc;
26class IConversionSvc;
27class IClassIDSvc;
28
29namespace Athena {
33class RootOutputStreamTool : public extends<::AthAlgTool, ::IAthenaOutputStreamTool> {
34public:
36 RootOutputStreamTool(const std::string& type, const std::string& name, const IInterface* parent);
37
39 virtual ~RootOutputStreamTool();
40
42 virtual StatusCode initialize() override;
43 virtual StatusCode finalize() override;
44
48 virtual StatusCode connectServices(const std::string& dataStore, const std::string& cnvSvc, bool extendProvenenceRecord) override;
49
53 virtual StatusCode connectOutput(const std::string& outputName) override;
54
57 virtual StatusCode commitOutput(bool doCommit = false) override;
58
61 virtual StatusCode finalizeOutput() override;
62
66 virtual StatusCode streamObjects(const IAthenaOutputStreamTool::TypeKeyPairs& typeKeys, const std::string& outputName = "") override;
67
73 virtual StatusCode streamObjects(const IAthenaOutputStreamTool::DataObjectVec& dataObjects, const std::string& outputName = "") override;
74
75 virtual StatusCode getInputItemList(SG::IFolder* m_p2BWrittenFromTool) override;
76
77private:
84
86 std::string m_outputName;
87
89 std::string m_treeName;
90};
91
92}//> end namespace Athena
93
94#endif
Interface to an output stream tool.
virtual StatusCode getInputItemList(SG::IFolder *m_p2BWrittenFromTool) override
ServiceHandle< ::IClassIDSvc > m_clidSvc
ServiceHandle to clid service.
virtual StatusCode commitOutput(bool doCommit=false) override
Commit the output stream after having streamed out objects Must commitOutput AFTER streaming.
virtual StatusCode streamObjects(const IAthenaOutputStreamTool::DataObjectVec &dataObjects, const std::string &outputName="") override
Stream out a vector of objects Must convert to DataObject, e.g.
virtual StatusCode finalizeOutput() override
Finalize the output stream after the last commit, e.g.
ServiceHandle< ::StoreGateSvc > m_storeSvc
ServiceHandle to the data store service.
virtual StatusCode connectOutput(const std::string &outputName) override
Connect to the output stream Must connectOutput BEFORE streaming Only specify "outputName" if one wan...
virtual StatusCode finalize() override
virtual StatusCode initialize() override
Gaudi AlgTool Interface method implementations:
virtual StatusCode streamObjects(const IAthenaOutputStreamTool::TypeKeyPairs &typeKeys, const std::string &outputName="") override
Stream out objects.
std::string m_outputName
Name of the output file.
ServiceHandle< ::IConversionSvc > m_conversionSvc
ServiceHandle to the data conversion service.
RootOutputStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard AlgTool Constructor.
virtual ~RootOutputStreamTool()
Destructor.
std::string m_treeName
Name of the output tuple.
virtual StatusCode connectServices(const std::string &dataStore, const std::string &cnvSvc, bool extendProvenenceRecord) override
Specify which data store and conversion service to use and whether to extend provenence Only use if o...
std::vector< DataObject * > DataObjectVec
Stream out a vector of objects Must convert to DataObject, e.g.
std::vector< TypeKeyPair > TypeKeyPairs
a run-time configurable list of data objects
Definition SGIFolder.h:21
The Athena Transient Store API.
Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc....