ATLAS Offline Software
Loading...
Searching...
No Matches
TileCondToolAutoCr.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
6// Tile includes
9
10// Athena includes
13
14//
15//____________________________________________________________________
16static const InterfaceID IID_TileCondToolAutoCr("TileCondToolAutoCr", 1, 0);
17
18const InterfaceID& TileCondToolAutoCr::interfaceID() {
20}
21
22//
23//____________________________________________________________________
24TileCondToolAutoCr::TileCondToolAutoCr(const std::string& type, const std::string& name,
25 const IInterface* parent)
26 : AthAlgTool(type, name, parent)
27{
28 declareInterface<TileCondToolAutoCr>(this);
29
30}
31
32//
33//____________________________________________________________________
36
37//
38//____________________________________________________________________
40
41 ATH_MSG_DEBUG( "In initialize()" );
42
43 //=== Initialize conditions data key with auto correlations
45
46 return StatusCode::SUCCESS;
47}
48
49//
50//____________________________________________________________________
52
53 ATH_MSG_DEBUG( "finalize called" );
54 return StatusCode::SUCCESS;
55}
56
57//
58//____________________________________________________________________
59
60void TileCondToolAutoCr::getAutoCorr(unsigned int drawerIdx,
61 unsigned int channel,
62 unsigned int adc,
63 std::vector<float>& vec) const {
64
65
67 const TileCalibDrawerFlt* calibDrawer = calibAutoCorrelation->getCalibDrawer(drawerIdx);
68 const unsigned int nElements(calibDrawer->getObjSizeUint32());
69
70 if (vec.size() != nElements) {
71 vec.resize(nElements);
72 }
73
74 for (unsigned int i = 0; i < nElements; ++i) {
75 vec[i] = calibDrawer->getData(channel, adc, i);
76 }
77}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
std::vector< size_t > vec
Helpers for checking error return status codes and reporting errors.
static const InterfaceID IID_TileCondToolAutoCr("TileCondToolAutoCr", 1, 0)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Generic class for storing a number of floats (Flt) for each channel or ADC.
virtual StatusCode initialize() override
virtual StatusCode finalize() override
TileCondToolAutoCr(const std::string &type, const std::string &name, const IInterface *parent)
SG::ReadCondHandleKey< TileCalibDataFlt > m_calibAutorCorrelationKey
void getAutoCorr(unsigned int drawerIdx, unsigned int channel, unsigned int adc, std::vector< float > &vec) const
static const InterfaceID & interfaceID()