ATLAS Offline Software
Loading...
Searching...
No Matches
RIO_OnTrackErrorScalingKit.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
5#include <cstring> //for strcmp
6
7size_t RIO_OnTrackErrorScalingKit::getParamIndex(const std::string &name) const {
8 const char* const* param_names = paramNames();
9 size_t idx{};
10 for(; idx<nParametres(); ++idx) {
11 if (std::strcmp(param_names[idx],name.c_str())==0) break;
12 }
13 if (idx == nParametres()){
14 throw std::runtime_error("RIO_OnTrackErrorScaling parameter " + name + " not found.");
15 }
16 return idx;
17}
virtual size_t getParamIndex(const std::string &name) const
virtual unsigned int nParametres() const =0
virtual const char *const * paramNames() const =0