ATO-98 - Connecting distortion trees - selection as an argument
authormivanov <marian.ivanov@cern.ch>
Sat, 22 Nov 2014 19:57:18 +0000 (20:57 +0100)
committermivanov <marian.ivanov@cern.ch>
Sat, 22 Nov 2014 21:51:01 +0000 (22:51 +0100)
TPC/Base/AliTPCcalibDButil.cxx
TPC/Base/AliTPCcalibDButil.h

index 56e6c3d..558638d 100644 (file)
@@ -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; itree<arrInputTreesDistortionCalib->GetEntriesFast(); ++itree) {
index 98f6aa3..137e6ce 100644 (file)
@@ -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: