ATLAS Offline Software
Loading...
Searching...
No Matches
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
9template<class T>
13
14template<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
25template<class T>
26const 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
37template<class T>
38void 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
Templated condition object to keep TileCalibDrawers.
virtual ~TileCalibData()
const T * getCalibDrawer(unsigned int drawerIdx) const
Return TileCalibDrawer of type T.
std::vector< const T * > m_calibDrawers
void setCalibDrawer(unsigned int drawerIdx, const T *calibDrawer)
Store TileCalibDrawer of type T The TileCalibData takes ownership of TileCalibDrawer.
Static class providing several utility functions and constants.
static const unsigned int MAX_DRAWERIDX
Maximal drawer index.