ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
ByteStreamCnvSvc
src
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
10
#include "
ByteStreamOutputStreamCopyTool.h
"
11
12
13
//__________________________________________________________________________
14
StatusCode
ByteStreamOutputStreamCopyTool::initialize
() {
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
//__________________________________________________________________________
26
StatusCode
ByteStreamOutputStreamCopyTool::connectServices
(
const
std::string&
/*dataStore*/
,
27
const
std::string&
/*cnvSvc*/
,
28
bool
/*extendProvenenceRecord*/
) {
30
return
StatusCode::SUCCESS;
31
}
32
//__________________________________________________________________________
33
StatusCode
ByteStreamOutputStreamCopyTool::connectOutput
(
const
std::string&
/*outputName*/
) {
35
return
StatusCode::SUCCESS;
36
}
37
//__________________________________________________________________________
38
StatusCode
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
//__________________________________________________________________________
54
StatusCode
ByteStreamOutputStreamCopyTool::finalizeOutput
() {
55
return
StatusCode::SUCCESS;
56
}
57
//__________________________________________________________________________
58
StatusCode
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
//__________________________________________________________________________
66
StatusCode
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
//__________________________________________________________________________
74
StatusCode
ByteStreamOutputStreamCopyTool::getInputItemList
(
SG::IFolder
*
/*m_p2BWrittenFromTool*/
) {
75
return
StatusCode::SUCCESS;
76
}
re
const std::regex re(r_e)
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition
AthMsgStreamMacros.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
ByteStreamOutputStreamCopyTool.h
Implementation of IAthenaOutputStreamTool for Copying ByteStream from input.
RawEvent
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition
RawEvent.h:37
ByteStreamOutputStreamCopyTool::commitOutput
virtual StatusCode commitOutput(bool doCommit=false) override
Commit the output stream after having streamed out objects Must commitOutput AFTER streaming.
Definition
ByteStreamOutputStreamCopyTool.cxx:38
ByteStreamOutputStreamCopyTool::m_inputSvc
ServiceHandle< IByteStreamInputSvc > m_inputSvc
Handle for BS input Svc.
Definition
ByteStreamOutputStreamCopyTool.h:79
ByteStreamOutputStreamCopyTool::initialize
virtual StatusCode initialize() override
Initialize.
Definition
ByteStreamOutputStreamCopyTool.cxx:14
ByteStreamOutputStreamCopyTool::m_outputSvc
ServiceHandle< IByteStreamOutputSvc > m_outputSvc
Handle for BS output Svc.
Definition
ByteStreamOutputStreamCopyTool.h:76
ByteStreamOutputStreamCopyTool::getInputItemList
virtual StatusCode getInputItemList(SG::IFolder *m_p2BWrittenFromTool) override
Get ItemList from the OutputStreamTool (e.g. all input objects).
Definition
ByteStreamOutputStreamCopyTool.cxx:74
ByteStreamOutputStreamCopyTool::connectOutput
virtual StatusCode connectOutput(const std::string &outputName="") override
Connect to the output stream Must connectOutput BEFORE streaming Only specify "outputName" if one wan...
Definition
ByteStreamOutputStreamCopyTool.cxx:33
ByteStreamOutputStreamCopyTool::connectServices
virtual StatusCode connectServices(const std::string &dataStore, const std::string &cnvSvc, bool extendProvenenceRecord=false) override
No need to connect Services.
Definition
ByteStreamOutputStreamCopyTool.cxx:26
ByteStreamOutputStreamCopyTool::streamObjects
virtual StatusCode streamObjects(const TypeKeyPairs &typeKeys, const std::string &outputName="") override
No object written for this tool.
Definition
ByteStreamOutputStreamCopyTool.cxx:58
ByteStreamOutputStreamCopyTool::finalizeOutput
virtual StatusCode finalizeOutput() override
Finalize the output stream after the last commit, e.g.
Definition
ByteStreamOutputStreamCopyTool.cxx:54
SG::IFolder
a run-time configurable list of data objects
Definition
SGIFolder.h:21
Generated on
for ATLAS Offline Software by
1.17.0