Commit b51375cf authored by Plaszczynski Stephane's avatar Plaszczynski Stephane

correct case when Engine==0

parent 9ce363df
......@@ -4,7 +4,7 @@ use class *
#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?
#macro_append cppflags "-ffast-math -m64 "
......
......@@ -41,7 +41,7 @@ Chi2Combiner::~Chi2Combiner()
for (size_t i=0;i<obs.size();i++) delete obs[i];
double tot=timer->total();
//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;
delete timer;
......@@ -88,12 +88,13 @@ Chi2Combiner::chi2_eff(const std::vector<double>& par) const {
#pragma omp critical
{
if (engine){
self->OK=engine->updateParValues(par);
}
if (!OK) {
//A TUNER!!!!!!!!!!!!!1
chi2=chi2_prev*10.;
self->iter++;
}
if(verbose)
{
os << "0\t" << chi2 << "\t" << timer->partial();
......@@ -101,6 +102,7 @@ Chi2Combiner::chi2_eff(const std::vector<double>& par) const {
}
return chi2;
}
}
//loop update chi2 observables
#pragma omp parallel
......
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