Commit 761d9322 authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

protect constraints in Parser

parent b79f03e6
......@@ -217,8 +217,8 @@ Chi2Factory::gimeChi2(Parser& parser){
//constrainte gaussienne: passed throught strings
for (size_t i=0;i<parser.cons.size();i++){
string line= parser.cons[i];
for (size_t i=0;i<parser.constraints().size();i++){
string line= parser.constraints()[i];
istringstream stream(line);
string token,tag;
stream >> token;
......@@ -41,35 +41,39 @@ public:
// destructor
//acess to all Variables
const Variables& vars() const {return user_par;}
const std::vector<std::string> constraints() const {return cons;}
//Minuit related
inline int mnStrategy() {return params.find<int>("set_stra",1);}
inline double mnTol() { return params.find<double>("set_tol",0.1);}
inline double mnRemoveLimits() { return params.find<bool>("remove_limits",false);}
inline bool mnContours() {return params.find<bool>("computecontour",false);}
//inline string precisionFile() {return params.find<string>("precisionFile","");}
//MCMC related: derived par
std::vector<std::string> derived;
//utlity to access filenames/dir: if not found build path relative to PARFILE dir (your par/ directory)
static std::string getParFile(const std::string& filename);
static std::string getParDir(const std::string& dirname);
//acess to all Variables
const Variables& vars() const {return user_par;}
//derived par
std::vector<std::string> derived;
//for constraints
std::vector<std::string> cons;
//CLASS spexific paarmeters
ClassParams classparms;
//access to paramfile details: see cxxutils/paramfile
//access to all other keywords through this (see cxxutils/paramfile.h)
paramfile params;
Variables user_par;
std::vector<std::string> cons;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment