]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/global/AliHLTGlobalAgent.cxx
LHAPDF: Removing lhapdf 5.3.1 version
[u/mrichter/AliRoot.git] / HLT / global / AliHLTGlobalAgent.cxx
CommitLineData
ec6160d5 1// $Id$
2
3//**************************************************************************
4//* This file is property of and copyright by the ALICE HLT Project *
5//* ALICE Experiment at CERN, All rights reserved. *
6//* *
7//* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8//* for The ALICE HLT Project. *
9//* *
10//* Permission to use, copy, modify and distribute this software and its *
11//* documentation strictly for non-commercial purposes is hereby granted *
12//* without fee, provided that the above copyright notice appears in all *
13//* copies and that both the copyright notice and this permission notice *
14//* appear in the supporting documentation. The authors make no claims *
15//* about the suitability of this software for any purpose. It is *
16//* provided "as is" without express or implied warranty. *
17//**************************************************************************
18
19/** @file AliHLTGlobalAgent.cxx
20 @author Matthias Richter
21 @date
22 @brief Agent of the libAliHLTGlobal library
23*/
24
25#include <cassert>
26#include "AliHLTGlobalAgent.h"
6595fdc6 27#include "AliHLTConfigurationHandler.h"
28#include "TObjString.h"
29#include "TObjArray.h"
ce392def 30#include "AliHLTGlobalFlatEsdTestComponent.h"
ec6160d5 31
32// header files of library components
18ada816 33#include "AliHLTGlobalTrackMergerComponent.h"
ee82d961 34#include "AliHLTGlobalCompareFlatComponent.h"
8e0c1b9d 35#include "AliHLTGlobalEsdToFlatConverterComponent.h"
251a2c81 36#include "AliHLTGlobalFlatEsdConverterComponent.h"
6595fdc6 37#include "AliHLTGlobalEsdConverterComponent.h"
4d5ee3db 38#include "AliHLTGlobalVertexerComponent.h"
e09e5bba 39#include "AliHLTGlobalOfflineVertexerComponent.h"
8125805f 40#include "AliHLTV0HistoComponent.h"
50fec912 41#include "AliHLTdNdPtAnalysisComponent.h"
b5642787 42#include "AliHLTdNdPtAnalysisMergerComponent.h"
de0257eb 43#include "AliHLTGlobalVertexerHistoComponent.h"
a4c1f5dd 44#include "AliHLTGlobalHistoComponent.h"
e419c1ae 45#include "AliHLTGlobalHistoCollector.h"
dd15c69b 46#include "AliHLTGlobalDCSPublisherComponent.h"
06f2306d 47#include "AliHLTMultiplicityCorrelationsComponent.h"
bc4c4557 48#include "AliHLTPrimaryVertexFinderComponent.h"
49#include "AliHLTV0FinderComponent.h"
b9f1d917 50#include "AliHLTAnaManagerComponent.h"
828c4c08 51#include "AliHLTFlatAnaManagerComponent.h"
ec6160d5 52
314b6bc2 53// header file for preprocessor plugin
54#include "AliHLTGlobalPreprocessor.h"
55
ec6160d5 56/** global instance for agent registration */
57AliHLTGlobalAgent gAliHLTGlobalAgent;
58
59/** ROOT macro for the implementation of ROOT specific class methods */
60ClassImp(AliHLTGlobalAgent)
61
62AliHLTGlobalAgent::AliHLTGlobalAgent()
63 :
64 AliHLTModuleAgent("Global")
65{
66 // see header file for class documentation
67 // or
68 // refer to README to build package
69 // or
70 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
71}
72
73AliHLTGlobalAgent::~AliHLTGlobalAgent()
74{
75 // see header file for class documentation
76}
77
78int AliHLTGlobalAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
79{
80 // see header file for class documentation
81 assert(pHandler);
82 if (!pHandler) return -EINVAL;
8e0c1b9d 83 pHandler->AddComponent(new AliHLTGlobalEsdToFlatConverterComponent);
ee82d961 84 pHandler->AddComponent(new AliHLTGlobalCompareFlatComponent);
ce392def 85 pHandler->AddComponent(new AliHLTGlobalFlatEsdTestComponent);
18ada816 86 pHandler->AddComponent(new AliHLTGlobalTrackMergerComponent);
251a2c81 87 pHandler->AddComponent(new AliHLTGlobalFlatEsdConverterComponent);
6595fdc6 88 pHandler->AddComponent(new AliHLTGlobalEsdConverterComponent);
4d5ee3db 89 pHandler->AddComponent(new AliHLTGlobalVertexerComponent);
e09e5bba 90 pHandler->AddComponent(new AliHLTGlobalOfflineVertexerComponent);
de0257eb 91 pHandler->AddComponent(new AliHLTGlobalVertexerHistoComponent);
a4c1f5dd 92 pHandler->AddComponent(new AliHLTGlobalHistoComponent);
8125805f 93 pHandler->AddComponent(new AliHLTV0HistoComponent );
b5642787 94 //pHandler->AddComponent(new AliHLTdNdPtAnalysisComponent );
95 //pHandler->AddComponent(new AliHLTdNdPtAnalysisMergerComponent );
06f2306d 96 pHandler->AddComponent(new AliHLTMultiplicityCorrelationsComponent );
bc4c4557 97 pHandler->AddComponent(new AliHLTPrimaryVertexFinderComponent);
98 pHandler->AddComponent(new AliHLTV0FinderComponent);
e419c1ae 99 pHandler->AddComponent(new AliHLTGlobalHistoCollector );
dd15c69b 100 pHandler->AddComponent(new AliHLTGlobalDCSPublisherComponent );
b9f1d917 101 pHandler->AddComponent(new AliHLTAnaManagerComponent);
828c4c08 102 pHandler->AddComponent(new AliHLTFlatAnaManagerComponent);
ec6160d5 103 return 0;
104}
105
6595fdc6 106int AliHLTGlobalAgent::CreateConfigurations(AliHLTConfigurationHandler* pHandler,
107 AliRawReader* /*rawReader*/,
108 AliRunLoader* /*runloader*/) const
ec6160d5 109{
110 // see header file for class documentation
6595fdc6 111 if (!pHandler) return -EINVAL;
ff242c62 112 TObjArray* pTokens=NULL;
113
114 ///////////////////////////////////////////////////////////////////////////////////////////////////
115 //
116 // global vertexer component
117 //
118 // define the inputs
119 TString vertexerInputs="TPC-globalmerger ITS-tracker";
120
121 // check for the availibility
122 pTokens=vertexerInputs.Tokenize(" ");
123 vertexerInputs="";
124 if (pTokens) {
125 for (int n=0; n<pTokens->GetEntriesFast(); n++) {
126 TString module=((TObjString*)pTokens->At(n))->GetString();
127 if (pHandler->FindConfiguration(module.Data())) {
128 vertexerInputs+=module;
129 vertexerInputs+=" ";
130 }
131 }
132 delete pTokens;
133 pTokens=NULL;
134 }
251a2c81 135 cout<<endl<<"\n\nConfiguring inputs to global HLT Vertexer: %s\n\n"<<vertexerInputs.Data()<<endl<<endl;
ff242c62 136 if (!vertexerInputs.IsNull()) {
251a2c81 137 HLTInfo("\n\nConfiguring inputs to global HLT Vertexer: %s\n\n", vertexerInputs.Data());
ff242c62 138 pHandler->CreateConfiguration("GLOBAL-vertexer","GlobalVertexer",vertexerInputs,"");
139 } else {
251a2c81 140 HLTWarning("\n\nNo inputs to global HLT Vertexer found\n\n");
ff242c62 141 }
6595fdc6 142
143 /////////////////////////////////////////////////////////////////////////////////////
144 //
145 // assembly of the global ESD
146
147 // define the inputs to the global ESD
5961f15d 148 TString esdInputs="TPC-globalmerger TPC-mcTrackMarker ITS-tracker TPC-ClusterTransformation GLOBAL-vertexer ITS-SPD-vertexer TPC-dEdx VZERO-RECO ITS-SAPtracker";
6595fdc6 149
150 // check for the availibility
ff242c62 151 pTokens=esdInputs.Tokenize(" ");
6595fdc6 152 esdInputs="";
153 if (pTokens) {
154 for (int n=0; n<pTokens->GetEntriesFast(); n++) {
155 TString module=((TObjString*)pTokens->At(n))->GetString();
156 if (pHandler->FindConfiguration(module.Data())) {
157 esdInputs+=module;
158 esdInputs+=" ";
159 }
160 }
161 delete pTokens;
ff242c62 162 pTokens=NULL;
6595fdc6 163 }
ec6160d5 164
6595fdc6 165 if (esdInputs.Length()>0) {
2352edc3 166 esdInputs+=" TPC-ClusterTransformation";
6595fdc6 167 HLTInfo("Configuring inputs to global HLT ESD: %s", esdInputs.Data());
168 } else {
169 HLTWarning("No inputs to global HLT ESD found");
ec6160d5 170 }
2352edc3 171
251a2c81 172 pHandler->CreateConfiguration("GLOBAL-flat-esd-converter", "GlobalFlatEsdConverter", esdInputs.Data(), "");
6595fdc6 173 pHandler->CreateConfiguration("GLOBAL-esd-converter", "GlobalEsdConverter", esdInputs.Data(), "");
ce392def 174 pHandler->CreateConfiguration("GLOBAL-flat-esd-test", "GlobalFlatEsdTest", "GLOBAL-esd-converter GLOBAL-flat-esd-converter", "");
8e0c1b9d 175 pHandler->CreateConfiguration("esd-to-flat-conversion", "GlobalEsdToFlatConverter", "GLOBAL-esd-converter", "");
ee82d961 176 pHandler->CreateConfiguration("compare-flat", "GlobalCompareFlat", "GLOBAL-flat-esd-converter esd-to-flat-conversion", "");
a2e57ab1 177 //pHandler->CreateConfiguration("compare-flat", "GlobalCompareFlat", "GLOBAL-flat-esd-converter", "");
96bad4f8 178
96bad4f8 179 ///////////////////////////////////////////////////////////////////////////////////////////////////
180 //
181 // global histograms
182 //
ff242c62 183 TString vertexhistoInput="GLOBAL-vertexer ITS-SPD-vertexer";
184
185 // check for the availibility
186 pTokens=vertexhistoInput.Tokenize(" ");
187 vertexhistoInput="";
188 if (pTokens) {
189 for (int n=0; n<pTokens->GetEntriesFast(); n++) {
190 TString module=((TObjString*)pTokens->At(n))->GetString();
191 if (pHandler->FindConfiguration(module.Data())) {
192 vertexhistoInput+=module;
193 vertexhistoInput+=" ";
194 }
195 }
196 delete pTokens;
197 pTokens=NULL;
198 }
199
200 if (!vertexhistoInput.IsNull()) {
201 HLTInfo("Configuring inputs to global HLT Vertex histogram component: %s", vertexhistoInput.Data());
202 pHandler->CreateConfiguration("GLOBAL-vertexhisto","GlobalVertexerHisto", vertexhistoInput.Data(),"");
203 } else {
204 HLTWarning("No inputs to global HLT Vertex histogram component found");
96bad4f8 205 }
6595fdc6 206
b5642787 207 //pHandler->CreateConfiguration("GLOBAL-dNdPtAnalysis", "dNdPtAnalysis", "GLOBAL-esd-converter", "");
208
06f2306d 209 pHandler->CreateConfiguration("GLOBAL-MultCorr", "MultiplicityCorrelations", "GLOBAL-esd-converter", "");
210
ec6160d5 211 return 0;
212}
213
6595fdc6 214const char* AliHLTGlobalAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
215 AliRunLoader* runloader) const
ec6160d5 216{
217 // see header file for class documentation
6595fdc6 218 if (runloader) {
219 // reconstruction chains for AliRoot simulation
220 // Note: run loader is only available while running embedded into
221 // AliRoot simulation
50fec912 222 return "GLOBAL-esd-converter";
ec6160d5 223 }
6595fdc6 224 return NULL;
225}
226
227const char* AliHLTGlobalAgent::GetRequiredComponentLibraries() const
228{
229 // see header file for class documentation
230
b5642787 231 return "";
6595fdc6 232}
233
234int AliHLTGlobalAgent::GetHandlerDescription(AliHLTComponentDataType /*dt*/,
235 AliHLTUInt32_t /*spec*/,
236 AliHLTOUTHandlerDesc& /*desc*/) const
237{
238 // see header file for class documentation
239
240 return 0;
241}
242
243AliHLTOUTHandler* AliHLTGlobalAgent::GetOutputHandler(AliHLTComponentDataType /*dt*/,
244 AliHLTUInt32_t /*spec*/)
245{
246 // see header file for class documentation
ec6160d5 247
248 return NULL;
249}
250
251int AliHLTGlobalAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
252{
253 // see header file for class documentation
254 if (pInstance==NULL) return -EINVAL;
255
256 return 0;
257}
314b6bc2 258
259AliHLTModulePreprocessor* AliHLTGlobalAgent::GetPreprocessor()
260{
261 // create the preprocessor plugin
262 return new AliHLTGlobalPreprocessor;
263}