]> git.uio.no Git - u/mrichter/AliRoot.git/blame - T0/runProofT0analysis.C
example macros for EVE analysis using new ListAnalyser (Ben)
[u/mrichter/AliRoot.git] / T0 / runProofT0analysis.C
CommitLineData
c137086f 1void runProofT0analysis(const char * dataset = "/COMMON/COMMON/LHC09a4_10TeV_200k#esdTree",Long64_t nentries=20000, Long64_t firstentry=0)
2{
3// Connect to Proof
4 TProof::Open("proof://alla@alicecaf.cern.ch");
5 //TProof::Open("lxb6046");
6
7 // Upload and enable packages: please use the correct version!
8 gProof->UploadPackage("AF-v4-16");
9 gProof->EnablePackage("AF-v4-16");
10 gProof->ShowDataSets();
11
12 // Create the analysis manager
13 AliAnalysisManager *mgr = new AliAnalysisManager("AliT0MultiplicityTask");
14
15 AliVEventHandler* esdH = new AliESDInputHandler();
16 mgr->SetInputEventHandler(esdH);
17
18 // Enable MC event handler
19 AliVEventHandler* handler = new AliMCEventHandler;
20 mgr->SetMCtruthEventHandler(handler);
21
22 // Create task
23 // gProof->Load("AliMCComparisonTrack.cxx++g");
24 gProof->Load("AliT0MultiplicityTask.cxx++g");
25 AliAnalysisTask *task = new AliT0MultiplicityTask("AliT0MultiplicityTask");
26
27 // Add task
28 mgr->AddTask(task);
29
30 // Create containers for input/output
31 AliAnalysisDataContainer *cinput =
32 mgr->CreateContainer("cchain", TChain::Class(), AliAnalysisManager::kInputContainer);
33 AliAnalysisDataContainer *coutput =
34 mgr->CreateContainer("coutput", TList::Class(),
35 AliAnalysisManager::kOutputContainer, "MultHist.root");
36
37 // Connect input/output
38 mgr->ConnectInput(task, 0, cinput);
39 mgr->ConnectOutput(task, 1, coutput);
40
41
42 // Enable debug printouts
43 mgr->SetDebugLevel(3);
44
45 if (!mgr->InitAnalysis())
46 return;
47
48 mgr->PrintStatus();
49
50 mgr->StartAnalysis("proof",dataset,nentries,firstentry);
51}
52