ATLAS Offline Software
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
8 
9 // Athena includes
12 
13 
14 //
15 //____________________________________________________________________
16 TileCondToolDspThreshold::TileCondToolDspThreshold(const std::string& type, const std::string& name, const IInterface* parent)
18 {
19  declareInterface<ITileCondToolDspThreshold>(this);
20  declareInterface<TileCondToolDspThreshold>(this);
21 }
22 
23 //
24 //____________________________________________________________________
26 }
27 
28 //
29 //____________________________________________________________________
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 //____________________________________________________________________
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 
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 
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 
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 
86  return calibDspThreshold->getCalibDrawer(drawerIdx)->getData(channel, adc, 2);
87 
88 }
89 
TileCondToolDspThreshold::m_calibDspThresholdKey
SG::ReadCondHandleKey< TileCalibDataFlt > m_calibDspThresholdKey
Definition: TileCondToolDspThreshold.h:41
TileCalibDrawerFlt.h
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ReadCondHandle.h
TileCondToolDspThreshold::finalize
virtual StatusCode finalize() override
Definition: TileCondToolDspThreshold.cxx:42
TileCondToolDspThreshold::~TileCondToolDspThreshold
virtual ~TileCondToolDspThreshold()
Definition: TileCondToolDspThreshold.cxx:25
TileCondToolDspThreshold::getMinimumAmplitudeThreshold
virtual float getMinimumAmplitudeThreshold(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const override
Definition: TileCondToolDspThreshold.cxx:51
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
TileCondToolDspThreshold::getDspThreshold
virtual float getDspThreshold(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const override
Definition: TileCondToolDspThreshold.cxx:83
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TileCondToolDspThreshold::getMaximumAmplitudeThreshold
virtual float getMaximumAmplitudeThreshold(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const override
Definition: TileCondToolDspThreshold.cxx:61
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
errorcheck.h
Helpers for checking error return status codes and reporting errors.
TileCondToolDspThreshold.h
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::TileCondToolDspThreshold
TileCondToolDspThreshold(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TileCondToolDspThreshold.cxx:16
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TileCondToolDspThreshold::initialize
virtual StatusCode initialize() override
Definition: TileCondToolDspThreshold.cxx:30
AthAlgTool
Definition: AthAlgTool.h:26