ATLAS Offline Software
TileCalibData.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
9 template<class T>
10 TileCalibData<T>::TileCalibData() : m_calibDrawers(TileCalibUtils::MAX_DRAWERIDX, nullptr) {
11 
12 }
13 
14 template<class T>
16 
17  //=== Delete TileCalibDrawers (which do not own the blob)
18  std::set<const T*> uniqueDrawers(m_calibDrawers.begin(), m_calibDrawers.end());
19  for (const T* calibDrawer : uniqueDrawers) {
20  delete calibDrawer;
21  }
22 
23 }
24 
25 template<class T>
26 const T* TileCalibData<T>::getCalibDrawer(unsigned int drawerIdx) const {
27 
28  if (drawerIdx >= TileCalibUtils::MAX_DRAWERIDX) {
29 
30  throw TileCalib::IndexOutOfRange("TileCalibData::getCalibDrawer()",
32  }
33 
34  return m_calibDrawers[drawerIdx];
35 }
36 
37 template<class T>
38 void TileCalibData<T>::setCalibDrawer(unsigned int drawerIdx, const T* calibDrawer) {
39 
40  if (drawerIdx >= TileCalibUtils::MAX_DRAWERIDX) {
41 
42  throw TileCalib::IndexOutOfRange("TileCalibData::setCalibDrawer()",
44  }
45 
46  m_calibDrawers[drawerIdx] = calibDrawer;
47 }
48 
49 
TileCalibData::setCalibDrawer
void setCalibDrawer(unsigned int drawerIdx, const T *calibDrawer)
Store TileCalibDrawer of type T The TileCalibData takes ownership of TileCalibDrawer.
Definition: TileCalibData.cxx:38
TileCalib::IndexOutOfRange
Thrown if an index is out of range.
Definition: TileCalorimeter/TileCalib/TileCalibBlobObjs/TileCalibBlobObjs/Exception.h:141
TileCalibData.h
TileCalibData::~TileCalibData
virtual ~TileCalibData()
Definition: TileCalibData.cxx:15
TileCalibData::TileCalibData
TileCalibData()
Definition: TileCalibData.cxx:10
TileCalibUtils::MAX_DRAWERIDX
static const unsigned int MAX_DRAWERIDX
Maximal drawer index
Definition: TileCalibUtils.h:143
TileCalibUtils
Static class providing several utility functions and constants.
Definition: TileCalibUtils.h:15
TileCalibData
Templated condition object to keep TileCalibDrawers.
Definition: TileCalibData.h:26
TileCalibUtils.h
TileCalibData::getCalibDrawer
const T * getCalibDrawer(unsigned int drawerIdx) const
Return TileCalibDrawer of type T.
Definition: TileCalibData.cxx:26
BchCleanup.calibDrawer
calibDrawer
Definition: BchCleanup.py:217
Exception.h
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35