ATLAS Offline Software
Loading...
Searching...
No Matches
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//____________________________________________________________________
16TileCondToolDspThreshold::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//____________________________________________________________________
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//____________________________________________________________________
51float 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//____________________________________________________________________
61float 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//____________________________________________________________________
71void 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//____________________________________________________________________
83float 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
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
Helpers for checking error return status codes and reporting errors.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
TileCondToolDspThreshold(const std::string &type, const std::string &name, const IInterface *parent)
virtual float getMaximumAmplitudeThreshold(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const override
virtual StatusCode finalize() override
virtual StatusCode initialize() override
virtual float getMinimumAmplitudeThreshold(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const override
SG::ReadCondHandleKey< TileCalibDataFlt > m_calibDspThresholdKey
virtual void getAmplitudeThresholds(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float &minimumThreshold, float &maximumThreshold) const override
virtual float getDspThreshold(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const override