diff --git a/src/classes/PMsrHandler.cpp b/src/classes/PMsrHandler.cpp index ee0ab0d9..a0215d61 100644 --- a/src/classes/PMsrHandler.cpp +++ b/src/classes/PMsrHandler.cpp @@ -209,9 +209,17 @@ int PMsrHandler::ReadMsrFile() if (!HandleStatisticEntry(statistic)) error = PMUSR_MSR_SYNTAX_ERROR; - // fill parameter in use vector + // fill parameter-in-use vector FillParameterInUse(theory, functions, run); + // check that parameter names are unique + unsigned int parX, parY; + if (!CheckUniquenessOfParamNames(parX, parY)) { + cout << endl << "PMsrHandler::ReadMsrFile: **SEVERE ERROR** parameter name " << fParam[parX].fName.Data() << " is identical for parameter no " << fParam[parX].fNo << " and " << fParam[parY].fNo << "!"; + cout << endl << "Needs to be fixed first!"; + error = PMUSR_MSR_SYNTAX_ERROR; + } + // clean up fit_parameter.clear(); theory.clear(); @@ -2100,16 +2108,41 @@ void PMsrHandler::FillParameterInUse(PMsrLines &theory, PMsrLines &funcs, PMsrLi } } -/* -cout << endl << ">> fParamInUse: "; -for (unsigned int i=0; i> fParamInUse: "; +// for (unsigned int i=0; i + * + * \param parX + * \param parY + */ +bool PMsrHandler::CheckUniquenessOfParamNames(unsigned int &parX, unsigned int &parY) +{ + bool unique = true; + + for (unsigned int i=0; iEval(i,map,param); } virtual int ParameterInUse(unsigned int paramNo); + virtual bool CheckUniquenessOfParamNames(unsigned int &parX, unsigned int &parY); private: TString fFileName;