X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/7ebf4164400b973bba97887d7852bc07801206b7..238fccf7dd50a69b5825f4544b3e247bfbf4e417:/paraq.cpp?ds=inline diff --git a/paraq.cpp b/paraq.cpp index 381941f..87ec773 100644 --- a/paraq.cpp +++ b/paraq.cpp @@ -114,7 +114,8 @@ double& paraq::operator[] (string paraid) { return defaultPara[paraid]; } - return masterdefault; + cerr << "PARAQ: Parameter " << paraid << " does not exist!" << endl << flush; + exit(1); } int paraq::getTotalJobs() { @@ -129,3 +130,24 @@ void paraq::uniqueAllParaIdsAdd(const string& paraid) { allParaIds.push_back(paraid); } + +string paraq::getParaNames() { + stringstream paranames; + + for (vector::iterator parait = allParaIds.begin(); parait != allParaIds.end(); ++parait) + paranames << *parait << ":"; + + return paranames.str(); +} + +string paraq::getParaVals() { + stringstream paravals; + + for (vector::iterator parait = allParaIds.begin(); parait != allParaIds.end(); ++parait) { + if ( parait != allParaIds.begin() ) + paravals << "\t"; + paravals << (*this)[*parait]; + } + + return paravals.str(); +}