| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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_ALGORITHM_FACTORY(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: '"
25 << m_streamName << "'" << endmsg;
26 }
27
28 m_flagLocation = locationRoot() + "/" + m_streamName;
29 return StatusCode::SUCCESS;
30 }
31
32 // ============================================================================
33 // Main execution
34 // ============================================================================
35 StatusCode RecordOutputStream::execute() {
36 if ( msgLevel(MSG::DEBUG) ) debug() << "==> Execute" << endmsg;
37
38 getOrCreate<DataObject, DataObject>(m_flagLocation, false);
39 /*
40 if (!exist(m_flagLocation, false)) {
41 DataObject *obj = new DataObject();
42 put(obj, m_flagLocation, false);
43 }
44 */
45 return StatusCode::SUCCESS;
46 }
47
48 // ============================================================================
49 // Finalize
50 // ============================================================================
51 StatusCode RecordOutputStream::finalize() {
52 if ( msgLevel(MSG::DEBUG) ) debug() << "==> Finalize" << endmsg;
53
54 return GaudiAlgorithm::finalize(); // must be called after all other actions
55 }
56
57 // ============================================================================
StatusCode::SUCCESS
Definition: StatusCode.h:30
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
GaudiAlgorithm::initialize
StatusCode initialize() override
standard initialization method
Definition: GaudiAlgorithm.cpp:44
RecordOutputStream::execute
StatusCode execute() override
Algorithm execution.
Definition: RecordOutputStream.cpp:35
MSG::DEBUG
Definition: IMessageSvc.h:18
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:84
RecordOutputStream::m_flagLocation
std::string m_flagLocation
location of the DataObject flag used to record that this algorithm was called
Definition: RecordOutputStream.h:41
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GaudiAlgorithm::finalize
StatusCode finalize() override
standard finalization method
Definition: GaudiAlgorithm.cpp:58
DECLARE_ALGORITHM_FACTORY
#define DECLARE_ALGORITHM_FACTORY(x)
Definition: Algorithm.h:620
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
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:126
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:135
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
RecordOutputStream::finalize
StatusCode finalize() override
Algorithm finalization.
Definition: RecordOutputStream.cpp:51