diff --git a/include/BM1DSave.hh b/include/BM1DSave.hh index fd31976..39c9e24 100644 --- a/include/BM1DSave.hh +++ b/include/BM1DSave.hh @@ -21,7 +21,7 @@ class BM1DSave { public: BM1DSave(); ~BM1DSave(); - void SaveToTree(TMultiGraph *mg, Int_t p0, Int_t p1, Int_t nSteps, Int_t nRuns, Double_t x1, Double_t x2, Double_t mu1, Double_t mu2, Double_t sigma1, Double_t sigma2, std::vector t, std::vector x); + void SaveToTree(TMultiGraph *mg, Int_t p0, Int_t p1, Int_t nSteps, Int_t nRuns, Double_t x1, Double_t x2, Double_t mu1, Double_t mu2, Double_t sigma1, Double_t sigma2, std::vector t, std::vector x, const char* filename); private: TFile* fOut; diff --git a/src/BM1DSave.cc b/src/BM1DSave.cc index b1d21f4..d281c42 100644 --- a/src/BM1DSave.cc +++ b/src/BM1DSave.cc @@ -10,9 +10,9 @@ BM1DSave::~BM1DSave() } -void BM1DSave::SaveToTree(TMultiGraph *mg, Int_t p0, Int_t p1, Int_t nSteps, Int_t nRuns, Double_t x1, Double_t x2, Double_t mu1, Double_t mu2, Double_t sigma1, Double_t sigma2, std::vector t, std::vector x) +void BM1DSave::SaveToTree(TMultiGraph *mg, Int_t p0, Int_t p1, Int_t nSteps, Int_t nRuns, Double_t x1, Double_t x2, Double_t mu1, Double_t mu2, Double_t sigma1, Double_t sigma2, std::vector t, std::vector x, const char* filename) { - fOut = new TFile("result.root", "RECREATE"); + fOut = new TFile(filename, "RECREATE"); TTree *BM1DTree = new TTree("BM1DTree","BM1DTree"); TTree *DataTree = new TTree("DataTree","DataTree");