The Gaudi Framework  v29r0 (ff2e7097)
HiveReadAlgorithm.cpp
Go to the documentation of this file.
5 
7 {
8 public:
9  HiveReadAlgorithm( const std::string& name, ISvcLocator* pSvcLocator ) : GaudiAlgorithm( name, pSvcLocator ) {}
10  ~HiveReadAlgorithm() override {}
11  StatusCode initialize() override;
12  StatusCode execute() override;
13  StatusCode finalize() override { return StatusCode::SUCCESS; }
14 };
15 
17 
18 StatusCode HiveReadAlgorithm::initialize() { return evtSvc()->addPreLoadItem( DataStoreItem( "/Event", 99 ) ); }
19 
21 {
22  info() << "Running now for event " << Gaudi::Hive::currentContext().evt() << endmsg;
23  return evtSvc()->preLoad();
24 }
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.
StatusCode initialize() override
standard initialization method
Header file for class GaudiAlgorithm.
virtual StatusCode preLoad()=0
Load all preload items of the list.
StatusCode execute() override
standard execution method
Description of the DataStoreItem class.
Definition: DataStoreItem.h:17
ContextEvt_t evt() const
Definition: EventContext.h:39
STL class.
HiveReadAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
~HiveReadAlgorithm() override
#define DECLARE_ALGORITHM_FACTORY(x)
Definition: Algorithm.h:629
The useful base class for data processing algorithms.
GAUDI_API const EventContext & currentContext()
StatusCode execute() override
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
Definition: Algorithm.h:280
StatusCode finalize() override
#define GAUDI_API
Definition: Kernel.h:110
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209