ATLAS Offline Software
Loading...
Searching...
No Matches
ByteStreamOutputStreamCopyTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
9
11
12
13//__________________________________________________________________________
15
16 ATH_MSG_INFO("Initializing");
17
18 // retrieve services
19 ATH_CHECK( m_inputSvc.retrieve() );
20 ATH_CHECK( m_outputSvc.retrieve() );
21
22 return StatusCode::SUCCESS;
23}
24
25//__________________________________________________________________________
26StatusCode ByteStreamOutputStreamCopyTool::connectServices(const std::string& /*dataStore*/,
27 const std::string& /*cnvSvc*/,
28 bool /*extendProvenenceRecord*/) {
30 return StatusCode::SUCCESS;
31}
32//__________________________________________________________________________
33StatusCode ByteStreamOutputStreamCopyTool::connectOutput(const std::string& /*outputName*/) {
35 return StatusCode::SUCCESS;
36}
37//__________________________________________________________________________
38StatusCode ByteStreamOutputStreamCopyTool::commitOutput(bool/* doCommit*/) {
39
40 ATH_MSG_DEBUG("In commitOutput");
41 const RawEvent* re = m_inputSvc->currentEvent() ;
42 if(!re){
43 ATH_MSG_ERROR(" failed to get the current event from ByteStreamInputSvc");
44 return StatusCode::FAILURE ;
45 }
46 if( ! m_outputSvc->putEvent(re) ) {
47 ATH_MSG_ERROR(" failed to write event to ByteStreamOutputSvc");
48 return StatusCode::FAILURE ;
49 }
50 ATH_MSG_DEBUG(" done in commitOutput");
51 return StatusCode::SUCCESS;
52}
53//__________________________________________________________________________
55 return StatusCode::SUCCESS;
56}
57//__________________________________________________________________________
58StatusCode ByteStreamOutputStreamCopyTool::streamObjects(const TypeKeyPairs& typeKeys, const std::string&
59 /*outputName*/) {
60 if (typeKeys.size() != 0){
61 ATH_MSG_WARNING("Streaming objects is not supported. The whole input event is written out");
62 }
63 return StatusCode::SUCCESS;
64}
65//__________________________________________________________________________
66StatusCode ByteStreamOutputStreamCopyTool::streamObjects(const DataObjectVec& dataObjects, const std::string&
67 /*outputName*/) {
68 if (dataObjects.size() != 0){
69 ATH_MSG_WARNING("Streaming objects is not supported. The whole input event is written out");
70 }
71 return StatusCode::SUCCESS;
72}
73//__________________________________________________________________________
75 return StatusCode::SUCCESS;
76}
const boost::regex re(r_e)
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
Implementation of IAthenaOutputStreamTool for Copying ByteStream from input.
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition RawEvent.h:37
virtual StatusCode commitOutput(bool doCommit=false) override
Commit the output stream after having streamed out objects Must commitOutput AFTER streaming.
ServiceHandle< IByteStreamInputSvc > m_inputSvc
Handle for BS input Svc.
virtual StatusCode initialize() override
Initialize.
ServiceHandle< IByteStreamOutputSvc > m_outputSvc
Handle for BS output Svc.
virtual StatusCode getInputItemList(SG::IFolder *m_p2BWrittenFromTool) override
Get ItemList from the OutputStreamTool (e.g. all input objects)
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 connectServices(const std::string &dataStore, const std::string &cnvSvc, bool extendProvenenceRecord=false) override
No need to connect Services.
virtual StatusCode streamObjects(const TypeKeyPairs &typeKeys, const std::string &outputName="") override
No object written for this tool.
virtual StatusCode finalizeOutput() override
Finalize the output stream after the last commit, e.g.
a run-time configurable list of data objects
Definition SGIFolder.h:21