Commit b51375cf authored by Plaszczynski Stephane's avatar Plaszczynski Stephane

correct case when Engine==0

parent 9ce363df
...@@ -4,7 +4,7 @@ use class * ...@@ -4,7 +4,7 @@ use class *
#compiler options #compiler options
#default is gcc here are the C++ compiler options #default is gcc here are the C++ compiler options
macro cppflags " -O2 -pipe -fPIC -Wall -Wno-reorder -Wno-sign-compare -Wno-unknown-pragmas" macro cppflags " -O2 -pipe -fPIC -Wall -Wno-reorder -Wno-sign-compare -Wno-unknown-pragmas -g"
#do we need optimzations here? #do we need optimzations here?
#macro_append cppflags "-ffast-math -m64 " #macro_append cppflags "-ffast-math -m64 "
......
...@@ -41,7 +41,7 @@ Chi2Combiner::~Chi2Combiner() ...@@ -41,7 +41,7 @@ Chi2Combiner::~Chi2Combiner()
for (size_t i=0;i<obs.size();i++) delete obs[i]; for (size_t i=0;i<obs.size();i++) delete obs[i];
double tot=timer->total(); double tot=timer->total();
//cout << __FILE__ << " :deleting Engine " << endl; //cout << __FILE__ << " :deleting Engine " << endl;
delete engine; if (engine) delete engine;
cout <<"TIMER TOTAL TIME=" << tot << " s\t=" << tot/60. << " min\t=" << tot/3600 << "h" << endl; cout <<"TIMER TOTAL TIME=" << tot << " s\t=" << tot/60. << " min\t=" << tot/3600 << "h" << endl;
delete timer; delete timer;
...@@ -88,18 +88,20 @@ Chi2Combiner::chi2_eff(const std::vector<double>& par) const { ...@@ -88,18 +88,20 @@ Chi2Combiner::chi2_eff(const std::vector<double>& par) const {
#pragma omp critical #pragma omp critical
{ {
self->OK=engine->updateParValues(par); if (engine){
} self->OK=engine->updateParValues(par);
if (!OK) { if (!OK) {
//A TUNER!!!!!!!!!!!!!1 //A TUNER!!!!!!!!!!!!!1
chi2=chi2_prev*10.; chi2=chi2_prev*10.;
self->iter++; self->iter++;
if(verbose) }
{ if(verbose)
os << "0\t" << chi2 << "\t" << timer->partial(); {
cout << os.str() << endl; os << "0\t" << chi2 << "\t" << timer->partial();
} cout << os.str() << endl;
return chi2; }
return chi2;
}
} }
//loop update chi2 observables //loop update chi2 observables
......
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