X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/7ebf4164400b973bba97887d7852bc07801206b7..db68c55d4535522352b71a8d69d3a38ba97c67a5:/paraq.cpp?ds=sidebyside 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(); +}