Skip to content
Snippets Groups Projects
Commit f99722ba authored by Bertram Kopf's avatar Bertram Kopf
Browse files

added suffix for current result file in PwaFcnBaseNew

parent 7a46061e
No related branches found
No related tags found
No related merge requests found
......@@ -233,7 +233,7 @@ int main(int __argc,char *__argv[]){
}
if (mode=="pwa"){
PwaFcnBaseNew theFcn(theLhPtr, theFitParamBase);
PwaFcnBaseNew theFcn(theLhPtr, theFitParamBase, jobOption);
MnUserParameters upar;
theFitParamBase->setMnUsrParams(upar, theStartparams, theErrorparams);
......
......@@ -17,10 +17,11 @@
using namespace ROOT::Minuit2;
PwaFcnBaseNew::PwaFcnBaseNew(boost::shared_ptr<AbsLhNew> absLh, boost::shared_ptr<FitParamsBaseNew> fitParamsBase) :
PwaFcnBaseNew::PwaFcnBaseNew(boost::shared_ptr<AbsLhNew> absLh, boost::shared_ptr<FitParamsBaseNew> fitParamsBase, std::string suffix) :
_absLhPtr(absLh)
, _fitParamsBasePtr(fitParamsBase)
, _fcnCounter(0)
, _currentResFileName("currentResult"+suffix+".dat")
{
if (0==_absLhPtr) { Alert << "AbsLh* _absLhPtr pointer is 0 !!!!" << endmsg; exit(1); }
_absLhPtr->getDefaultParams(_defaultFitValParms, _defaultFitErrParms);
......@@ -64,7 +65,7 @@ double PwaFcnBaseNew::operator()(const std::vector<double>& par) const
}
if ( _fcnCounter%200 == 0) {
std::ofstream theStream ( "currentResult.dat");
std::ofstream theStream (_currentResFileName.c_str());
_fitParamsBasePtr->dumpParams(theStream, theFitParmValTmp, theFitParmValTmp);
}
......
......@@ -3,6 +3,7 @@
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <boost/shared_ptr.hpp>
#include "Minuit2/FCNBase.h"
......@@ -19,7 +20,7 @@ namespace ROOT {
public:
PwaFcnBaseNew(boost::shared_ptr<AbsLhNew> absLh,
boost::shared_ptr<FitParamsBaseNew> fitParamsBase);
boost::shared_ptr<FitParamsBaseNew> fitParamsBase, std::string suffix="");
virtual ~PwaFcnBaseNew();
double operator()(const std::vector<double>& par) const;
......@@ -31,6 +32,7 @@ namespace ROOT {
mutable unsigned int _fcnCounter;
fitParamsNew _defaultFitValParms;
fitParamsNew _defaultFitErrParms;
std::string _currentResFileName;
};
} // namespace Minuit2
} // namespace ROOT
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment