From 2a81a4d9063687a74428d7db30f5abdbd9e2ed40 Mon Sep 17 00:00:00 2001 From: mivanov Date: Sat, 22 Nov 2014 20:57:18 +0100 Subject: [PATCH] ATO-98 - Connecting distortion trees - selection as an argument --- TPC/Base/AliTPCcalibDButil.cxx | 11 ++++++++--- TPC/Base/AliTPCcalibDButil.h | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/TPC/Base/AliTPCcalibDButil.cxx b/TPC/Base/AliTPCcalibDButil.cxx index 5bf4fe70409..ec0e184937c 100644 --- a/TPC/Base/AliTPCcalibDButil.cxx +++ b/TPC/Base/AliTPCcalibDButil.cxx @@ -3324,7 +3324,7 @@ TTree* AliTPCcalibDButil::ConnectPulserTrees(TString baseDir, TTree *tMain) } -TTree* AliTPCcalibDButil::ConnectDistortionTrees(TString baseDir, TTree *tMain){ +TTree* AliTPCcalibDButil::ConnectDistortionTrees(TString baseDir, TString selection, TTree *tMain){ // // baseDir: Base directory with Distortion information // TTrees are added to the base tree as a friend tree @@ -3333,9 +3333,14 @@ TTree* AliTPCcalibDButil::ConnectDistortionTrees(TString baseDir, TTree *tMain){ // === add the calibDistortion trees ====================================== //TString inputTreesDistortionCalib = gSystem->GetFromPipe(Form("ls %s/calibDistortion/20*/*.tree.root",baseDir.Data())); // TString baseDir="$NOTES/reconstruction/distortionFit/"; TTree *tMain=0; + // AliTPCcalibDButil::ConnectDistortionTrees("$NOTES/reconstruction/distortionFit/", "calibTimeResHisto.root", 0); - - TString inputTreesDistortionCalib = gSystem->GetFromPipe(Form("find %s -iname \"calibTimeResHisto.root\"",baseDir.Data())); + TString inputTreesDistortionCalib = ""; + if (selection.Contains(".list")){ + inputTreesDistortionCalib=gSystem->GetFromPipe(Form("cat %s",selection.Data())); + }else{ + inputTreesDistortionCalib=gSystem->GetFromPipe(Form("find %s -iname \"%s\"",baseDir.Data(),selection.Data())); + } TObjArray *arrInputTreesDistortionCalib = inputTreesDistortionCalib.Tokenize("\n"); // for (Int_t itree=0; itreeGetEntriesFast(); ++itree) { diff --git a/TPC/Base/AliTPCcalibDButil.h b/TPC/Base/AliTPCcalibDButil.h index 98f6aa3464b..137e6ce7b68 100644 --- a/TPC/Base/AliTPCcalibDButil.h +++ b/TPC/Base/AliTPCcalibDButil.h @@ -181,7 +181,7 @@ public: static TTree* ConnectGainTrees(TString baseDir); static TTree* ConnectPulserTrees(TString baseDir, TTree * tree=0); //static TTree* ConnectNoiseTrees(TString baseDir, TTree * tree=0); - static TTree* ConnectDistortionTrees(TString baseDir, TTree *tMain); + static TTree* ConnectDistortionTrees(TString baseDir, TString selection, TTree *tMain); static TTree* ConnectCalPadTrees(TString baseDir, TString pattern, TTree *tMain, Bool_t checkAliases); private: -- 2.43.5