ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArTest
LArEventTest
src
FakeLArOFCs.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 "
LArEventTest/FakeLArOFCs.h
"
6
#include "
LArRawConditions/LArOFCComplete.h
"
7
#include "
LArIdentifier/LArOnlineID.h
"
8
9
10
FakeLArOFCs::FakeLArOFCs
(
const
std::string & name, ISvcLocator * pSvcLocator):
11
AthAlgorithm
(name, pSvcLocator)
12
{
13
declareProperty
(
"MaxSample"
,
m_maxSample
=2);
14
declareProperty
(
"NSample"
,
m_NSample
=5);
15
declareProperty
(
"OFCKey"
,
m_keyOFC
=
"LArOFC"
);
16
}
17
18
FakeLArOFCs::~FakeLArOFCs
() {}
19
20
21
StatusCode
FakeLArOFCs::initialize
() {
22
const
LArOnlineID
* onlineHelper =
nullptr
;
23
ATH_CHECK
(
detStore
()->retrieve(onlineHelper,
"LArOnlineID"
) );
24
25
std::vector<std::vector<float> > aVec(25);
26
for
(
int
i=0;i<
m_NSample
;i++)
27
if
(i==
m_maxSample
)
28
aVec[0].push_back(1);
29
else
30
aVec[0].push_back(0);
31
32
std::vector< std::vector<float> > bVec(25);
//Stays zero-size;
33
LArOFCComplete
* larOFCComplete=
new
LArOFCComplete
();
34
for
(
int
igain=0; igain<3; igain++) {
35
for
(
HWIdentifier
ch_id : onlineHelper->
channel_range
()) {
36
larOFCComplete->
set
(ch_id,(
int
)igain,aVec,bVec);
37
}
38
}
//End loop over gains.
39
ATH_CHECK
(
detStore
()->record(larOFCComplete,
m_keyOFC
) );
40
return
StatusCode::SUCCESS;
41
}
42
43
StatusCode
FakeLArOFCs::execute
(
const
EventContext&
/*ctx*/
)
44
{
return
StatusCode::SUCCESS;}
45
46
StatusCode
FakeLArOFCs::finalize
()
47
{
return
StatusCode::SUCCESS;}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
FakeLArOFCs.h
LArOFCComplete.h
LArOnlineID.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
AthCommonAlgorithm< Gaudi::Algorithm >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
AthCommonAlgorithm< Gaudi::Algorithm >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
Definition
AthCommonDataStore.h:95
FakeLArOFCs::FakeLArOFCs
FakeLArOFCs(const std::string &name, ISvcLocator *pSvcLocator)
Definition
FakeLArOFCs.cxx:10
FakeLArOFCs::m_maxSample
short m_maxSample
Definition
FakeLArOFCs.h:20
FakeLArOFCs::finalize
StatusCode finalize()
Definition
FakeLArOFCs.cxx:46
FakeLArOFCs::execute
StatusCode execute(const EventContext &ctx)
Execute method.
Definition
FakeLArOFCs.cxx:43
FakeLArOFCs::m_NSample
short m_NSample
Definition
FakeLArOFCs.h:20
FakeLArOFCs::m_keyOFC
std::string m_keyOFC
Definition
FakeLArOFCs.h:21
FakeLArOFCs::initialize
StatusCode initialize()
Definition
FakeLArOFCs.cxx:21
FakeLArOFCs::~FakeLArOFCs
~FakeLArOFCs()
Definition
FakeLArOFCs.cxx:18
HWIdentifier
Definition
HWIdentifier.h:13
LArOFCComplete
This class implements the ILArOFC interface.
Definition
LArOFCComplete.h:25
LArOFCComplete::set
void set(const HWIdentifier &CellID, int gain, const std::vector< std::vector< float > > &vOFC_a, const std::vector< std::vector< float > > &vOFC_b, float timeOffset=0, float timeBinWidth=25./24.)
Definition
LArOFCComplete.cxx:17
LArOnlineID_Base::channel_range
id_range channel_range() const
Definition
LArOnlineID_Base.cxx:1642
LArOnlineID
Definition
LArOnlineID.h:21
Generated on
for ATLAS Offline Software by
1.17.0