diff --git a/src/classes/PMsr2Data.cpp b/src/classes/PMsr2Data.cpp index 6d9171a4..bc8132de 100644 --- a/src/classes/PMsr2Data.cpp +++ b/src/classes/PMsr2Data.cpp @@ -697,6 +697,14 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const std::string & // std::cout << "debug> " << msrParamList->at(i).fNo << ": " << msrParamList->at(i).fName.Data() << " is global: " << msrParamList->at(i).fIsGlobal << std::endl; } + // there should be at least one run specific parameter, otherwise the GLOBAL option doesn't make sense + if (fNumSpecParam == 0) { + std::cout << ">> msr2data: **ERROR** found NO run specific parameter, hence the GLOBAL option doesn't make sense." << std::endl; + std::cout << ">> msr2data: Could it be, that your run specific labling is < 4 digits? Please check your msr-Input-File." << std::endl; + return false; + } + + // check if parameters have been sorted correctly from the beginning bool wasSorted(true); for (unsigned int i(0); i < fNumGlobalParam; ++i) { diff --git a/src/msr2data.cpp b/src/msr2data.cpp index 4f8ad9c9..be551d47 100644 --- a/src/msr2data.cpp +++ b/src/msr2data.cpp @@ -765,7 +765,7 @@ int main(int argc, char *argv[]) // Check if all given run numbers are covered by the formatting of the data file name status = msr2dataHandler->CheckRunNumbersInRange(); - if(status) { + if (status) { std::cerr << std::endl; std::cerr << ">> msr2data: **ERROR** At least one given run number is out of range! Quitting..." << std::endl; return status;