ATLAS Offline Software
IAthenaOutputStreamTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ATHENAKERNEL_IATHENAOUTPUTSTREAMTOOL_H
6 # define ATHENAKERNEL_IATHENAOUTPUTSTREAMTOOL_H
7 
17 // Gaudi
18 #include "GaudiKernel/IAlgTool.h"
19 
20 #include <string>
21 #include <vector>
22 
23 
24 class DataObject;
25 namespace SG {
26  class IFolder;
27 }
28 
68 class IAthenaOutputStreamTool : virtual public IAlgTool
69 {
70 
71 public:
74 
78  virtual StatusCode connectServices(const std::string& dataStore,
79  const std::string& cnvSvc,
80  bool extendProvenenceRecord = false) = 0;
81 
85  virtual StatusCode connectOutput(const std::string& outputName = "") = 0;
86 
89  virtual StatusCode commitOutput(bool doCommit = false) = 0;
90 
93  virtual StatusCode finalizeOutput() = 0;
94 
95 
99  typedef std::pair<std::string, std::string> TypeKeyPair;
100  typedef std::vector< TypeKeyPair > TypeKeyPairs;
101  virtual StatusCode streamObjects(const TypeKeyPairs& typeKeys, const std::string& outputName = "") = 0;
102 
108  typedef std::vector< DataObject* > DataObjectVec;
109  virtual StatusCode streamObjects(const DataObjectVec& dataObjects, const std::string& outputName = "") = 0;
110 
112  virtual StatusCode getInputItemList(SG::IFolder* m_p2BWrittenFromTool) = 0;
113 
114 };
115 
116 #endif // ATHENAKERNEL_IATHENAOUTPUTSTREAMTOOL_H
IAthenaOutputStreamTool::TypeKeyPairs
std::vector< TypeKeyPair > TypeKeyPairs
Definition: IAthenaOutputStreamTool.h:100
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
IAthenaOutputStreamTool::streamObjects
virtual StatusCode streamObjects(const DataObjectVec &dataObjects, const std::string &outputName="")=0
IAthenaOutputStreamTool
This is a tool that allows streaming out of DataObjects. This has been factorized out from AthenaOutp...
Definition: IAthenaOutputStreamTool.h:69
SG::IFolder
a run-time configurable list of data objects
Definition: SGIFolder.h:24
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IAthenaOutputStreamTool::connectOutput
virtual StatusCode connectOutput(const std::string &outputName="")=0
Connect to the output stream Must connectOutput BEFORE streaming Only specify "outputName" if one wan...
IAthenaOutputStreamTool::TypeKeyPair
std::pair< std::string, std::string > TypeKeyPair
Stream out objects.
Definition: IAthenaOutputStreamTool.h:99
IAthenaOutputStreamTool::connectServices
virtual StatusCode connectServices(const std::string &dataStore, const std::string &cnvSvc, bool extendProvenenceRecord=false)=0
Specify which data store and conversion service to use and whether to extend provenence Only use if o...
lumiFormat.outputName
string outputName
Definition: lumiFormat.py:65
IAthenaOutputStreamTool::commitOutput
virtual StatusCode commitOutput(bool doCommit=false)=0
Commit the output stream after having streamed out objects Must commitOutput AFTER streaming.
IAthenaOutputStreamTool::DataObjectVec
std::vector< DataObject * > DataObjectVec
Stream out a vector of objects Must convert to DataObject, e.g.
Definition: IAthenaOutputStreamTool.h:108
IAthenaOutputStreamTool::finalizeOutput
virtual StatusCode finalizeOutput()=0
Finalize the output stream after the last commit, e.g.
IAthenaOutputStreamTool::streamObjects
virtual StatusCode streamObjects(const TypeKeyPairs &typeKeys, const std::string &outputName="")=0
IAthenaOutputStreamTool::DeclareInterfaceID
DeclareInterfaceID(IAthenaOutputStreamTool, 1, 0)
Declare interface ID.
IAthenaOutputStreamTool::getInputItemList
virtual StatusCode getInputItemList(SG::IFolder *m_p2BWrittenFromTool)=0
Get ItemList from the OutputStreamTool (e.g. all input objects)