]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Helper method to create input chain AOD with friend AODVertexingHF (A.Rossi)
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Mar 2009 12:08:07 +0000 (12:08 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Mar 2009 12:08:07 +0000 (12:08 +0000)
PWG3/vertexingHF/AliAnalysisTaskSECompareHFTest.C

index c6e680f0e06c88a9848ba47e92396b18b9e7247c..932dcabf36e37122783270d0c26ae321518dd5f8 100644 (file)
@@ -12,7 +12,9 @@ void AliAnalysisTaskSECompareHFTest()
 \r
   Bool_t useParFiles=kFALSE;\r
 \r
+\r
   gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/LoadLibraries.C");\r
+  gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/MakeAODInputChain.C");\r
   LoadLibraries(useParFiles);\r
 \r
   if(analysisMode=="grid") TGrid::Connect("alien:",0,0,"t");\r
@@ -21,31 +23,16 @@ void AliAnalysisTaskSECompareHFTest()
 \r
 \r
   TChain *chainAOD = 0;\r
-  TChain *chainAODfriend = 0;\r
   \r
   if(inputMode=="list") {\r
     // Local files\r
-    chainAOD = new TChain("aodTree");\r
-    chainAODfriend = new TChain("aodTree");\r
-    // set the path to the files (can be local or on alien)\r
-    chainAOD->Add(      "alien:///alice/cern.ch/user/r/rbala/analysis/out_lhcw/290001/2/AliAOD.root");\r
-    chainAODfriend->Add("alien:///alice/cern.ch/user/r/rbala/analysis/out_lhcw/290001/2/AliAOD.VertexingHF.root");\r
-    // ... add more if needed\r
+    //chainAOD = MakeAODInputChain();// with this it reads ./AliAOD.root and ./AliAOD.VertexingHF.root\r
+    chainAOD = MakeAODInputChain("alien:///alice/cern.ch/user/r/rbala/analysis/out_lhcw/290001/",2,2);\r
   } else if(inputMode=="xml") {\r
-    // xml: need to check the 1-to-1 correspondence\r
-    TString collectionfileAOD       = "collection_aod.xml";\r
-    TString collectionfileAODfriend = "collection_aodHF.xml";\r
-    TAlienCollection *collectionAOD       = TAlienCollection::Open(collectionfileAOD.Data());\r
-    TAlienCollection *collectionAODfriend = TAlienCollection::Open(collectionfileAODfriend.Data());\r
-    chainAOD = new TChain("aodTree");\r
-    chainAODfriend = new TChain("aodTree");\r
-    while(collectionAOD->Next())       chainAOD->Add(collectionAOD->GetTURL(""));\r
-    while(collectionAODfriend->Next()) chainAODfriend->Add(collectionAODfriend->GetTURL(""));\r
+    // xml\r
+    chainAOD = MakeAODInputChain("collection_aod.xml","collection_aodHF.xml");\r
   }\r
 \r
-  // attach the friend chain\r
-  chainAOD->AddFriend(chainAODfriend);\r
-\r
   // Create the analysis manager\r
   AliAnalysisManager *mgr  = new AliAnalysisManager("My Manager","My Manager");\r
   mgr->SetDebugLevel(10);\r