ATLAS Offline Software
Loading...
Searching...
No Matches
HiveAlgF.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "HiveAlgF.h"
6
7HiveAlgF::HiveAlgF( const std::string& name,
8 ISvcLocator* pSvcLocator ) :
9 ::HiveAlgBase( name, pSvcLocator )
10{
11}
12
13/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
14HiveAlgF::~HiveAlgF() = default;
15
16/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
18 ATH_MSG_DEBUG("initialize " << name());
19
20 ATH_CHECK( m_rdh1.initialize() );
21 ATH_CHECK( m_rdh2.initialize() );
22 ATH_CHECK( m_rdh3.initialize() );
23 ATH_CHECK( m_rdh4.initialize() );
24 ATH_CHECK( m_rdh5.initialize() );
25 ATH_CHECK( m_rdh6.initialize() );
26
27 // initialize base class
29}
30
31/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
32StatusCode HiveAlgF::execute() {
33
34 ATH_MSG_DEBUG("execute " << name());
35
36 sleep();
37
39 if (!rdh1.isValid()) {
40 ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << rdh1.key());
41 return StatusCode::FAILURE;
42 }
43
45 if (!rdh2.isValid()) {
46 ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << rdh2.key());
47 return StatusCode::FAILURE;
48 }
49
51 if (!rdh3.isValid()) {
52 ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << rdh3.key());
53 return StatusCode::FAILURE;
54 }
55
57 if (!rdh4.isValid()) {
58 ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << rdh4.key());
59 return StatusCode::FAILURE;
60 }
61
63 if (!rdh5.isValid()) {
64 ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << rdh5.key());
65 return StatusCode::FAILURE;
66 }
67
69 if (!rdh6.isValid()) {
70 ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << rdh6.key());
71 return StatusCode::FAILURE;
72 }
73
74 ATH_MSG_INFO(" read: " << rdh1.key() << " = " << rdh1->val() );
75 ATH_MSG_INFO(" read: " << rdh2.key() << " = " << rdh2->val() );
76 ATH_MSG_INFO(" read: " << rdh3.key() << " = " << rdh3->val() );
77
78 ATH_MSG_INFO("test: " << getContext().eventID().event_number() << " "
79 << rdh1->val() + rdh2->val() + rdh3->val()
80 << " " << rdh1->val()
81 << " " << rdh2->val()
82 << " " << rdh3->val()
83 << " " << rdh4->val()
84 << " " << rdh5->val()
85 << " " << rdh6->val()
86 );
87
88 return StatusCode::SUCCESS;
89
90}
91
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
Simple Algorithm that reads 6 HiveDataObjs created by HiveAlgA, HiveAlgB, HiveAlgC,...
unsigned int sleep()
HiveAlgBase(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override
SG::ReadHandleKey< HiveDataObj > m_rdh2
Definition HiveAlgF.h:37
SG::ReadHandleKey< HiveDataObj > m_rdh1
Definition HiveAlgF.h:36
SG::ReadHandleKey< HiveDataObj > m_rdh5
Definition HiveAlgF.h:40
SG::ReadHandleKey< HiveDataObj > m_rdh6
Definition HiveAlgF.h:41
SG::ReadHandleKey< HiveDataObj > m_rdh3
Definition HiveAlgF.h:38
SG::ReadHandleKey< HiveDataObj > m_rdh4
Definition HiveAlgF.h:39
virtual StatusCode execute() override
Definition HiveAlgF.cxx:32
HiveAlgF(const std::string &name, ISvcLocator *pSvcLocator)
Definition HiveAlgF.cxx:7
virtual StatusCode initialize() override
Definition HiveAlgF.cxx:17
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.