Fix for FMD DA
[u/mrichter/AliRoot.git] / T0 / runGridT0.C
CommitLineData
3833c4e7 1{
2 Int_t debugLevel = 2;
3 // Load common libraries
4070f709 4 gSystem->Load("libCore");
5 gSystem->Load("libTree");
6 gSystem->Load("libGeom");
7 gSystem->Load("libVMC");
8 gSystem->Load("libPhysics");
3833c4e7 9 gSystem->Load("libSTEERBase");
10 gSystem->Load("libESD");
11 gSystem->Load("libAOD");
12 gSystem->Load("libANALYSIS");
13 gSystem->Load("libANALYSISalice");
4070f709 14 gSystem->Load("libOADB");
3833c4e7 15 // Use AliRoot includes to compile our task
16 gROOT->ProcessLine(".include $ALICE_ROOT/include");
17
18 // Create and configure the alien handler plugin
19 gROOT->LoadMacro("CreateAlienHandlerT0.C");
20 AliAnalysisGrid *alienHandler = CreateAlienHandler();
21 if (!alienHandler) return;
22
23 // Create the analysis manager
24 AliAnalysisManager *mgr = new AliAnalysisManager("testAnalysis");
25
26 // Connect plug-in to the analysis manager
27 mgr->SetGridHandler(alienHandler);
28
29
30 AliESDInputHandler* esdH = new AliESDInputHandler();
31 mgr->SetInputEventHandler(esdH);
32
63b6cbd0 33 gROOT->ProcessLine(".L $ALICE_ROOT/OADB/macros/AddTaskPhysicsSelection.C");
3833c4e7 34 AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection();
35
36 Bool_t isMC=false;
37
1c06a186 38 gROOT->LoadMacro("$ALICE_ROOT/OADB/macros/AddTaskCentrality.C");
3833c4e7 39 AliCentralitySelectionTask *taskCentrality = AddTaskCentrality();
40
41
42 gROOT->LoadMacro("AliT0HIanalysisTask.cxx+g");
43 AliT0HIanalysisTask *task = new AliT0HIanalysisTask("TaskT0");
44 task->SetDebugLevel(debugLevel);
45 // if you use the following line, your task only gets the selected events
46 task->SelectCollisionCandidates(AliVEvent::kINT7 );
47 mgr->AddTask(task);
48
49
50 TString outputFileName = AliAnalysisManager::GetCommonFileName();
51 outputFileName += ":Alla_histograms";
52 // Create containers for input/output
53 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
54 AliAnalysisDataContainer *coutput = mgr->CreateContainer("chist", TList::Class(), AliAnalysisManager::kOutputContainer, outputFileName);
55
56 // Connect input/output
57 mgr->ConnectInput(task, 0, cinput);
58 mgr->ConnectOutput(task, 1, coutput);
59 mgr->SetSkipTerminate(kFALSE);
60 // Enable debug printouts
61 mgr->SetDebugLevel(debugLevel);
62
63 if (!mgr->InitAnalysis())
64 return;
65
66 mgr->PrintStatus();
67 // Start analysis in grid.
68 mgr->StartAnalysis("grid");
69
70};