All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
FetchDataFromFile.cpp
Go to the documentation of this file.
2 
3 namespace Gaudi {
4  namespace Hive {
5  class FetchDataFromFile final: public GaudiAlgorithm {
6  public:
8  StatusCode initialize() override {
10  if (sc) {
11  // this is a hack to reuse the automatic dependencies declaration
12  for (auto k: m_dataKeys) {
14  }
15  }
16  return sc;
17  }
18  StatusCode start() override {
20  if ( sc ) {
21  for( const auto& k: outputDataObjs() ) {
22  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
23  debug() << "adding data key " << k << endmsg;
24  evtSvc()->addPreLoadItem( k.key() );
25  }
26  }
27  return sc;
28  }
29  StatusCode execute() override {
30  return evtSvc()->preLoad();
31  }
32  private:
34  "list of objects to be read from file" };
35  };
36  }
37 }
Implementation of property with value of concrete type.
Definition: Property.h:314
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.
#define UNLIKELY(x)
Definition: Kernel.h:126
virtual StatusCode preLoad()=0
Load all preload items of the list.
Gaudi::Property< std::vector< std::string > > m_dataKeys
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:36
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
The useful base class for data processing algorithms.
StatusCode initialize() override
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
Definition: Algorithm.h:276
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
StatusCode start() override
the default (empty) implementation of IStateful::start() method
Definition: Algorithm.h:180
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Helper functions to set/get the application return code.
Definition: __init__.py:1
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244