ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
HiveTool Class Reference

#include <HiveTool.h>

Inheritance diagram for HiveTool:
Collaboration diagram for HiveTool:

Public Member Functions

 HiveTool (const std::string &, const std::string &, const IInterface *)
 
virtual ~HiveTool ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
virtual StatusCode doSomething () const
 

Private Attributes

SG::ReadHandleKey< HiveDataObjm_rdh1 {this, "Key_R1", "x1", "tool read key"}
 
SG::WriteHandleKey< HiveDataObjm_wrh1 {this, "Key_W1", "X1", "tool write key"}
 

Detailed Description

Definition at line 16 of file HiveTool.h.

Constructor & Destructor Documentation

◆ HiveTool()

HiveTool::HiveTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 14 of file HiveTool.cxx.

16  : base_class( type, name, parent )
17 {}

◆ ~HiveTool()

HiveTool::~HiveTool ( )
virtual

Definition at line 21 of file HiveTool.cxx.

21  {
22 }

Member Function Documentation

◆ doSomething()

StatusCode HiveTool::doSomething ( ) const
virtual

Definition at line 52 of file HiveTool.cxx.

52  {
53  ATH_MSG_INFO ("doSomething()");
54 
55  int val = 0;
56 
57  if (m_rdh1.key() == "") {
58  ATH_MSG_INFO("RH not valid - not retrieving");
59  } else {
61  ATH_MSG_INFO(" read: " << rh.key() << " = " << rh->val() );
62  val = rh->val();
63  }
64 
65  if (m_wrh1.key() == "") {
66  ATH_MSG_INFO("WH not valid - not writing");
67  } else {
69  ATH_CHECK(wrh1.record(std::make_unique< HiveDataObj >(val + 666)));
70 
71  ATH_MSG_INFO(" write: " << wrh1.key() << " = " << wrh1->val() );
72  }
73 
74  return StatusCode::SUCCESS;
75 }

◆ finalize()

StatusCode HiveTool::finalize ( )
virtual

Definition at line 46 of file HiveTool.cxx.

46  {
47  ATH_MSG_INFO("finalize");
48 
49  return StatusCode::SUCCESS;
50 }

◆ initialize()

StatusCode HiveTool::initialize ( )
virtual

Definition at line 25 of file HiveTool.cxx.

25  {
26  ATH_MSG_INFO("initialize");
27 
28  if (m_rdh1.key() != "") {
30  ATH_MSG_INFO("read key: " << m_rdh1.key());
31  } else {
32  ATH_MSG_INFO("RH key is blank. not initializing");
33  }
34 
35  if (m_wrh1.key() != "") {
37  ATH_MSG_INFO("write key: " << m_wrh1.key());
38  } else {
39  ATH_MSG_INFO("WH key is blank. not initializing");
40  }
41 
42  return StatusCode::SUCCESS;
43 }

Member Data Documentation

◆ m_rdh1

SG::ReadHandleKey<HiveDataObj> HiveTool::m_rdh1 {this, "Key_R1", "x1", "tool read key"}
private

Definition at line 28 of file HiveTool.h.

◆ m_wrh1

SG::WriteHandleKey<HiveDataObj> HiveTool::m_wrh1 {this, "Key_W1", "X1", "tool write key"}
private

Definition at line 29 of file HiveTool.h.


The documentation for this class was generated from the following files:
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
HiveTool::m_wrh1
SG::WriteHandleKey< HiveDataObj > m_wrh1
Definition: HiveTool.h:29
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
HiveTool::m_rdh1
SG::ReadHandleKey< HiveDataObj > m_rdh1
Definition: HiveTool.h:28
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78