Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
RecordOutputStream.cpp
Go to the documentation of this file.
1 // Include files
2 
3 // local
4 #include "RecordOutputStream.h"
5 
6 // ----------------------------------------------------------------------------
7 // Implementation file for class: RecordOutputStream
8 //
9 // 30/08/2013: Marco Clemencic
10 // ----------------------------------------------------------------------------
12 
13 // ============================================================================
14 // Initialization
15 // ============================================================================
17  StatusCode sc = GaudiAlgorithm::initialize(); // must be executed first
18  if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm
19 
20  if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Initialize" << endmsg;
21 
22  if ( m_streamName.empty() ) {
23  m_streamName = "Deferred:" + name();
24  debug() << "Using default OutputStreamName: '" << m_streamName << "'" << endmsg;
25  }
26 
27  m_flagLocation = locationRoot() + "/" + m_streamName;
28  return StatusCode::SUCCESS;
29 }
30 
31 // ============================================================================
32 // Main execution
33 // ============================================================================
35  if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Execute" << endmsg;
36 
37  getOrCreate<DataObject, DataObject>( m_flagLocation, false );
38  /*
39  if (!exist(m_flagLocation, false)) {
40  DataObject *obj = new DataObject();
41  put(obj, m_flagLocation, false);
42  }
43  */
44  return StatusCode::SUCCESS;
45 }
46 
47 // ============================================================================
48 // Finalize
49 // ============================================================================
51  if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Finalize" << endmsg;
52 
53  return GaudiAlgorithm::finalize(); // must be called after all other actions
54 }
55 
56 // ============================================================================
StatusCode initialize() override
standard initialization method
StatusCode execute() override
Algorithm execution.
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
bool isFailure() const
Definition: StatusCode.h:130
std::string m_flagLocation
location of the DataObject flag used to record that this algorithm was called
#define DECLARE_COMPONENT(type)
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode finalize() override
standard finalization method
Simple class that adds an entry to the Transient Event Store to record that the processing flow trigg...
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
StatusCode finalize() override
Algorithm finalization.
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)