ATLAS Offline Software
RootOutputStreamTool.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2018 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 
20 
21 // fwk
22 #include "GaudiKernel/ServiceHandle.h"
24 
25 class StoreGateSvc;
26 class IConversionSvc;
27 class IClassIDSvc;
28 
29 namespace Athena {
34 public:
36  RootOutputStreamTool(const std::string& type, const std::string& name, const IInterface* parent);
37 
39  virtual ~RootOutputStreamTool();
40 
44 
48  StatusCode connectServices(const std::string& dataStore, const std::string& cnvSvc, bool extendProvenenceRecord);
49 
53  StatusCode connectOutput(const std::string& outputName);
54 
57  StatusCode commitOutput(bool doCommit = false);
58 
62 
66  StatusCode streamObjects(const IAthenaOutputStreamTool::TypeKeyPairs& typeKeys, const std::string& outputName = "");
67 
73  StatusCode streamObjects(const IAthenaOutputStreamTool::DataObjectVec& dataObjects, const std::string& outputName = "");
74 
78 
79  StatusCode getInputItemList(SG::IFolder* m_p2BWrittenFromTool);
80 
81 private:
83  RootOutputStreamTool(); //< not implemented
84  RootOutputStreamTool(const RootOutputStreamTool&); //< not implemented
85  RootOutputStreamTool& operator=(const RootOutputStreamTool&); //< not implemented
86 
87 private:
94 
96  std::string m_outputName;
97 
99  std::string m_treeName;
100 };
101 
102 }//> end namespace Athena
103 
104 #endif
Athena::RootOutputStreamTool::~RootOutputStreamTool
virtual ~RootOutputStreamTool()
Destructor.
Definition: RootOutputStreamTool.cxx:46
IAthenaOutputStreamTool::TypeKeyPairs
std::vector< TypeKeyPair > TypeKeyPairs
Definition: IAthenaOutputStreamTool.h:99
Athena::RootOutputStreamTool
This is the AthenaRoot version of AthenaServices/AthenaOutputStreamTool.
Definition: RootOutputStreamTool.h:33
Athena::RootOutputStreamTool::finalizeOutput
StatusCode finalizeOutput()
Finalize the output stream after the last commit, e.g.
Definition: RootOutputStreamTool.cxx:129
Athena::RootOutputStreamTool::initialize
StatusCode initialize()
Gaudi AlgTool Interface method implementations:
Definition: RootOutputStreamTool.cxx:49
Athena::RootOutputStreamTool::finalize
StatusCode finalize()
Definition: RootOutputStreamTool.cxx:62
IAthenaOutputStreamTool
This is a tool that allows streaming out of DataObjects. This has been factorized out from AthenaOutp...
Definition: IAthenaOutputStreamTool.h:70
Athena::RootOutputStreamTool::m_outputName
std::string m_outputName
Name of the output file.
Definition: RootOutputStreamTool.h:96
Athena::RootOutputStreamTool::m_storeSvc
ServiceHandle< ::StoreGateSvc > m_storeSvc
ServiceHandle to the data store service.
Definition: RootOutputStreamTool.h:89
SG::IFolder
a run-time configurable list of data objects
Definition: SGIFolder.h:25
Athena::RootOutputStreamTool::getInputItemList
StatusCode getInputItemList(SG::IFolder *m_p2BWrittenFromTool)
Get ItemList from the OutputStreamTool (e.g. all input objects)
Definition: RootOutputStreamTool.cxx:228
IAthenaOutputStreamTool.h
Interface to an output stream tool.
Athena::RootOutputStreamTool::RootOutputStreamTool
RootOutputStreamTool(const RootOutputStreamTool &)
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
Athena::RootOutputStreamTool::operator=
RootOutputStreamTool & operator=(const RootOutputStreamTool &)
Athena::RootOutputStreamTool::m_clidSvc
ServiceHandle< ::IClassIDSvc > m_clidSvc
ServiceHandle to clid service.
Definition: RootOutputStreamTool.h:93
Athena
Some weak symbol referencing magic...
Definition: AthLegacySequence.h:21
Athena::RootOutputStreamTool::fillObjectRefs
StatusCode fillObjectRefs(const IAthenaOutputStreamTool::DataObjectVec &dataObjects)
Fill refs of an object - done as second iteration over objects, after streamObject.
Definition: RootOutputStreamTool.cxx:223
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
Athena::RootOutputStreamTool::connectServices
StatusCode connectServices(const std::string &dataStore, const std::string &cnvSvc, bool extendProvenenceRecord)
Specify which data store and conversion service to use and whether to extend provenence Only use if o...
Definition: RootOutputStreamTool.cxx:80
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Athena::RootOutputStreamTool::RootOutputStreamTool
RootOutputStreamTool()
Default constructor:
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
lumiFormat.outputName
string outputName
Definition: lumiFormat.py:71
Athena::RootOutputStreamTool::commitOutput
StatusCode commitOutput(bool doCommit=false)
Commit the output stream after having streamed out objects Must commitOutput AFTER streaming.
Definition: RootOutputStreamTool.cxx:112
Athena::RootOutputStreamTool::streamObjects
StatusCode streamObjects(const IAthenaOutputStreamTool::TypeKeyPairs &typeKeys, const std::string &outputName="")
Stream out objects.
Definition: RootOutputStreamTool.cxx:134
IAthenaOutputStreamTool::DataObjectVec
std::vector< DataObject * > DataObjectVec
Stream out a vector of objects Must convert to DataObject, e.g.
Definition: IAthenaOutputStreamTool.h:107
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Athena::RootOutputStreamTool::m_treeName
std::string m_treeName
Name of the output tuple.
Definition: RootOutputStreamTool.h:99
Athena::RootOutputStreamTool::m_conversionSvc
ServiceHandle< ::IConversionSvc > m_conversionSvc
ServiceHandle to the data conversion service.
Definition: RootOutputStreamTool.h:91
Athena::RootOutputStreamTool::connectOutput
StatusCode connectOutput(const std::string &outputName)
Connect to the output stream Must connectOutput BEFORE streaming Only specify "outputName" if one wan...
Definition: RootOutputStreamTool.cxx:94
AthAlgTool
Definition: AthAlgTool.h:26
ServiceHandle
Definition: ClusterMakerTool.h:37