ATLAS Offline Software
Loading...
Searching...
No Matches
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
15
16
17// Gaudi
18#include "GaudiKernel/IAlgTool.h"
19
20#include <string>
21#include <vector>
22
23
24class DataObject;
25namespace SG {
26 class IFolder;
27}
28
67
68class IAthenaOutputStreamTool : virtual public IAlgTool
69{
70
71public:
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
This is a tool that allows streaming out of DataObjects.
DeclareInterfaceID(IAthenaOutputStreamTool, 1, 0)
Declare interface ID.
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...
virtual StatusCode streamObjects(const TypeKeyPairs &typeKeys, const std::string &outputName="")=0
std::pair< std::string, std::string > TypeKeyPair
Stream out objects.
virtual StatusCode getInputItemList(SG::IFolder *m_p2BWrittenFromTool)=0
Get ItemList from the OutputStreamTool (e.g. all input objects)
std::vector< DataObject * > DataObjectVec
Stream out a vector of objects Must convert to DataObject, e.g.
virtual StatusCode connectOutput(const std::string &outputName="")=0
Connect to the output stream Must connectOutput BEFORE streaming Only specify "outputName" if one wan...
virtual StatusCode streamObjects(const DataObjectVec &dataObjects, const std::string &outputName="")=0
std::vector< TypeKeyPair > TypeKeyPairs
virtual StatusCode finalizeOutput()=0
Finalize the output stream after the last commit, e.g.
virtual StatusCode commitOutput(bool doCommit=false)=0
Commit the output stream after having streamed out objects Must commitOutput AFTER streaming.
a run-time configurable list of data objects
Definition SGIFolder.h:21
Forward declaration.