| The Gaudi Framework v29r0 (ff2e7097)

- 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 {
18 StatusCode sc = GaudiAlgorithm::initialize(); // must be executed first
19 if ( sc.isFailure() ) return sc; // error printed already by GaudiAlgorithm
20
21 if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Initialize" << endmsg;
22
23 if ( m_streamName.empty() ) {
24 m_streamName = "Deferred:" + name();
25 debug() << "Using default OutputStreamName: '" << 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 {
37 if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Execute" << endmsg;
38
39 getOrCreate<DataObject, DataObject>( m_flagLocation, false );
40 /*
41 if (!exist(m_flagLocation, false)) {
42 DataObject *obj = new DataObject();
43 put(obj, m_flagLocation, false);
44 }
45 */
46 return StatusCode::SUCCESS;
47 }
48
49 // ============================================================================
50 // Finalize
51 // ============================================================================
52 StatusCode RecordOutputStream::finalize()
53 {
54 if ( msgLevel( MSG::DEBUG ) ) debug() << "==> Finalize" << endmsg;
55
56 return GaudiAlgorithm::finalize(); // must be called after all other actions
57 }
58
59 // ============================================================================
StatusCode::SUCCESS
Definition: StatusCode.h:31
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:32
GaudiAlgorithm::initialize
StatusCode initialize() override
standard initialization method
Definition: GaudiAlgorithm.cpp:43
RecordOutputStream::execute
StatusCode execute() override
Algorithm execution.
Definition: RecordOutputStream.cpp:35
MSG::DEBUG
Definition: IMessageSvc.h:16
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
RecordOutputStream::m_flagLocation
std::string m_flagLocation
location of the DataObject flag used to record that this algorithm was called
Definition: RecordOutputStream.h:42
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
GaudiAlgorithm::finalize
StatusCode finalize() override
standard finalization method
Definition: GaudiAlgorithm.cpp:59
DECLARE_ALGORITHM_FACTORY
#define DECLARE_ALGORITHM_FACTORY(x)
Definition: Algorithm.h:629
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:120
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:129
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
RecordOutputStream::finalize
StatusCode finalize() override
Algorithm finalization.
Definition: RecordOutputStream.cpp:52