TENDER becomes Tender, removing .so
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / macros / AddTaskEMCalpi0ClusterEvaluation.C
CommitLineData
d630a0da 1//Task to run over AOD EMCal Clusters and tender
2//Astrid Morreale 2013
3//Esd
4//___________________________________________________
5void load_libraries( void )
6{
7
8 // Root libraries
9 gSystem->Load("libTree");
10 gSystem->Load("libGeom");
11 gSystem->Load("libVMC");
12 gSystem->Load("libPhysics");
13 gSystem->Load("libMinuit");
14
15 // Analysis framework libraries
16 gSystem->Load("libSTEERBase");
17 gSystem->Load("libESD");
18 gSystem->Load("libAOD");
19 gSystem->Load("libANALYSIS");
20 gSystem->Load("libOADB");
21 gSystem->Load("libANALYSISalice");
22
23 // AliRoot libraries
230b7aff 24 gSystem->Load("libGui");
25 gSystem->Load("libXMLParser");
26 gSystem->Load("libCDB");
27 gSystem->Load("libProof");
28 gSystem->Load("libRAWDatabase");
29 gSystem->Load("libRAWDatarec");
30 gSystem->Load("libSTEERBase");
31 gSystem->Load("libSTEER");
32 gSystem->Load("libTRDbase");
33 gSystem->Load("libTOFbase");
34 gSystem->Load("libTOFrec");
35 gSystem->Load("libVZERObase");
36 gSystem->Load("libVZEROrec");
37 gSystem->Load("libMinuit");
38 gSystem->Load("libEMCALUtils");
39 gSystem->Load("libEMCALraw");
40 gSystem->Load("libEMCALbase");
41 gSystem->Load("libEMCALrec");
42 gSystem->Load("libANALYSIS");
43 gSystem->Load("libANALYSISalice");
44 gSystem->Load("libPHOSUtils");
45 gSystem->Load("libTender");
46 gSystem->Load("libTenderSupplies");
47 gSystem->Load("libPWGflowBase");
48 gSystem->Load("libPWGflowTasks");
d630a0da 49
50}
51
52//______________________________________________________
53void AddTaskEMCalpi0ClusterEvaluation( UInt_t triggerMaskPbPb = AliVEvent::kEMCEGA )
54{
55
56 // load libraries
57 load_libraries();
58
59 // Use AliRoot includes to compile our task
60 gROOT->ProcessLine(".include $ALICE_ROOT");
61 gROOT->ProcessLine(".include $ALICE_ROOT/include");
62 gROOT->ProcessLine(".include $ALICE_ROOT/PWG/FLOW/Base");
63
64
65
66
67 // analysis manager
68 AliAnalysisManager *analysisManager = AliAnalysisManager::GetAnalysisManager();
69
70 if (!analysisManager)
71 {
72 ::Error("AddTaskEMCalpi0ClusterEvaluation", "No analysis manager to connect to.");
73 return NULL;
74 }
75
76 if (!analysisManager->GetInputEventHandler()) {
77 ::Error("AddTaskEMCALpi0ClusterEValuation", "This task requires an input event handler");
78 return NULL;
79 }
80
81 TString type = analysisManager->GetInputEventHandler()->GetDataType();
82
83 AliAnalysisDataContainer *cinput1 = analysisManager->GetCommonInputContainer();
84 AliAnalysisDataContainer *coutput1 = analysisManager->CreateContainer("MassHistos", TList::Class(), AliAnalysisManager::kOutputContainer, "AllMBLHC11h.root");
85
86 // cluster evaluation
87 gROOT->LoadMacro("AliEMCalpi0ClusterEvaluationTask.cxx");
88
89 // create task
90 AliEMCalpi0ClusterEvaluationTask*clusterEvaluation = new AliEMCalpi0ClusterEvaluationTask( "clusterEvaluation" );
91 clusterEvaluation->SelectCollisionCandidates(triggerMaskPbPb);
92
93 // add task to manager
94 analysisManager->AddTask(clusterEvaluation);
95
96 gSystem->AddIncludePath("-I$ALICE_ROOT/ANALYSIS ");
97
98
99 // I/O
100 analysisManager->ConnectInput( clusterEvaluation, 0, cinput1 );
101 analysisManager->ConnectOutput( clusterEvaluation, 1, coutput1 );
102
103
104 return clusterEvaluation;
105
106
107}