ATLAS Offline Software
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 //____________________________________________________________________
16 static const InterfaceID IID_TileCondToolAutoCr("TileCondToolAutoCr", 1, 0);
17 
18 const InterfaceID& TileCondToolAutoCr::interfaceID() {
19  return IID_TileCondToolAutoCr;
20 }
21 
22 //
23 //____________________________________________________________________
24 TileCondToolAutoCr::TileCondToolAutoCr(const std::string& type, const std::string& name,
25  const IInterface* parent)
27 {
28  declareInterface<TileCondToolAutoCr>(this);
29 
30 }
31 
32 //
33 //____________________________________________________________________
35 }
36 
37 //
38 //____________________________________________________________________
40 
41  ATH_MSG_DEBUG( "In initialize()" );
42 
43  //=== Initialize conditions data key with auto correlations
44  ATH_CHECK( m_calibAutorCorrelationKey.initialize() );
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 
60 void 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 }
TileCalibDrawerFlt
Generic class for storing a number of floats (Flt) for each channel or ADC.
Definition: TileCalibDrawerFlt.h:27
TileCalibDrawerFlt.h
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
TileCondToolAutoCr.h
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
ReadCondHandle.h
TileCondToolAutoCr::initialize
virtual StatusCode initialize() override
Definition: TileCondToolAutoCr.cxx:39
TileCalibData::getCalibDrawer
const T * getCalibDrawer(unsigned int drawerIdx) const
Return TileCalibDrawer of type T.
Definition: TileCalibData.cxx:26
TileCondToolAutoCr::interfaceID
static const InterfaceID & interfaceID()
Definition: TileCondToolAutoCr.cxx:18
lumiFormat.i
int i
Definition: lumiFormat.py:85
TileCondToolAutoCr::~TileCondToolAutoCr
virtual ~TileCondToolAutoCr()
Definition: TileCondToolAutoCr.cxx:34
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
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TileCondToolAutoCr::m_calibAutorCorrelationKey
SG::ReadCondHandleKey< TileCalibDataFlt > m_calibAutorCorrelationKey
Definition: TileCondToolAutoCr.h:34
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TileCondToolAutoCr::getAutoCorr
void getAutoCorr(unsigned int drawerIdx, unsigned int channel, unsigned int adc, std::vector< float > &vec) const
Definition: TileCondToolAutoCr.cxx:60
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
errorcheck.h
Helpers for checking error return status codes and reporting errors.
TileCondToolAutoCr::TileCondToolAutoCr
TileCondToolAutoCr(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TileCondToolAutoCr.cxx:24
BchCleanup.calibDrawer
calibDrawer
Definition: BchCleanup.py:217
TileCondToolAutoCr::finalize
virtual StatusCode finalize() override
Definition: TileCondToolAutoCr.cxx:51
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthAlgTool
Definition: AthAlgTool.h:26