ATLAS Offline Software
ByteStreamMultipleOutputStreamCopyTool.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 OVERLAYBYTESTREAMUTILS_BYTESTREAMMULTIPLEOUTPUTSTREAMCOPYTOOL_H
6 # define OVERLAYBYTESTREAMUTILS_BYTESTREAMMULTIPLEOUTPUTSTREAMCOPYTOOL_H
7 
18 //<<<<<< INCLUDES >>>>>>
19 
20 // Gaudi
22 #include "GaudiKernel/ServiceHandle.h"
24 
25 #include <string>
26 #include <vector>
27 
28 // ByteStream
29 
32 
34 ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // this code is obsolete/unused (certainly in production)
35 
36 //<<<<<< CLASS DECLARATIONS >>>>>>
37 
38 
47 class ByteStreamMultipleOutputStreamCopyTool : public extends<AthAlgTool, IAthenaOutputStreamTool>
48 {
49 
50 public:
51 
54  const std::string& name,
55  const IInterface* parent);
58 
60  virtual StatusCode initialize();
62  virtual StatusCode finalize();
63 
64 
68  virtual StatusCode connectOutput(const std::string& outputName = "") ;
69 
72  virtual StatusCode commitOutput(bool doCommit = false) ;
73 
76  virtual StatusCode finalizeOutput();
77 
79  virtual StatusCode connectServices(const std::string& dataStore,
80  const std::string& cnvSvc,
81  bool extendProvenenceRecord = false) ;
82 
84  virtual StatusCode streamObjects(const TypeKeyPairs& typeKeys, const std::string& outputName = "") ;
85 
86 
88  virtual StatusCode streamObjects (const DataObjectVec& dataObjects, const std::string& outputName = "") ;
89 
90 
92  virtual StatusCode fillObjectRefs(const DataObjectVec& dataObjects) ;
93 
95  virtual StatusCode getInputItemList(SG::IFolder* m_p2BWrittenFromTool) ;
96 
97 private:
98 
99  // Handle for BS input Svc
101 
102  // Whether to use lbn map or not
104  std::string m_lbn_map_file;
105  std::string m_trigfile;
106  void initlbnmap();
107 
108  // Handle for BS output Svc
109  std::vector< ServiceHandle<IByteStreamOutputSvc> > m_outputSvc;
111 
113 
114 };
115 
116 
117 #endif // OVERLAYBYTESTREAMUTILS_BYTESTREAMMULTIPLEOUTPUTSTREAMCOPYTOOL_H
ByteStreamMultipleOutputStreamCopyTool::initialize
virtual StatusCode initialize()
Initialize.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:169
ByteStreamMultipleOutputStreamCopyTool::m_NoutputSvc
int m_NoutputSvc
Definition: ByteStreamMultipleOutputStreamCopyTool.h:110
ByteStreamMultipleOutputStreamCopyTool::connectServices
virtual StatusCode connectServices(const std::string &dataStore, const std::string &cnvSvc, bool extendProvenenceRecord=false)
No need to connect Services.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:305
ByteStreamMultipleOutputStreamCopyTool::m_lbn_map_file
std::string m_lbn_map_file
Definition: ByteStreamMultipleOutputStreamCopyTool.h:104
ByteStreamMultipleOutputStreamCopyTool::initlbnmap
void initlbnmap()
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:189
SG::IFolder
a run-time configurable list of data objects
Definition: SGIFolder.h:24
ByteStreamMultipleOutputStreamCopyTool::streamObjects
virtual StatusCode streamObjects(const TypeKeyPairs &typeKeys, const std::string &outputName="")
No object written for this tool.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:429
ByteStreamMultipleOutputStreamCopyTool::getInputItemList
virtual StatusCode getInputItemList(SG::IFolder *m_p2BWrittenFromTool)
Get ItemList from the OutputStreamTool (e.g. all input objects)
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:454
ByteStreamMultipleOutputStreamCopyTool::~ByteStreamMultipleOutputStreamCopyTool
virtual ~ByteStreamMultipleOutputStreamCopyTool()
Destructor.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:166
IAthenaOutputStreamTool.h
Interface to an output stream tool.
ByteStreamMultipleOutputStreamCopyTool::m_uselbnmap
bool m_uselbnmap
Definition: ByteStreamMultipleOutputStreamCopyTool.h:103
ByteStreamMultipleOutputStreamCopyTool::fillObjectRefs
virtual StatusCode fillObjectRefs(const DataObjectVec &dataObjects)
no refs for this tool.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:446
IByteStreamOutputSvc.h
This file contains the interface for the ByteStreamOutputSvc classes.
ByteStreamMultipleOutputStreamCopyTool::m_outputSvc
std::vector< ServiceHandle< IByteStreamOutputSvc > > m_outputSvc
Definition: ByteStreamMultipleOutputStreamCopyTool.h:109
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ByteStreamMultipleOutputStreamCopyTool::finalize
virtual StatusCode finalize()
Finalize.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:274
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ByteStreamMultipleOutputStreamCopyTool::commitOutput
virtual StatusCode commitOutput(bool doCommit=false)
Commit the output stream after having streamed out objects Must commitOutput AFTER streaming.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:317
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
Definition: ByteStreamMultipleOutputStreamCopyTool.h:34
ByteStreamMultipleOutputStreamCopyTool::m_inputSvc
ServiceHandle< IByteStreamInputSvc > m_inputSvc
Definition: ByteStreamMultipleOutputStreamCopyTool.h:100
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
IByteStreamInputSvc.h
This file contains the interface for the ByteStreamInputSvc classes.
lumiFormat.outputName
string outputName
Definition: lumiFormat.py:65
ByteStreamMultipleOutputStreamCopyTool::ByteStreamMultipleOutputStreamCopyTool
ByteStreamMultipleOutputStreamCopyTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:87
ByteStreamMultipleOutputStreamCopyTool::connectOutput
virtual StatusCode connectOutput(const std::string &outputName="")
Connect to the output stream Must connectOutput BEFORE streaming Only specify "outputName" if one wan...
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:312
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ByteStreamMultipleOutputStreamCopyTool::finalizeOutput
virtual StatusCode finalizeOutput()
Finalize the output stream after the last commit, e.g.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:423
ByteStreamMultipleOutputStreamCopyTool::m_trigfile
std::string m_trigfile
Definition: ByteStreamMultipleOutputStreamCopyTool.h:105
checker_macros.h
Define macros for attributes used to control the static checker.
ByteStreamMultipleOutputStreamCopyTool
This is a tool that implements the IAthenaOutputStreamTool for copying ByteStream from input.
Definition: ByteStreamMultipleOutputStreamCopyTool.h:48
ByteStreamMultipleOutputStreamCopyTool::m_skipevents
int m_skipevents
Definition: ByteStreamMultipleOutputStreamCopyTool.h:112
ServiceHandle< IByteStreamInputSvc >