Interfaced to AliAODJet and AliAODHandler.
[u/mrichter/AliRoot.git] / JETAN / JetAnalysisManagerLoc.C
CommitLineData
c89067f5 1void JetAnalysisManagerLoc()
2{
3 gSystem->Load("libTree.so");
4 gSystem->Load("libGeom.so");
5 gSystem->Load("libVMC.so");
6 gSystem->Load("libESD.so");
7 gSystem->Load("libANALYSIS.so");
8 gSystem->Load("libJETAN.so");
9 //
10 if (gApplication) gApplication->InitializeGraphics();
11 // Create the chain
12 //
13 TChain* chain = new TChain("esdTree");
14 chain->Add("/home/morsch/analysis/AliEn/Interactive/esd/001/AliESDs.root");
15 chain->Add("/home/morsch/analysis/AliEn/Interactive/esd/002/AliESDs.root");
16 //
17 // Make the analysis manager
18 //
19 AliAnalysisManager *mgr = new AliAnalysisManager("Jet Manager", "Jet Manager");
20 mgr-> SetDebugLevel(10);
21 AliAnalysisTaskJets *jetana = new AliAnalysisTaskJets("JetAnalysis");
22 jetana->SetDebugLevel(10);
23 mgr->AddTask(jetana);
24 //
25 // Create containers for input/output
26 AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain",TChain::Class(),
27 AliAnalysisManager::kInputContainer);
28
29 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("tree", TTree::Class(),
30 AliAnalysisManager::kOutputContainer, "jets.root");
31
32 mgr->ConnectInput (jetana, 0, cinput1);
33 mgr->ConnectOutput(jetana, 0, coutput1);
34 //
35 // Run the analysis
36 //
37 mgr->InitAnalysis();
38 mgr->PrintStatus();
39 mgr->StartAnalysis("local",chain);
40}