ATLAS Offline Software
HiveAlgB.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
13 #ifndef ATHEXHIVE_ALGB_H
14 #define ATHEXHIVE_ALGB_H 1
15 
16 #include "HiveAlgBase.h"
18 #include "AthExHive/HiveDataObj.h"
19 #include "GaudiKernel/ContextSpecificPtr.h"
20 
21 #include <string>
22 
23 class HiveAlgB : public HiveAlgBase {
24 
25 public:
26 
27  // Standard Algorithm Constructor:
28 
29  HiveAlgB (const std::string& name, ISvcLocator* pSvcLocator);
30  ~HiveAlgB();
31 
32  // Define the initialize, execute and finalize methods:
33 
34  virtual StatusCode initialize() override;
35  virtual StatusCode execute() override;
36  virtual StatusCode finalize() override;
37 
38 private:
39 
40  void dump();
41 
42  SG::WriteHandleKey<HiveDataObj> m_wrh1 {this, "Key_W1", "b1", "WHK 1"};
43 
44  // context specific data: which hides an array structure behind a simple
45  // interface, keeping separate versions of the data for each concurrent
46  // event (slot)
47  Gaudi::Hive::ContextSpecificData<int> m_di;
48 
49 };
50 #endif
HiveAlgB::finalize
virtual StatusCode finalize() override
Definition: HiveAlgB.cxx:40
HiveDataObj.h
HiveAlgB::execute
virtual StatusCode execute() override
Definition: HiveAlgB.cxx:52
HiveAlgB::~HiveAlgB
~HiveAlgB()
Definition: HiveAlgB.cxx:15
HiveAlgB
Definition: HiveAlgB.h:23
SG::WriteHandleKey< HiveDataObj >
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HiveAlgBase
Definition: HiveAlgBase.h:26
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
HiveAlgB::HiveAlgB
HiveAlgB(const std::string &name, ISvcLocator *pSvcLocator)
Definition: HiveAlgB.cxx:10
HiveAlgB::initialize
virtual StatusCode initialize() override
Definition: HiveAlgB.cxx:19
HiveAlgB::m_wrh1
SG::WriteHandleKey< HiveDataObj > m_wrh1
Definition: HiveAlgB.h:42
HiveAlgB::dump
void dump()
Definition: HiveAlgB.cxx:76
HiveAlgB::m_di
Gaudi::Hive::ContextSpecificData< int > m_di
Definition: HiveAlgB.h:47
HiveAlgBase.h
Base class for AthExHive example Algs to provide functionality to sleep for a certain amount of time,...