ATLAS Offline Software
Loading...
Searching...
No Matches
ReadCond.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
10
11#include "ReadCond.h"
12
13// the user data-class definitions
15
16using namespace AthPoolEx;
17
18//___________________________________________________________________________
19ReadCond::ReadCond(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator) {
20}
21//___________________________________________________________________________
23 ATH_MSG_INFO("in initialize()");
24 return StatusCode::SUCCESS;
25}
26//___________________________________________________________________________
27StatusCode ReadCond::execute() {
28 ATH_MSG_DEBUG("in execute()");
29
30 if (detStore()->contains<ExampleHitContainer>("PedestalWriteData")) {
31 const ExampleHitContainer* ep = nullptr;
32 ATH_CHECK( detStore()->retrieve(ep, "PedestalWriteData") );
33 for (const ExampleHit* obj : *ep) {
34 ATH_MSG_INFO("Pedestal x = " << obj->getX() << " y = " << obj->getY() << " z = " << obj->getZ() << " string = " << obj->getDetector());
35 }
36 }
37 if (detStore()->contains<ExampleHitContainer>("PedestalAppendData")) {
38 const ExampleHitContainer* ep = nullptr;
39 ATH_CHECK( detStore()->retrieve(ep, "PedestalAppendData") );
40 for (const ExampleHit* obj : *ep) {
41 ATH_MSG_INFO("Pedestal (2) x = " << obj->getX() << " y = " << obj->getY() << " z = " << obj->getZ() << " string = " << obj->getDetector());
42 }
43 }
44 return StatusCode::SUCCESS;
45}
46//___________________________________________________________________________
47StatusCode ReadCond::finalize() {
48 ATH_MSG_INFO("in finalize()");
49 return StatusCode::SUCCESS;
50}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
This file contains the class definition for the ExampleHitContainer class.
This file contains the class definition for the ReadCond class.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
const ServiceHandle< StoreGateSvc > & detStore() const
virtual StatusCode execute() override final
Definition ReadCond.cxx:27
ReadCond(const std::string &name, ISvcLocator *pSvcLocator)
Definition ReadCond.cxx:19
virtual StatusCode initialize() override final
Gaudi Service Interface method implementations:
Definition ReadCond.cxx:22
virtual StatusCode finalize() override final
Definition ReadCond.cxx:47
This class provides a data vector for ExampleHit objects in AthenaPool.
This class provides a dummy hit data object for AthenaPool.
Definition ExampleHit.h:24
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114