11 #include "BCParameterSet.h"
14 #include "BCParameter.h"
24 for (
unsigned int i = 0; i < fPars.size() ; ++i)
25 if ( parameter->
GetName() == fPars[i]->GetName() ) {
26 BCLog::OutError(TString::Format(
"BCParameterSet::Add : Parameter with name %s exists already. ",
32 fPars.push_back(parameter);
37 void BCParameterSet::Clear(
bool hard)
40 for (
unsigned int i = 0; i < fPars.size() ; ++i)
50 if (index >= fPars.size()) {
51 BCLog::OutError(TString::Format(
"BCParameterSet::%s : Parameter index %u out of range", caller.c_str(), index));
61 for (
unsigned int i=0; i < fPars.size() ; ++i)
62 if (name == fPars[i]->GetName())
65 BCLog::OutWarning(TString::Format(
"BCParameterSet::Index: no parameter named '%s'", name.c_str()));
bool Add(BCParameter *par)
bool ValidIndex(unsigned index, const std::string caller="CheckIndex") const
A class representing a parameter of a model.
unsigned Index(const std::string &name) const
const std::string & GetName() const