ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TileCalorimeter
TileConditions
src
TileCondToolDspThreshold.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// Tile includes
6
#include "
TileConditions/TileCondToolDspThreshold.h
"
7
#include "
TileCalibBlobObjs/TileCalibDrawerFlt.h
"
8
9
// Athena includes
10
#include "
AthenaKernel/errorcheck.h
"
11
#include "
StoreGate/ReadCondHandle.h
"
12
13
14
//
15
//____________________________________________________________________
16
TileCondToolDspThreshold::TileCondToolDspThreshold
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent)
17
:
AthAlgTool
(
type
, name, parent)
18
{
19
declareInterface<ITileCondToolDspThreshold>(
this
);
20
declareInterface<TileCondToolDspThreshold>(
this
);
21
}
22
23
//
24
//____________________________________________________________________
25
TileCondToolDspThreshold::~TileCondToolDspThreshold
() {
26
}
27
28
//
29
//____________________________________________________________________
30
StatusCode
TileCondToolDspThreshold::initialize
() {
31
32
ATH_MSG_DEBUG
(
"In initialize()"
);
33
34
//=== Initialize conditions data key with DSP thresholds
35
ATH_CHECK
(
m_calibDspThresholdKey
.initialize() );
36
37
return
StatusCode::SUCCESS;
38
}
39
40
//
41
//____________________________________________________________________
42
StatusCode
TileCondToolDspThreshold::finalize
() {
43
ATH_MSG_DEBUG
(
"finalize called"
);
44
45
return
StatusCode::SUCCESS;
46
}
47
48
49
//
50
//____________________________________________________________________
51
float
TileCondToolDspThreshold::getMinimumAmplitudeThreshold
(
unsigned
int
drawerIdx,
unsigned
int
channel,
unsigned
int
adc)
const
{
52
53
SG::ReadCondHandle<TileCalibData<TileCalibDrawerFlt>
> calibDspThreshold(
m_calibDspThresholdKey
);
54
return
calibDspThreshold->getCalibDrawer(drawerIdx)->getData(channel, adc, 0);
55
56
}
57
58
59
//
60
//____________________________________________________________________
61
float
TileCondToolDspThreshold::getMaximumAmplitudeThreshold
(
unsigned
int
drawerIdx,
unsigned
int
channel,
unsigned
int
adc)
const
{
62
63
SG::ReadCondHandle<TileCalibData<TileCalibDrawerFlt>
> calibDspThreshold(
m_calibDspThresholdKey
);
64
return
calibDspThreshold->getCalibDrawer(drawerIdx)->getData(channel, adc, 1);
65
66
}
67
68
69
//
70
//____________________________________________________________________
71
void
TileCondToolDspThreshold::getAmplitudeThresholds
(
unsigned
int
drawerIdx,
unsigned
int
channel,
unsigned
int
adc,
72
float
& minimumThreshold,
float
& maximumThreshold)
const
{
73
74
SG::ReadCondHandle<TileCalibData<TileCalibDrawerFlt>
> calibDspThreshold(
m_calibDspThresholdKey
);
75
minimumThreshold = calibDspThreshold->getCalibDrawer(drawerIdx)->getData(channel, adc, 0);
76
maximumThreshold = calibDspThreshold->getCalibDrawer(drawerIdx)->getData(channel, adc, 1);
77
78
}
79
80
81
//
82
//____________________________________________________________________
83
float
TileCondToolDspThreshold::getDspThreshold
(
unsigned
int
drawerIdx,
unsigned
int
channel,
unsigned
int
adc)
const
{
84
85
SG::ReadCondHandle<TileCalibData<TileCalibDrawerFlt>
> calibDspThreshold(
m_calibDspThresholdKey
);
86
return
calibDspThreshold->getCalibDrawer(drawerIdx)->getData(channel, adc, 2);
87
88
}
89
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
errorcheck.h
Helpers for checking error return status codes and reporting errors.
ReadCondHandle.h
TileCalibDrawerFlt.h
TileCondToolDspThreshold.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
SG::ReadCondHandle
Definition
ReadCondHandle.h:40
TileCondToolDspThreshold::TileCondToolDspThreshold
TileCondToolDspThreshold(const std::string &type, const std::string &name, const IInterface *parent)
Definition
TileCondToolDspThreshold.cxx:16
TileCondToolDspThreshold::getMaximumAmplitudeThreshold
virtual float getMaximumAmplitudeThreshold(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const override
Definition
TileCondToolDspThreshold.cxx:61
TileCondToolDspThreshold::finalize
virtual StatusCode finalize() override
Definition
TileCondToolDspThreshold.cxx:42
TileCondToolDspThreshold::~TileCondToolDspThreshold
virtual ~TileCondToolDspThreshold()
Definition
TileCondToolDspThreshold.cxx:25
TileCondToolDspThreshold::initialize
virtual StatusCode initialize() override
Definition
TileCondToolDspThreshold.cxx:30
TileCondToolDspThreshold::getMinimumAmplitudeThreshold
virtual float getMinimumAmplitudeThreshold(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const override
Definition
TileCondToolDspThreshold.cxx:51
TileCondToolDspThreshold::m_calibDspThresholdKey
SG::ReadCondHandleKey< TileCalibDataFlt > m_calibDspThresholdKey
Definition
TileCondToolDspThreshold.h:41
TileCondToolDspThreshold::getAmplitudeThresholds
virtual void getAmplitudeThresholds(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float &minimumThreshold, float &maximumThreshold) const override
Definition
TileCondToolDspThreshold.cxx:71
TileCondToolDspThreshold::getDspThreshold
virtual float getDspThreshold(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const override
Definition
TileCondToolDspThreshold.cxx:83
type
Generated on
for ATLAS Offline Software by
1.17.0