3 // Load common libraries
4 gSystem->Load("libCore.so");
5 gSystem->Load("libTree.so");
6 gSystem->Load("libGeom.so");
7 gSystem->Load("libVMC.so");
8 gSystem->Load("libPhysics.so");
9 gSystem->Load("libSTEERBase");
10 gSystem->Load("libESD");
11 gSystem->Load("libAOD");
12 gSystem->Load("libANALYSIS");
13 gSystem->Load("libANALYSISalice");
14 gSystem->Load("libOADB.so");
15 // Use AliRoot includes to compile our task
16 gROOT->ProcessLine(".include $ALICE_ROOT/include");
18 // Create and configure the alien handler plugin
19 gROOT->LoadMacro("CreateAlienHandlerT0.C");
20 AliAnalysisGrid *alienHandler = CreateAlienHandler();
21 if (!alienHandler) return;
23 // Create the analysis manager
24 AliAnalysisManager *mgr = new AliAnalysisManager("testAnalysis");
26 // Connect plug-in to the analysis manager
27 mgr->SetGridHandler(alienHandler);
30 AliESDInputHandler* esdH = new AliESDInputHandler();
31 mgr->SetInputEventHandler(esdH);
33 gROOT->ProcessLine(".L $ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
34 AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection();
38 gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
39 AliCentralitySelectionTask *taskCentrality = AddTaskCentrality();
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 );
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);
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);
63 if (!mgr->InitAnalysis())
67 // Start analysis in grid.
68 mgr->StartAnalysis("grid");