ATLAS Offline Software
Loading...
Searching...
No Matches
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
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
uint32_t CLID
The Class ID type.
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.
std::vector< std::vector< double > > & params()
virtual ~RIO_OnTrackErrorScaling()
std::string label(const std::string &format, int i)
Definition label.h:19