| The Gaudi Framework v32r1 (f65d50dc)

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 // ----------------------------------------------------------------------------
11 DECLARE_COMPONENT( RecordOutputStream )
12
13 // ============================================================================
14 // Initialization
15 // ============================================================================
16 StatusCode RecordOutputStream::initialize() {
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 // ============================================================================
34 StatusCode RecordOutputStream::execute() {
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 // ============================================================================
50 StatusCode RecordOutputStream::finalize() {
51 if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Finalize" << endmsg;
52
53 return GaudiAlgorithm::finalize(); // must be called after all other actions
54 }
55
56 // ============================================================================
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
GaudiAlgorithm::initialize
StatusCode initialize() override
standard initialization method
Definition: GaudiAlgorithm.cpp:42
RecordOutputStream::execute
StatusCode execute() override
Algorithm execution.
Definition: RecordOutputStream.cpp:34
MSG::DEBUG
Definition: IMessageSvc.h:15
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
RecordOutputStream::m_flagLocation
std::string m_flagLocation
location of the DataObject flag used to record that this algorithm was called
Definition: RecordOutputStream.h:38
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginServiceV1.h:46
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
GaudiAlgorithm::finalize
StatusCode finalize() override
standard finalization method
Definition: GaudiAlgorithm.cpp:55
RecordOutputStream
Simple class that adds an entry to the Transient Event Store to record that the processing flow trigg...
Definition: RecordOutputStream.h:20
RecordOutputStream.h
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:130
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
RecordOutputStream::finalize
StatusCode finalize() override
Algorithm finalization.
Definition: RecordOutputStream.cpp:50