All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
HiveReadAlgorithm.cpp
Go to the documentation of this file.
4 
6 public:
7  HiveReadAlgorithm( const std::string& name, ISvcLocator* pSvcLocator ) : GaudiAlgorithm(name, pSvcLocator) {}
8  ~HiveReadAlgorithm() override {}
9  StatusCode initialize() override;
10  StatusCode execute() override;
12 };
13 
15 
17  return evtSvc()->addPreLoadItem(DataStoreItem("/Event",99));
18 }
19 
21 {
22  const EventContext* ctxt = getContext();
23  if (ctxt){
24  info() << "Running now for event " << ctxt->evt() << endmsg;
25  }
26  return evtSvc()->preLoad();
27 }
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
This class represents an entry point to all the event specific data.
Definition: EventContext.h:25
ContextEvt_t evt() const
Definition: EventContext.h:40
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:644
The useful base class for data processing algorithms.
StatusCode execute() override
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
Definition: Algorithm.h:276
StatusCode finalize() override
#define GAUDI_API
Definition: Kernel.h:107
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
const EventContext * getContext() const override
get the context
Definition: Algorithm.h:435