ATLAS Offline Software
RIO_OnTrackErrorScaling.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
5 
7 
9 
12 }
13 
15  unsigned int n_paramter_sets,
16  const char* const* param_names,
17  unsigned int n_paramters) const
18 {
19  if (params().size() != n_paramter_sets ) {
20  std::stringstream message;
21  message << label << ": Expecting parameters for 2 parameters for";
22  for (unsigned int idx=0; idx < n_paramter_sets; ++idx) {
23  message << " " << param_names[idx];
24  }
25  message << " But got " << params().size() << ".";
26  throw std::runtime_error( message.str() );
27  }
28  for (unsigned int idx=0; idx<params().size(); ++idx) {
29  if (params()[idx].size() != n_paramters) {
30  assert( idx < n_paramter_sets );
31  std::stringstream message;
32  message << label << ": Expected 2 parameters for " << param_names[idx] << " but got " << params()[idx].size()
33  << ".";
34  throw std::runtime_error( message.str() );
35  }
36  }
37 }
38 
RIO_OnTrackErrorScaling::RIO_OnTrackErrorScaling
RIO_OnTrackErrorScaling()
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
RIO_OnTrackErrorScaling.h
ReweightUtils.message
message
Definition: ReweightUtils.py:15
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
ClassID_traits::ID
static const CLID & ID()
the CLID of T
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:50
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
RIO_OnTrackErrorScaling::~RIO_OnTrackErrorScaling
virtual ~RIO_OnTrackErrorScaling()
RIO_OnTrackErrorScaling::clid
virtual CLID clid() const
Definition: RIO_OnTrackErrorScaling.cxx:10
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
RIO_OnTrackErrorScaling::checkParameters
void checkParameters(const char *label, unsigned int n_paramter_sets, const char *const *param_names, unsigned int n_paramters) const
Convenience function to check whether the number of parameters is correct.
Definition: RIO_OnTrackErrorScaling.cxx:14
RIO_OnTrackErrorScaling::params
std::vector< std::vector< double > > & params()
Definition: RIO_OnTrackErrorScaling.h:29