ATLAS Offline Software
Loading...
Searching...
No Matches
AlgC.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "AlgC.h"
8
9//---------------------------------------------------------------------------
10
11StatusCode AlgC::initialize() {
12 ATH_MSG_DEBUG("initialize " << name());
13
14 ATH_CHECK(m_rdh1.initialize());
15 ATH_CHECK(m_rch.initialize());
16
17 ATH_MSG_INFO( "m_rdh1 id: " << m_rdh1.fullKey() );
18 ATH_MSG_INFO( "m_rch id: " << m_rch.fullKey() );
19
20
21 return StatusCode::SUCCESS;
22}
23
24//---------------------------------------------------------------------------
25
26StatusCode AlgC::execute(const EventContext& ctx) const {
27 ATH_MSG_DEBUG("execute " << name());
28
30 if (!rh1.isValid()) {
31 ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << m_rdh1.key());
32 return StatusCode::FAILURE;
33 }
34
35 ATH_MSG_INFO(" read: " << rh1.key() << " = " << rh1->val() );
36
38 const CondDataObj *cdo = *rch;
39 if (cdo != 0) {
40 ATH_MSG_INFO(" read CH: " << rch.key() << " = " << *cdo );
41 } else {
42 ATH_MSG_ERROR(" CDO ptr for " << rch.key() << " == zero");
43 }
44
45 return StatusCode::SUCCESS;
46
47}
48
#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)
Handle class for reading from StoreGate.
SG::ReadHandleKey< HiveDataObj > m_rdh1
Definition AlgC.h:25
SG::ReadCondHandleKey< CondDataObj > m_rch
Definition AlgC.h:27
virtual StatusCode initialize() override
Definition AlgC.cxx:11
virtual StatusCode execute(const EventContext &ctx) const override
Definition AlgC.cxx:26
const std::string & key() const
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.