ATLAS Offline Software
ReadCond.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 #include "ReadCond.h"
12 
13 // the user data-class defintions
15 
16 using namespace AthPoolEx;
17 
18 //___________________________________________________________________________
19 ReadCond::ReadCond(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator) {
20 }
21 //___________________________________________________________________________
23 }
24 //___________________________________________________________________________
26  ATH_MSG_INFO("in initialize()");
27  return StatusCode::SUCCESS;
28 }
29 //___________________________________________________________________________
31  ATH_MSG_DEBUG("in execute()");
32 
33  if (detStore()->contains<ExampleHitContainer>("PedestalWriteData")) {
34  const ExampleHitContainer* ep = nullptr;
35  if (detStore()->retrieve(ep, "PedestalWriteData").isFailure()) {
36  ATH_MSG_ERROR("Could not find DataObject: PedestalWriteData");
37  return StatusCode::FAILURE;
38  }
39  for (const ExampleHit* obj : *ep) {
40  ATH_MSG_INFO("Pedestal x = " << obj->getX() << " y = " << obj->getY() << " z = " << obj->getZ() << " string = " << obj->getDetector());
41  }
42  }
43  if (detStore()->contains<ExampleHitContainer>("PedestalAppendData")) {
44  const ExampleHitContainer* ep = nullptr;
45  if (detStore()->retrieve(ep, "PedestalAppendData").isFailure()) {
46  ATH_MSG_ERROR("Could not find DataObject: PedestalAppendData");
47  return StatusCode::FAILURE;
48  }
49  for (const ExampleHit* obj : *ep) {
50  ATH_MSG_INFO("Pedestal (2) x = " << obj->getX() << " y = " << obj->getY() << " z = " << obj->getZ() << " string = " << obj->getDetector());
51  }
52  }
53  return StatusCode::SUCCESS;
54 }
55 //___________________________________________________________________________
57  ATH_MSG_INFO("in finalize()");
58  return StatusCode::SUCCESS;
59 }
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::finalize
StatusCode finalize()
Definition: ReadCond.cxx:56
AthPoolEx::ReadCond::ReadCond
ReadCond(const std::string &name, ISvcLocator *pSvcLocator)
Standard Service Constructor.
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
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthPoolEx::ReadCond::execute
StatusCode execute()
Definition: ReadCond.cxx:30
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
AthPoolEx::ReadCond::initialize
StatusCode initialize()
Gaudi Service Interface method implementations:
Definition: ReadCond.cxx:25
ExampleHit
This class provides a dummy hit data object for AthenaPool.
Definition: ExampleHit.h:24
AthPoolEx::ReadCond::~ReadCond
virtual ~ReadCond()
Destructor.
Definition: ReadCond.cxx:22
AthAlgorithm
Definition: AthAlgorithm.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
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:135
ExampleHitContainer
This class provides a data vector for ExampleHit objects in AthenaPool.
Definition: ExampleHitContainer.h:20