Gitlab is now running v13.9.0 - More info -> here <-

Commit 9ce363df authored by Plaszczynski Stephane's avatar Plaszczynski Stephane

change Chi2fcatory method from static to virtual to allow more general contexts

parent e9691dd6
......@@ -10,7 +10,7 @@
//
// History (add to end):
// creation: Tue Sep 18 13:34:11 CEST 2012
//
// SP: 19 sep19 change to virtual to allow other context analyses
//------------------------------------------------------------------------
#ifndef Chi2Factory_hh
......@@ -25,7 +25,7 @@ class Chi2Factory
public:
//this will build a chi2 combination from the Parser: engine inside
static Chi2Combiner* gimeChi2(Parser& p);
virtual Chi2Combiner* gimeChi2(Parser& p);
};
......
......@@ -82,7 +82,8 @@ int main(int argc, char *argv[])
//---------------------------------------------------------
Chi2Combiner* chi2=Chi2Factory::gimeChi2(parser);
Chi2Factory cosmofac;
Chi2Combiner* chi2=cosmofac.gimeChi2(parser);
chi2->setVerbose(false);
planck_lkh* lkh=new planck_lkh(chi2,parser);
......
......@@ -89,7 +89,8 @@ int main(int argc,char** argv){
try{
MnUserParameters uparClass(parserClass.vars());
Chi2Combiner* theChi2Class=Chi2Factory::gimeChi2(parserClass);
Chi2Factory cosmofac;
Chi2Combiner* theChi2Class=cosmofac.gimeChi2(parserClass);
theChi2Class->setVerbose(false);
......
......@@ -99,7 +99,8 @@ int main(int argc,char** argv){
//le chi2: Cl-combiner
Chi2Combiner* theChi2=Chi2Factory::gimeChi2(parser);
Chi2Factory cosmofac;
Chi2Combiner* theChi2=cosmofac.gimeChi2(parser);
//minimisation
try{
......
......@@ -91,7 +91,8 @@ int main(int argc,char** argv){
bool profile=true;
//le chi2: Cl-combiner
Chi2Combiner* theChi2=Chi2Factory::gimeChi2(parser);
Chi2Factory cosmofac;
Chi2Combiner* theChi2=cosmofac.gimeChi2(parser);
theChi2->setVerbose(true);
MnUserParameters upar(parser.vars());
......
......@@ -90,7 +90,8 @@ int main(int argc,char** argv){
bool profile=parser.params.find<bool>("profile",false);
//le chi2: Cl-combiner
Chi2Combiner* theChi2=Chi2Factory::gimeChi2(parser);
Chi2Factory cosmofac;
Chi2Combiner* theChi2=cosmofac.gimeChi2(parser);
theChi2->setVerbose(true);
MnUserParameters upar(parser.vars());
......
......@@ -75,7 +75,8 @@ int main(int argc,char** argv){
bool profile=parser.params.find<bool>("profile",false);
Chi2Combiner* theChi2=Chi2Factory::gimeChi2(parser);
Chi2Factory cosmofac;
Chi2Combiner* theChi2=cosmofac.gimeChi2(parser);
//le table au qui garde les valeurs
......
......@@ -26,7 +26,8 @@ int main(int argc,char** argv){
/** Get global chi2 **/
Chi2Combiner* theChi2 = Chi2Factory::gimeChi2(parser);
Chi2Factory cosmofac;
Chi2Combiner* theChi2 = cosmofac.gimeChi2(parser);
......
......@@ -18,7 +18,8 @@ int main(int argc,char** argv){
Parser parser(argv[1]);
//get global chi2
Chi2Combiner* theChi2=Chi2Factory::gimeChi2(parser);
Chi2Factory cosmofac;
Chi2Combiner* theChi2=cosmofac.gimeChi2(parser);
theChi2->setVerbose(true);
//valeur chi2
......
......@@ -27,7 +27,8 @@ int main(int argc,char** argv){
//get global chi2
//if we use /src/Main/MCMC/camspec/camspec-julien.par this adds BAO
Chi2Combiner* theChi2=Chi2Factory::gimeChi2(parser);
Chi2Factory cosmofac;
Chi2Combiner* theChi2=cosmofac.gimeChi2(parser);
//valeur chi2
vector<double> val=parser.vars().Params();
......
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