SmallPMTCalibData.cc
Go to the documentation of this file.
1 #include <sevt/SmallPMTCalibData.h>
2 #include <utl/ErrorLogger.h>
3 #include <utl/AugerException.h>
4 #include <sstream>
5 
6 
7 namespace sevt {
8 
9  template<typename T, std::size_t n>
10  T&
11  SmallPMTCalibData::Checked(T (&a)[n], const unsigned int i)
12  {
13  if (1 <= i && i <= n)
14  return a[i - 1];
15  std::ostringstream err;
16  err << "Invalid LargePMT id " << i;
17  ERROR(err);
18  throw utl::NonExistentComponentException(err.str());
19  }
20 
21 #define INST(_T_) template _T_& SmallPMTCalibData::Checked(_T_ (&)[3], const unsigned int)
22 
23  INST(double);
24  INST(const double);
25 
26 }
static T & Checked(T(&)[n], const unsigned int i)
Base class for exceptions trying to access non-existing components.
#define INST(_T_)
#define ERROR(message)
Macro for logging error messages.
Definition: ErrorLogger.h:165

, generated on Tue Sep 26 2023.