ATLAS Offline Software
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 
11 #include "ReadCond.h"
12 
13 // the user data-class definitions
15 
16 using namespace AthPoolEx;
17 
18 //___________________________________________________________________________
19 ReadCond::ReadCond(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator) {
20 }
21 //___________________________________________________________________________
23  ATH_MSG_INFO("in initialize()");
24  return StatusCode::SUCCESS;
25 }
26 //___________________________________________________________________________
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 //___________________________________________________________________________
48  ATH_MSG_INFO("in finalize()");
49  return StatusCode::SUCCESS;
50 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthPoolEx::ReadCond::ReadCond
ReadCond(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ReadCond.cxx:19
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
AthPoolEx::ReadCond::initialize
virtual StatusCode initialize() override final
Gaudi Service Interface method implementations:
Definition: ReadCond.cxx:22
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ExampleHit
This class provides a dummy hit data object for AthenaPool.
Definition: ExampleHit.h:24
AthAlgorithm
Definition: AthAlgorithm.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
AthPoolEx::ReadCond::execute
virtual StatusCode execute() override final
Definition: ReadCond.cxx:27
AthPoolEx::ReadCond::finalize
virtual StatusCode finalize() override final
Definition: ReadCond.cxx:47
ReadCond.h
This file contains the class definition for the ReadCond class.
AthPoolEx
Definition: PassNoneFilter.h:16
ExampleHitContainer.h
This file contains the class definition for the ExampleHitContainer class.
python.PyAthena.obj
obj
Definition: PyAthena.py:132
ExampleHitContainer
This class provides a data vector for ExampleHit objects in AthenaPool.
Definition: ExampleHitContainer.h:20