Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
ByteStreamOutputStreamCopyTool Class Reference

This is a tool that implements the IAthenaOutputStreamTool for copying ByteStream from input. More...

#include <ByteStreamOutputStreamCopyTool.h>

Inheritance diagram for ByteStreamOutputStreamCopyTool:
Collaboration diagram for ByteStreamOutputStreamCopyTool:

Public Member Functions

virtual StatusCode initialize () override
 Initialize. More...
 
virtual StatusCode connectOutput (const std::string &outputName="") override
 Connect to the output stream Must connectOutput BEFORE streaming Only specify "outputName" if one wants to override jobOptions. More...
 
virtual StatusCode commitOutput (bool doCommit=false) override
 Commit the output stream after having streamed out objects Must commitOutput AFTER streaming. More...
 
virtual StatusCode finalizeOutput () override
 Finalize the output stream after the last commit, e.g. More...
 
virtual StatusCode connectServices (const std::string &dataStore, const std::string &cnvSvc, bool extendProvenenceRecord=false) override
 No need to connect Services. More...
 
virtual StatusCode streamObjects (const TypeKeyPairs &typeKeys, const std::string &outputName="") override
 No object written for this tool. More...
 
virtual StatusCode streamObjects (const DataObjectVec &dataObjects, const std::string &outputName="") override
 no stream of vector of objects either. More...
 
virtual StatusCode getInputItemList (SG::IFolder *m_p2BWrittenFromTool) override
 Get ItemList from the OutputStreamTool (e.g. all input objects) More...
 

Private Attributes

ServiceHandle< IByteStreamOutputSvcm_outputSvc {this, "ByteStreamOutputSvc", "ByteStreamEventStorageOutputSvc"}
 Handle for BS output Svc. More...
 
ServiceHandle< IByteStreamInputSvcm_inputSvc {this, "ByteStreamInputSvc", "ByteStreamEventStorageInputSvc"}
 Handle for BS input Svc. More...
 

Detailed Description

This is a tool that implements the IAthenaOutputStreamTool for copying ByteStream from input.

Definition at line 38 of file ByteStreamOutputStreamCopyTool.h.

Member Function Documentation

◆ commitOutput()

StatusCode ByteStreamOutputStreamCopyTool::commitOutput ( bool  doCommit = false)
overridevirtual

Commit the output stream after having streamed out objects Must commitOutput AFTER streaming.

Definition at line 38 of file ByteStreamOutputStreamCopyTool.cxx.

38  {
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 }

◆ connectOutput()

StatusCode ByteStreamOutputStreamCopyTool::connectOutput ( const std::string &  outputName = "")
overridevirtual

Connect to the output stream Must connectOutput BEFORE streaming Only specify "outputName" if one wants to override jobOptions.

Do nothing for connectOutput

Definition at line 33 of file ByteStreamOutputStreamCopyTool.cxx.

33  {
35  return StatusCode::SUCCESS;
36 }

◆ connectServices()

StatusCode ByteStreamOutputStreamCopyTool::connectServices ( const std::string &  dataStore,
const std::string &  cnvSvc,
bool  extendProvenenceRecord = false 
)
overridevirtual

No need to connect Services.

Do nothing for connectServices

Definition at line 26 of file ByteStreamOutputStreamCopyTool.cxx.

28  {
30  return StatusCode::SUCCESS;
31 }

◆ finalizeOutput()

StatusCode ByteStreamOutputStreamCopyTool::finalizeOutput ( )
overridevirtual

Finalize the output stream after the last commit, e.g.

in finalize

Definition at line 54 of file ByteStreamOutputStreamCopyTool.cxx.

54  {
55  return StatusCode::SUCCESS;
56 }

◆ getInputItemList()

StatusCode ByteStreamOutputStreamCopyTool::getInputItemList ( SG::IFolder m_p2BWrittenFromTool)
overridevirtual

Get ItemList from the OutputStreamTool (e.g. all input objects)

Definition at line 74 of file ByteStreamOutputStreamCopyTool.cxx.

74  {
75  return StatusCode::SUCCESS;
76 }

◆ initialize()

StatusCode ByteStreamOutputStreamCopyTool::initialize ( )
overridevirtual

Initialize.

Definition at line 14 of file ByteStreamOutputStreamCopyTool.cxx.

14  {
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 }

◆ streamObjects() [1/2]

StatusCode ByteStreamOutputStreamCopyTool::streamObjects ( const DataObjectVec &  dataObjects,
const std::string &  outputName = "" 
)
overridevirtual

no stream of vector of objects either.

Definition at line 66 of file ByteStreamOutputStreamCopyTool.cxx.

67  {
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 }

◆ streamObjects() [2/2]

StatusCode ByteStreamOutputStreamCopyTool::streamObjects ( const TypeKeyPairs &  typeKeys,
const std::string &  outputName = "" 
)
overridevirtual

No object written for this tool.

Definition at line 58 of file ByteStreamOutputStreamCopyTool.cxx.

59  {
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 }

Member Data Documentation

◆ m_inputSvc

ServiceHandle<IByteStreamInputSvc> ByteStreamOutputStreamCopyTool::m_inputSvc {this, "ByteStreamInputSvc", "ByteStreamEventStorageInputSvc"}
private

Handle for BS input Svc.

Definition at line 79 of file ByteStreamOutputStreamCopyTool.h.

◆ m_outputSvc

ServiceHandle<IByteStreamOutputSvc> ByteStreamOutputStreamCopyTool::m_outputSvc {this, "ByteStreamOutputSvc", "ByteStreamEventStorageOutputSvc"}
private

Handle for BS output Svc.

Definition at line 76 of file ByteStreamOutputStreamCopyTool.h.


The documentation for this class was generated from the following files:
ByteStreamOutputStreamCopyTool::m_outputSvc
ServiceHandle< IByteStreamOutputSvc > m_outputSvc
Handle for BS output Svc.
Definition: ByteStreamOutputStreamCopyTool.h:76
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
RawEvent
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition: RawEvent.h:37
ByteStreamOutputStreamCopyTool::m_inputSvc
ServiceHandle< IByteStreamInputSvc > m_inputSvc
Handle for BS input Svc.
Definition: ByteStreamOutputStreamCopyTool.h:79
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
re
const boost::regex re(r_e)