ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCafJobs
src
LArSimpleShapeDumper.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 "
LArCafJobs/LArSimpleShapeDumper.h
"
6
7
#include "
StoreGate/StoreGateSvc.h
"
8
#include "GaudiKernel/MsgStream.h"
9
#include "
LArElecCalib/ILArShape.h
"
10
#include "
LArRawConditions/LArShapeComplete.h
"
11
12
13
LArSimpleShapeDumper::LArSimpleShapeDumper
(
const
std::string & name, ISvcLocator * pSvcLocator) :
14
AthAlgorithm
(name, pSvcLocator),
15
m_onlineHelper
(nullptr)
16
{
17
}
18
19
20
LArSimpleShapeDumper::~LArSimpleShapeDumper
()
21
{
22
}
23
24
25
StatusCode
LArSimpleShapeDumper::initialize
()
26
{
27
ATH_CHECK
(
detStore
()->retrieve(
m_onlineHelper
,
"LArOnlineID"
) );
28
return
StatusCode::SUCCESS;
29
}
30
31
32
StatusCode
LArSimpleShapeDumper::execute
(
const
EventContext&
/*ctx*/
)
33
{
34
static
bool
first =
true
;
35
if
(first) {
36
first =
false
;
37
const
ILArShape
* shape =
nullptr
;
38
ATH_CHECK
(
detStore
()->retrieve (shape,
"LArShape"
) );
39
const
LArShapeComplete
* shapeObj =
dynamic_cast<
const
LArShapeComplete
*
>
(shape);
40
if
(!shapeObj) {
41
ATH_MSG_FATAL
(
"Shape object is not of type LArShapeComplete ?!"
);
42
return
StatusCode::FAILURE;
43
}
44
for
(
unsigned
int
k = 0; k < 195073; k++) {
45
HWIdentifier
channelID =
m_onlineHelper
->channel_Id(
IdentifierHash
(k));
46
for
(
int
g = 0; g < 3; g++) {
47
CaloGain::CaloGain
gain = (
CaloGain::CaloGain
)g;
48
if
(shapeObj->
nTimeBins
(channelID, gain) == 0) {
49
ATH_MSG_WARNING
50
(
"Shape object for channel "
<< k
51
<<
" ("
<< (
m_onlineHelper
->barrel_ec(channelID) ?
"EMEC"
:
"EMB"
)
52
<<
"_"
<< (
m_onlineHelper
->pos_neg(channelID) ?
"C"
:
"A"
)
53
<<
" FT = "
<<
m_onlineHelper
->feedthrough(channelID)
54
<<
", slot = "
<<
m_onlineHelper
->slot(channelID)
55
<<
", channel = "
<<
m_onlineHelper
->channel(channelID)
56
<<
") and gain "
<< g <<
" has no shape data!"
);
57
}
58
}
59
}
60
}
61
return
StatusCode::SUCCESS;
62
}
63
64
65
StatusCode
LArSimpleShapeDumper::finalize
()
66
{
67
return
StatusCode::SUCCESS;
68
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition
AthMsgStreamMacros.h:34
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition
AthMsgStreamMacros.h:32
ILArShape.h
LArShapeComplete.h
LArSimpleShapeDumper.h
StoreGateSvc.h
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
HWIdentifier
Definition
HWIdentifier.h:13
ILArShape
Definition
ILArShape.h:13
IdentifierHash
This is a "hash" representation of an Identifier.
Definition
IdentifierHash.h:25
LArShapeComplete
This class implements the ILArShape interface.
Definition
LArShapeComplete.h:26
LArShapeComplete::nTimeBins
virtual unsigned nTimeBins(const HWIdentifier &CellID, int gain) const
Definition
LArShapeComplete.cxx:72
LArSimpleShapeDumper::LArSimpleShapeDumper
LArSimpleShapeDumper(const std::string &name, ISvcLocator *pSvcLocator)
Definition
LArSimpleShapeDumper.cxx:13
LArSimpleShapeDumper::~LArSimpleShapeDumper
~LArSimpleShapeDumper()
Definition
LArSimpleShapeDumper.cxx:20
LArSimpleShapeDumper::initialize
virtual StatusCode initialize() override
Definition
LArSimpleShapeDumper.cxx:25
LArSimpleShapeDumper::execute
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
LArSimpleShapeDumper.cxx:32
LArSimpleShapeDumper::finalize
virtual StatusCode finalize() override
Definition
LArSimpleShapeDumper.cxx:65
LArSimpleShapeDumper::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition
LArSimpleShapeDumper.h:43
CaloGain::CaloGain
CaloGain
Definition
CaloGain.h:11
Generated on
for ATLAS Offline Software by
1.17.0