All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
RecordStream.cpp
Go to the documentation of this file.
1 // Framework include files
2 #include "GaudiKernel/IRegistry.h"
3 #include "GaudiKernel/IDataManagerSvc.h"
4 #include "GaudiKernel/IDataProviderSvc.h"
5 #include "GaudiKernel/IOpaqueAddress.h"
6 #include "GaudiKernel/DataStoreItem.h"
7 #include "GaudiKernel/DataObject.h"
8 #include "GaudiKernel/MsgStream.h"
9 #include "RecordStream.h"
10 
11 // Define the algorithm factory for the standard output data writer
13 
14 // Standard Constructor
15 RecordStream::RecordStream(const std::string& name, ISvcLocator* pSvcLocator)
16  : OutputStream(name, pSvcLocator)
17 {
20  declareProperty("FireIncidents", m_fireIncidents=false);
21 }
22 
24  MsgStream log(msgSvc(), name());
25  log << MSG::INFO << "Set up File Summary Record" << endmsg;
26  if( !m_fireIncidents && log.level() <= MSG::VERBOSE )
27  log << MSG::VERBOSE << "will not fire incidents" << endmsg;
29  if( !sc.isSuccess() ) {
30  log << MSG::WARNING << "Error writing run summary record....." << endmsg;
31  }
32  return OutputStream::finalize();
33 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
StatusCode finalize() override
Terminate OutputStream.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
MSG::Level level()
Retrieve output level.
Definition: MsgStream.h:112
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
STL namespace.
Extension of OutputStream to write run records after last event.
Definition: RecordStream.h:13
A small to stream Data I/O.
Definition: OutputStream.h:29
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:919
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:36
StatusCode finalize() override
Algorithm overload: finalization.
StatusCode execute() override
Working entry point.
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: Algorithm.cpp:1001
bool m_fireIncidents
should I fire incidents for writing opening/closing etc?
Definition: OutputStream.h:125