Recover the AOD test
authorhristov <Peter.Hristov@cern.ch>
Thu, 9 Jan 2014 17:17:25 +0000 (18:17 +0100)
committerhristov <Peter.Hristov@cern.ch>
Thu, 9 Jan 2014 17:21:49 +0000 (18:21 +0100)
12 files changed:
STEER/CreateAODfromESD.C
test/PbPbbench/aod.C
test/PbPbbench/recraw/aod.C
test/genkine/sim/aod.C
test/gun/aod.C
test/gun/recraw/aod.C
test/merge/runtest.sh
test/pileup/aod.C
test/pileup/runtest.sh
test/ppbench/aod.C
test/ppbench/recraw/aod.C
test/pploadlibs/aod.C

index 5772a1f..cc31e2c 100644 (file)
@@ -1,3 +1,4 @@
+#include <cstring>
 #include <TChain.h>
 #include <TSystem.h>
 #include "AliAnalysisManager.h"
@@ -5,26 +6,15 @@
 #include "AliAODHandler.h"
 #include "AliAnalysisTaskESDfilter.h"
 #include "AliAnalysisDataContainer.h"
+#include "AliTaskCDBconnect.h"
 
 void CreateAODfromESD(const char *inFileName = "AliESDs.root",
                      const char *outFileName = "AliAOD.root",
+                     const char *cdbLocation = "raw://",
+                     const char *grpSpecific = "",
                      Bool_t bKineFilter = kTRUE) 
 {
   
-    // gSystem->Load("libTree");
-    // gSystem->Load("libGeom");
-    // gSystem->Load("libPhysics");
-    // gSystem->Load("libVMC");
-    // gSystem->Load("libSTEERBase");
-    // gSystem->Load("libESD");
-    // gSystem->Load("libAOD");
-    
-    // gSystem->Load("libANALYSIS");
-    // gSystem->Load("libANALYSISalice");
-    // gSystem->Load("libCORRFW");
-    // gSystem->Load("libPWGHFbase");
-    // gSystem->Load("libPWGmuon");
-
     TChain *chain = new TChain("esdTree");
     // Steering input chain
     chain->Add(inFileName);
@@ -34,6 +24,7 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
     AliESDInputHandler* inpHandler = new AliESDInputHandler();
     inpHandler->SetReadFriends(kFALSE);
     inpHandler->SetReadTags();
+    inpHandler->NeedField();
     mgr->SetInputEventHandler  (inpHandler);
     // Output
     AliAODHandler* aodHandler   = new AliAODHandler();
@@ -53,6 +44,14 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
     // to the AODHandler, this will not be needed when
     // AODHandler goes to ANALYSISalice
     
+    // Connect CDB: needed by AliEMCALRecoUtils
+    Int_t run=-1; // Do not use 0, it is the default MC run
+    AliTaskCDBconnect *task= new AliTaskCDBconnect("CDBconnect", cdbLocation, run);
+    if (strlen(grpSpecific)>0) task->SetSpecificStorage("GRP/GRP/Data",grpSpecific);
+    mgr->AddTask(task);
+    AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer();    
+    mgr->ConnectInput(task,  0, cinput0);
+
     // Barrel Tracks
     AliAnalysisTaskESDfilter *filter = new AliAnalysisTaskESDfilter("Filter");
     mgr->AddTask(filter);
index 46f64e4..911379c 100644 (file)
@@ -5,6 +5,9 @@ void aod(){
     gSystem->Load("libCORRFW");
     gSystem->Load("libPWGHFbase");
     gSystem->Load("libPWGmuon");
+    gSystem->Load("libESDfilter");
+    gSystem->Load("libTENDER");
+    gSystem->Load("libPWGPP");
 
-    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C");
+    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C(\"AliESDs.root\",\"AliAOD.root\",\"local://$ALICE_ROOT/OCDB\",\"local://.\")");
 }
index 4835a68..55bfd5f 100644 (file)
@@ -5,6 +5,9 @@ void aod(){
     gSystem->Load("libCORRFW");
     gSystem->Load("libPWGHFbase");
     gSystem->Load("libPWGmuon");
+    gSystem->Load("libESDfilter");
+    gSystem->Load("libTENDER");
+    gSystem->Load("libPWGPP");
 
-    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C(\"AliESDs.root\",\"AliAODs.root\",kFALSE)");
+    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C(\"AliESDs.root\",\"AliAODs.root\",\"local://$ALICE_ROOT/OCDB\",\"local://..\",kFALSE)");
 }
index 46f64e4..911379c 100644 (file)
@@ -5,6 +5,9 @@ void aod(){
     gSystem->Load("libCORRFW");
     gSystem->Load("libPWGHFbase");
     gSystem->Load("libPWGmuon");
+    gSystem->Load("libESDfilter");
+    gSystem->Load("libTENDER");
+    gSystem->Load("libPWGPP");
 
-    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C");
+    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C(\"AliESDs.root\",\"AliAOD.root\",\"local://$ALICE_ROOT/OCDB\",\"local://.\")");
 }
index 46f64e4..911379c 100644 (file)
@@ -5,6 +5,9 @@ void aod(){
     gSystem->Load("libCORRFW");
     gSystem->Load("libPWGHFbase");
     gSystem->Load("libPWGmuon");
+    gSystem->Load("libESDfilter");
+    gSystem->Load("libTENDER");
+    gSystem->Load("libPWGPP");
 
-    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C");
+    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C(\"AliESDs.root\",\"AliAOD.root\",\"local://$ALICE_ROOT/OCDB\",\"local://.\")");
 }
index 4835a68..55bfd5f 100644 (file)
@@ -5,6 +5,9 @@ void aod(){
     gSystem->Load("libCORRFW");
     gSystem->Load("libPWGHFbase");
     gSystem->Load("libPWGmuon");
+    gSystem->Load("libESDfilter");
+    gSystem->Load("libTENDER");
+    gSystem->Load("libPWGPP");
 
-    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C(\"AliESDs.root\",\"AliAODs.root\",kFALSE)");
+    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C(\"AliESDs.root\",\"AliAODs.root\",\"local://$ALICE_ROOT/OCDB\",\"local://..\",kFALSE)");
 }
index 49b3f43..0c97834 100755 (executable)
@@ -4,12 +4,12 @@ cd ./backgr
 aliroot -b -q sim.C\(2\) 2>&1 | tee sim.log
 aliroot -b -q rec.C      2>&1 | tee rec.log
 aliroot -b -q ${ALICE_ROOT}/STEER/CheckESD.C 2>&1 | tee check.log
-aliroot -b -q ${ALICE_ROOT}/STEER/CreateAODfromESD.C 2>&1 | tee aod.log
+aliroot -b -q aod.C 2>&1 | tee aod.log
 chmod a-w *.root
 cd ../signal
 aliroot -b -q sim.C\(6\) 2>&1 | tee sim.log
 aliroot -b -q rec.C      2>&1 | tee rec.log
 aliroot -b -q ${ALICE_ROOT}/STEER/CheckESD.C 2>&1 | tee check.log
-aliroot -b -q ${ALICE_ROOT}/STEER/CreateAODfromESD.C 2>&1 | tee aod.log
+aliroot -b -q aod.C 2>&1 | tee aod.log
 
 
index a87c0b3..64e6aae 100644 (file)
@@ -1,16 +1,19 @@
 void aod(){
-  if (!strcmp(gSystem->GetBuildArch(),"win32gcc")) {
-    gSystem->Load("libProof");
-    gSystem->Load("libGui");
-    gROOT->Macro("loadlibs.C");
-    new AliRun("gAlice","The ALICE Off-line Simulation Framework");
-  }
-
   gSystem->Load("liblhapdf");      // Parton density functions
   gSystem->Load("libEGPythia6");   // TGenerator interface
   gSystem->Load("libpythia6");     // Pythia
   gSystem->Load("libAliPythia6");  // ALICE specific implementations
   gSystem->Load("libdpmjet");
   gSystem->Load("libTDPMjet");
-  gROOT->Macro("$ALICE_ROOT/STEER/CreateAODfromESD.C");
+  gSystem->Load("libANALYSIS");
+  gSystem->Load("libANALYSISalice");
+  gSystem->Load("libCORRFW");
+  gSystem->Load("libPWGHFbase");
+  gSystem->Load("libPWGmuon");
+  gSystem->Load("libESDfilter");
+  gSystem->Load("libTENDER");
+  gSystem->Load("libPWGPP");
+
+  gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C(\"AliESDs.root\",\"AliAODs.root\",\"local://$ALICE_ROOT/OCDB\",\"local://.\")");
 }
index 0b175ca..92904a3 100755 (executable)
@@ -1,11 +1,5 @@
 #!/bin/sh
-if [ "$ALICE_TARGET" = "win32gcc" ]
-    then
-    REXE=root_exe.exe
-else
-    REXE=aliroot
-fi
-
+REXE=aliroot
 
 rm -rf *.root *.dat *.log fort* hlt hough raw* *.inp *.o
 ${REXE} -b -q sim.C      2>&1 | tee sim.log
index 46f64e4..911379c 100644 (file)
@@ -5,6 +5,9 @@ void aod(){
     gSystem->Load("libCORRFW");
     gSystem->Load("libPWGHFbase");
     gSystem->Load("libPWGmuon");
+    gSystem->Load("libESDfilter");
+    gSystem->Load("libTENDER");
+    gSystem->Load("libPWGPP");
 
-    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C");
+    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C(\"AliESDs.root\",\"AliAOD.root\",\"local://$ALICE_ROOT/OCDB\",\"local://.\")");
 }
index 4835a68..55bfd5f 100644 (file)
@@ -5,6 +5,9 @@ void aod(){
     gSystem->Load("libCORRFW");
     gSystem->Load("libPWGHFbase");
     gSystem->Load("libPWGmuon");
+    gSystem->Load("libESDfilter");
+    gSystem->Load("libTENDER");
+    gSystem->Load("libPWGPP");
 
-    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C(\"AliESDs.root\",\"AliAODs.root\",kFALSE)");
+    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C(\"AliESDs.root\",\"AliAODs.root\",\"local://$ALICE_ROOT/OCDB\",\"local://..\",kFALSE)");
 }
index ed9687f..a84ebd0 100644 (file)
@@ -7,6 +7,9 @@ void aod(){
   gSystem->Load("libCORRFW");
   gSystem->Load("libPWGHFbase");
   gSystem->Load("libPWGmuon");
-
-  gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C");
+  gSystem->Load("libESDfilter");
+  gSystem->Load("libTENDER");
+  gSystem->Load("libPWGPP");
+  
+  gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C(\"AliESDs.root\",\"AliAOD.root\",\"local://$ALICE_ROOT/OCDB\",\"local://.\")");
 }