ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
AthenaPOOL
AthenaPoolExample
AthenaPoolExampleAlgorithms
src
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
14
#include "
AthenaPoolExampleData/ExampleHitContainer.h
"
15
16
using namespace
AthPoolEx
;
17
18
//___________________________________________________________________________
19
ReadCond::ReadCond
(
const
std::string& name, ISvcLocator* pSvcLocator) :
AthAlgorithm
(name, pSvcLocator) {
20
}
21
//___________________________________________________________________________
22
StatusCode
ReadCond::initialize
() {
23
ATH_MSG_INFO
(
"in initialize()"
);
24
return
StatusCode::SUCCESS;
25
}
26
//___________________________________________________________________________
27
StatusCode
ReadCond::execute
(
const
EventContext&
/*ctx*/
) {
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
//___________________________________________________________________________
47
StatusCode
ReadCond::finalize
() {
48
ATH_MSG_INFO
(
"in finalize()"
);
49
return
StatusCode::SUCCESS;
50
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
ExampleHitContainer.h
This file contains the class definition for the ExampleHitContainer class.
ReadCond.h
This file contains the class definition for the ReadCond class.
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
AthCommonAlgorithm< Gaudi::Algorithm >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
Definition
AthCommonDataStore.h:95
AthPoolEx::ReadCond::ReadCond
ReadCond(const std::string &name, ISvcLocator *pSvcLocator)
Definition
ReadCond.cxx:19
AthPoolEx::ReadCond::execute
virtual StatusCode execute(const EventContext &ctx) override final
Execute method.
Definition
ReadCond.cxx:27
AthPoolEx::ReadCond::initialize
virtual StatusCode initialize() override final
Gaudi Service Interface method implementations:
Definition
ReadCond.cxx:22
AthPoolEx::ReadCond::finalize
virtual StatusCode finalize() override final
Definition
ReadCond.cxx:47
ExampleHitContainer
This class provides a data vector for ExampleHit objects in AthenaPool.
Definition
ExampleHitContainer.h:20
ExampleHit
This class provides a dummy hit data object for AthenaPool.
Definition
ExampleHit.h:24
contains
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
Definition
hcg.cxx:116
AthPoolEx
Definition
PassNoneFilter.h:16
Generated on
for ATLAS Offline Software by
1.17.0