Added the ability to change the root file name

This commit is contained in:
David Baranyai 2017-10-31 21:26:25 +01:00
parent a3ca3e176b
commit 9b38d29283
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ class BM1DSave {
public: public:
BM1DSave(); BM1DSave();
~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<Double_t> t, std::vector<Double_t> 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<Double_t> t, std::vector<Double_t> x, const char* filename);
private: private:
TFile* fOut; TFile* fOut;

View File

@ -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<Double_t> t, std::vector<Double_t> 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<Double_t> t, std::vector<Double_t> x, const char* filename)
{ {
fOut = new TFile("result.root", "RECREATE"); fOut = new TFile(filename, "RECREATE");
TTree *BM1DTree = new TTree("BM1DTree","BM1DTree"); TTree *BM1DTree = new TTree("BM1DTree","BM1DTree");
TTree *DataTree = new TTree("DataTree","DataTree"); TTree *DataTree = new TTree("DataTree","DataTree");