The Gaudi Framework  v30r0 (c919700c)
HiveReadAlgorithm.cpp
Go to the documentation of this file.
4 
6 {
7 public:
8  HiveReadAlgorithm( const std::string& name, ISvcLocator* pSvcLocator ) : GaudiAlgorithm( name, pSvcLocator ) {}
9  ~HiveReadAlgorithm() override {}
10  StatusCode initialize() override;
11  StatusCode execute() override;
12  StatusCode finalize() override { return StatusCode::SUCCESS; }
13 };
14 
16 
17 StatusCode HiveReadAlgorithm::initialize() { return evtSvc()->addPreLoadItem( DataStoreItem( "/Event", 99 ) ); }
18 
20 {
21  info() << "Running now for event " << Gaudi::Hive::currentContext().evt() << endmsg;
22  return evtSvc()->preLoad();
23 }
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:26
~HiveReadAlgorithm() override
#define DECLARE_ALGORITHM_FACTORY(x)
Definition: Algorithm.h:631
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:282
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