some more updates
[u/mrichter/AliRoot.git] / PWGPP / macros / RunIPTask.C
CommitLineData
5b09c01f 1void RunIPTask(const char* mode)
2{
3 gSystem->SetIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT "
4 "-I$ALICE_ROOT/include -I$ALICE_ROOT/ITS "
5 "-I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS "
6 "-I$ALICE_ROOT/STEER -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros "
7 "-I$ALICE_ROOT/ANALYSIS -g");
8 //
9 // Load analysis libraries
10 gSystem->Load("libANALYSIS.so");
11 gSystem->Load("libANALYSISalice.so");
12 gSystem->Load("libTENDER.so");
2bfe5463 13 gSystem->Load("libPWGPP.so");
5b09c01f 14 //
15 TChain *chainESD = 0;
16 gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C");
17 TChain* chain = CreateESDChain(mode,-1);
d631e5e7 18 //chain->SetBranchStatus("*ESDfriend*",1);
5b09c01f 19 //
20 AliAnalysisManager *mgr = new AliAnalysisManager("My Manager","My Manager");
21 AliESDInputHandler *esdH = new AliESDInputHandler();
d631e5e7 22 esdH->SetActiveBranches("ESDfriend");
5b09c01f 23 //
24 mgr->SetInputEventHandler(esdH);
2bfe5463 25 gROOT->LoadMacro("$ALICE_ROOT/PWGPP/macros/AddTaskIntSpotESD.C");
5b09c01f 26 AliAnalysisTaskIPInfo* iptask = AddTaskIntSpotESD();
d631e5e7 27
5b09c01f 28 if(!mgr->InitAnalysis()) return;
29 //
30 mgr->StartAnalysis("local",chain);
31}