Updated version of the proof-enabled comparison macros: now available for ITS, TPC...
[u/mrichter/AliRoot.git] / PWG1 / comparison / runProofTPCComparison.C
CommitLineData
f2247c19 1void runProofTPCComparison(const char * dataset = "/PWG0/COMMON/run30000X_10TeV_0.5T",Long64_t nentries=1000, Long64_t firstentry=0)
31e081ed 2{
3 // Connect to Proof
4 TProof::Open("lxb6046");
5
6 // Upload and enable packages: please use the correct version!
f2247c19 7 gProof->UploadPackage("AF-v4-14");
8 gProof->EnablePackage("AF-v4-14");
31e081ed 9
10 // Create the analysis manager
11 AliAnalysisManager *mgr = new AliAnalysisManager("AliTPCComparison");
12
13 AliVEventHandler* esdH = new AliESDInputHandler();
14 mgr->SetInputEventHandler(esdH);
15
16 // Enable MC event handler
17 AliVEventHandler* handler = new AliMCEventHandler;
18 mgr->SetMCtruthEventHandler(handler);
19
20 // Create task
21 gProof->Load("AliMCComparisonTrack.cxx++g");
22 gProof->Load("AliTPCComparisonTask.cxx++g");
23 AliAnalysisTask *task = new AliTPCComparisonTask("AliTPCComparisonTask");
24
25 // Add task
26 mgr->AddTask(task);
27
28 // Create containers for input/output
f2247c19 29 AliAnalysisDataContainer *cinput =
30 mgr->CreateContainer("cchain", TChain::Class(), AliAnalysisManager::kInputContainer);
31 AliAnalysisDataContainer *coutput =
32 mgr->CreateContainer("coutput", TList::Class(),
33 AliAnalysisManager::kOutputContainer, "AliTPCComparisonHist.root");
31e081ed 34
35 // Connect input/output
36 mgr->ConnectInput(task, 0, cinput);
37 mgr->ConnectOutput(task, 1, coutput);
38
39
40 // Enable debug printouts
41 mgr->SetDebugLevel(3);
42
43 if (!mgr->InitAnalysis())
44 return;
45
46 mgr->PrintStatus();
47
48 mgr->StartAnalysis("proof",dataset,nentries,firstentry);
49}
f2247c19 50