]>
Commit | Line | Data |
---|---|---|
5e03d366 | 1 | void runGrid(Bool_t mcFlag=kFALSE){ |
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"); | |
5e03d366 | 9 | gSystem->Load("libSTEERBase"); |
10 | gSystem->Load("libESD"); | |
11 | gSystem->Load("libAOD"); | |
12 | gSystem->Load("libANALYSIS"); | |
13 | gSystem->Load("libANALYSISalice"); | |
14 | // Use AliRoot includes to compile our task | |
15 | gROOT->ProcessLine(".include $ALICE_ROOT/include"); | |
16 | ||
17 | // Create and configure the alien handler plugin | |
18 | gROOT->LoadMacro("runWithHandler.C"); | |
19 | AliAnalysisGrid *alienHandler = runWithHandler(); | |
20 | if (!alienHandler) return; | |
21 | ||
22 | // Create the analysis manager | |
23 | AliAnalysisManager *mgr = new AliAnalysisManager("TrackletsTaskManager"); | |
24 | ||
25 | // Connect plug-in to the analysis manager | |
26 | mgr->SetGridHandler(alienHandler); | |
27 | ||
28 | gROOT->LoadMacro("AliTrackletsTask.cxx++g"); | |
29 | AliTrackletsTask *task = new AliTrackletsTask(); | |
30 | mgr->AddTask(task); | |
31 | ||
32 | AliESDInputHandler* esdH = new AliESDInputHandler(); | |
33 | mgr->SetInputEventHandler(esdH); | |
34 | ||
63b6cbd0 | 35 | gROOT->LoadMacro("$ALICE_ROOT/OADB/macros/AddTaskPhysicsSelection.C"); |
5e03d366 | 36 | printf("The flag for the Physics selection is set to %d\n",(Int_t)mcFlag); |
37 | AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(mcFlag); | |
38 | ||
39 | // No need to create a chain - this is handled by the plug-in | |
40 | // gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C"); | |
41 | // TChain* chain = CreateESDChain("ESD82XX_30K.txt", 10); | |
42 | ||
43 | // Create containers for input/output | |
44 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
45 | AliAnalysisDataContainer *coutput = mgr->CreateContainer("chist", TList::Class(), AliAnalysisManager::kOutputContainer, "TrackletsTaskOutput.root"); | |
46 | ||
47 | // Connect input/output | |
48 | mgr->ConnectInput(task, 0, cinput); | |
49 | mgr->ConnectOutput(task, 0, coutput); | |
50 | ||
51 | // Enable debug printouts | |
52 | mgr->SetDebugLevel(2); | |
53 | ||
54 | if (!mgr->InitAnalysis()) | |
55 | return; | |
56 | ||
57 | mgr->PrintStatus(); | |
58 | // Start analysis in grid. | |
59 | mgr->StartAnalysis("grid"); | |
60 | ||
61 | return; | |
62 | } |