diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index a9eee4d8ef1878c0a5c68d5da21852ef425e6214..96179436bb25f5efc7b4f762645ff5e38d825376 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -191,6 +191,7 @@ InitStatus CbmL1::Init() fHistoDir->mkdir("Input"); fHistoDir->mkdir("Fit"); + fTableDir = gROOT->mkdir("L1Tables"); // turn on reconstruction in sub-detectors @@ -1208,14 +1209,24 @@ void CbmL1::Finish() boost::filesystem::path p = (FairRunAna::Instance()->GetUserOutputFileName()).Data(); std::string dir = p.parent_path().string(); if (dir.empty()) dir = "."; - std::string histoOutName = dir + "/L1_histo_" + p.filename().string(); - LOG(info) << "\033[31;1mHistograms will be saved to: \033[0m" << histoOutName; - - TFile* outfile = new TFile(histoOutName.c_str(), "RECREATE"); - outfile->cd(); - writedir2current(fHistoDir); - outfile->Close(); - outfile->Delete(); + { + std::string histoOutName = dir + "/L1_histo_" + p.filename().string(); + LOG(info) << "\033[31;1mL1 performance histograms will be saved to: \033[0m" << histoOutName; + TFile* outfile = new TFile(histoOutName.c_str(), "RECREATE"); + outfile->cd(); + writedir2current(fHistoDir); + outfile->Close(); + outfile->Delete(); + } + { + std::string tablesOutName = dir + "/L1_perftable_" + p.filename().string(); + LOG(info) << "\033[31;1mL1 performance tables will be saved to: \033[0m" << tablesOutName; + TFile* outfile = new TFile(tablesOutName.c_str(), "RECREATE"); + outfile->cd(); + writedir2current(fTableDir); + outfile->Close(); + outfile->Delete(); + } gFile = currentFile; gDirectory = curr; diff --git a/reco/L1/CbmL1.h b/reco/L1/CbmL1.h index 676a65878c3fae74629fc4d801c0e36103fea4ac..1bccc2849e16cc689c2ba66a4e796d4fae5ffb35 100644 --- a/reco/L1/CbmL1.h +++ b/reco/L1/CbmL1.h @@ -628,6 +628,7 @@ private: // TODO: move to a separate class (S.Zharko) TFile* fPerfFile {nullptr}; TDirectory* fHistoDir {nullptr}; + TDirectory* fTableDir {nullptr}; static const int fNTimeHistos = 22; TH1F* fTimeHisto[fNTimeHistos] {nullptr}; diff --git a/reco/L1/CbmL1Performance.cxx b/reco/L1/CbmL1Performance.cxx index 7fe6e9bf0d715d37d35875e3b5da0de329976d26..ce678187ac35ef78abce49f3dbd1b788386891cb 100644 --- a/reco/L1/CbmL1Performance.cxx +++ b/reco/L1/CbmL1Performance.cxx @@ -286,8 +286,8 @@ void CbmL1::EfficienciesPerformance() TL1PerfEfficiencies ntra; // efficiencies for current event - ntra.fOutDir = fHistoDir; // Setup a pointer for output directory - L1_NTRA.fOutDir = fHistoDir; // Save average efficiencies + ntra.fOutDir = fTableDir; // Setup a pointer for output directory + L1_NTRA.fOutDir = fTableDir; // Save average efficiencies for (vector<CbmL1Track>::iterator rtraIt = fvRecoTracks.begin(); rtraIt != fvRecoTracks.end(); ++rtraIt) { ntra.ghosts += rtraIt->IsGhost();