]>
Commit | Line | Data |
---|---|---|
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" | |
ec6160d5 | 30 | |
31 | // header files of library components | |
18ada816 | 32 | #include "AliHLTGlobalTrackMergerComponent.h" |
6595fdc6 | 33 | #include "AliHLTGlobalEsdConverterComponent.h" |
4d5ee3db | 34 | #include "AliHLTGlobalVertexerComponent.h" |
e09e5bba | 35 | #include "AliHLTGlobalOfflineVertexerComponent.h" |
8125805f | 36 | #include "AliHLTV0HistoComponent.h" |
50fec912 | 37 | #include "AliHLTdNdPtAnalysisComponent.h" |
b5642787 | 38 | #include "AliHLTdNdPtAnalysisMergerComponent.h" |
de0257eb | 39 | #include "AliHLTGlobalVertexerHistoComponent.h" |
a4c1f5dd | 40 | #include "AliHLTGlobalHistoComponent.h" |
e419c1ae | 41 | #include "AliHLTGlobalHistoCollector.h" |
dd15c69b | 42 | #include "AliHLTGlobalDCSPublisherComponent.h" |
06f2306d | 43 | #include "AliHLTMultiplicityCorrelationsComponent.h" |
bc4c4557 | 44 | #include "AliHLTPrimaryVertexFinderComponent.h" |
45 | #include "AliHLTV0FinderComponent.h" | |
ec6160d5 | 46 | |
314b6bc2 | 47 | // header file for preprocessor plugin |
48 | #include "AliHLTGlobalPreprocessor.h" | |
49 | ||
ec6160d5 | 50 | /** global instance for agent registration */ |
51 | AliHLTGlobalAgent gAliHLTGlobalAgent; | |
52 | ||
53 | /** ROOT macro for the implementation of ROOT specific class methods */ | |
54 | ClassImp(AliHLTGlobalAgent) | |
55 | ||
56 | AliHLTGlobalAgent::AliHLTGlobalAgent() | |
57 | : | |
58 | AliHLTModuleAgent("Global") | |
59 | { | |
60 | // see header file for class documentation | |
61 | // or | |
62 | // refer to README to build package | |
63 | // or | |
64 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
65 | } | |
66 | ||
67 | AliHLTGlobalAgent::~AliHLTGlobalAgent() | |
68 | { | |
69 | // see header file for class documentation | |
70 | } | |
71 | ||
72 | int AliHLTGlobalAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const | |
73 | { | |
74 | // see header file for class documentation | |
75 | assert(pHandler); | |
76 | if (!pHandler) return -EINVAL; | |
18ada816 | 77 | pHandler->AddComponent(new AliHLTGlobalTrackMergerComponent); |
6595fdc6 | 78 | pHandler->AddComponent(new AliHLTGlobalEsdConverterComponent); |
4d5ee3db | 79 | pHandler->AddComponent(new AliHLTGlobalVertexerComponent); |
e09e5bba | 80 | pHandler->AddComponent(new AliHLTGlobalOfflineVertexerComponent); |
de0257eb | 81 | pHandler->AddComponent(new AliHLTGlobalVertexerHistoComponent); |
a4c1f5dd | 82 | pHandler->AddComponent(new AliHLTGlobalHistoComponent); |
8125805f | 83 | pHandler->AddComponent(new AliHLTV0HistoComponent ); |
b5642787 | 84 | //pHandler->AddComponent(new AliHLTdNdPtAnalysisComponent ); |
85 | //pHandler->AddComponent(new AliHLTdNdPtAnalysisMergerComponent ); | |
06f2306d | 86 | pHandler->AddComponent(new AliHLTMultiplicityCorrelationsComponent ); |
bc4c4557 | 87 | pHandler->AddComponent(new AliHLTPrimaryVertexFinderComponent); |
88 | pHandler->AddComponent(new AliHLTV0FinderComponent); | |
e419c1ae | 89 | pHandler->AddComponent(new AliHLTGlobalHistoCollector ); |
dd15c69b | 90 | pHandler->AddComponent(new AliHLTGlobalDCSPublisherComponent ); |
ec6160d5 | 91 | return 0; |
92 | } | |
93 | ||
6595fdc6 | 94 | int AliHLTGlobalAgent::CreateConfigurations(AliHLTConfigurationHandler* pHandler, |
95 | AliRawReader* /*rawReader*/, | |
96 | AliRunLoader* /*runloader*/) const | |
ec6160d5 | 97 | { |
98 | // see header file for class documentation | |
6595fdc6 | 99 | if (!pHandler) return -EINVAL; |
ff242c62 | 100 | TObjArray* pTokens=NULL; |
101 | ||
102 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
103 | // | |
104 | // global vertexer component | |
105 | // | |
106 | // define the inputs | |
107 | TString vertexerInputs="TPC-globalmerger ITS-tracker"; | |
108 | ||
109 | // check for the availibility | |
110 | pTokens=vertexerInputs.Tokenize(" "); | |
111 | vertexerInputs=""; | |
112 | if (pTokens) { | |
113 | for (int n=0; n<pTokens->GetEntriesFast(); n++) { | |
114 | TString module=((TObjString*)pTokens->At(n))->GetString(); | |
115 | if (pHandler->FindConfiguration(module.Data())) { | |
116 | vertexerInputs+=module; | |
117 | vertexerInputs+=" "; | |
118 | } | |
119 | } | |
120 | delete pTokens; | |
121 | pTokens=NULL; | |
122 | } | |
123 | if (!vertexerInputs.IsNull()) { | |
124 | HLTInfo("Configuring inputs to global HLT Vertexer: %s", vertexerInputs.Data()); | |
125 | pHandler->CreateConfiguration("GLOBAL-vertexer","GlobalVertexer",vertexerInputs,""); | |
126 | } else { | |
127 | HLTWarning("No inputs to global HLT Vertexer found"); | |
128 | } | |
6595fdc6 | 129 | |
130 | ///////////////////////////////////////////////////////////////////////////////////// | |
131 | // | |
132 | // assembly of the global ESD | |
133 | ||
134 | // define the inputs to the global ESD | |
e1bf058c | 135 | TString esdInputs="TPC-globalmerger TPC-mcTrackMarker ITS-tracker GLOBAL-vertexer ITS-SPD-vertexer TPC-dEdx VZERO-RECO"; |
6595fdc6 | 136 | |
137 | // check for the availibility | |
ff242c62 | 138 | pTokens=esdInputs.Tokenize(" "); |
6595fdc6 | 139 | esdInputs=""; |
140 | if (pTokens) { | |
141 | for (int n=0; n<pTokens->GetEntriesFast(); n++) { | |
142 | TString module=((TObjString*)pTokens->At(n))->GetString(); | |
143 | if (pHandler->FindConfiguration(module.Data())) { | |
144 | esdInputs+=module; | |
145 | esdInputs+=" "; | |
146 | } | |
147 | } | |
148 | delete pTokens; | |
ff242c62 | 149 | pTokens=NULL; |
6595fdc6 | 150 | } |
ec6160d5 | 151 | |
6595fdc6 | 152 | if (esdInputs.Length()>0) { |
153 | HLTInfo("Configuring inputs to global HLT ESD: %s", esdInputs.Data()); | |
154 | } else { | |
155 | HLTWarning("No inputs to global HLT ESD found"); | |
ec6160d5 | 156 | } |
157 | ||
6595fdc6 | 158 | pHandler->CreateConfiguration("GLOBAL-esd-converter", "GlobalEsdConverter", esdInputs.Data(), ""); |
96bad4f8 | 159 | |
96bad4f8 | 160 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
161 | // | |
162 | // global histograms | |
163 | // | |
ff242c62 | 164 | TString vertexhistoInput="GLOBAL-vertexer ITS-SPD-vertexer"; |
165 | ||
166 | // check for the availibility | |
167 | pTokens=vertexhistoInput.Tokenize(" "); | |
168 | vertexhistoInput=""; | |
169 | if (pTokens) { | |
170 | for (int n=0; n<pTokens->GetEntriesFast(); n++) { | |
171 | TString module=((TObjString*)pTokens->At(n))->GetString(); | |
172 | if (pHandler->FindConfiguration(module.Data())) { | |
173 | vertexhistoInput+=module; | |
174 | vertexhistoInput+=" "; | |
175 | } | |
176 | } | |
177 | delete pTokens; | |
178 | pTokens=NULL; | |
179 | } | |
180 | ||
181 | if (!vertexhistoInput.IsNull()) { | |
182 | HLTInfo("Configuring inputs to global HLT Vertex histogram component: %s", vertexhistoInput.Data()); | |
183 | pHandler->CreateConfiguration("GLOBAL-vertexhisto","GlobalVertexerHisto", vertexhistoInput.Data(),""); | |
184 | } else { | |
185 | HLTWarning("No inputs to global HLT Vertex histogram component found"); | |
96bad4f8 | 186 | } |
6595fdc6 | 187 | |
b5642787 | 188 | //pHandler->CreateConfiguration("GLOBAL-dNdPtAnalysis", "dNdPtAnalysis", "GLOBAL-esd-converter", ""); |
189 | ||
06f2306d | 190 | pHandler->CreateConfiguration("GLOBAL-MultCorr", "MultiplicityCorrelations", "GLOBAL-esd-converter", ""); |
191 | ||
ec6160d5 | 192 | return 0; |
193 | } | |
194 | ||
6595fdc6 | 195 | const char* AliHLTGlobalAgent::GetReconstructionChains(AliRawReader* /*rawReader*/, |
196 | AliRunLoader* runloader) const | |
ec6160d5 | 197 | { |
198 | // see header file for class documentation | |
6595fdc6 | 199 | if (runloader) { |
200 | // reconstruction chains for AliRoot simulation | |
201 | // Note: run loader is only available while running embedded into | |
202 | // AliRoot simulation | |
50fec912 | 203 | return "GLOBAL-esd-converter"; |
ec6160d5 | 204 | } |
6595fdc6 | 205 | return NULL; |
206 | } | |
207 | ||
208 | const char* AliHLTGlobalAgent::GetRequiredComponentLibraries() const | |
209 | { | |
210 | // see header file for class documentation | |
211 | ||
b5642787 | 212 | return ""; |
6595fdc6 | 213 | } |
214 | ||
215 | int AliHLTGlobalAgent::GetHandlerDescription(AliHLTComponentDataType /*dt*/, | |
216 | AliHLTUInt32_t /*spec*/, | |
217 | AliHLTOUTHandlerDesc& /*desc*/) const | |
218 | { | |
219 | // see header file for class documentation | |
220 | ||
221 | return 0; | |
222 | } | |
223 | ||
224 | AliHLTOUTHandler* AliHLTGlobalAgent::GetOutputHandler(AliHLTComponentDataType /*dt*/, | |
225 | AliHLTUInt32_t /*spec*/) | |
226 | { | |
227 | // see header file for class documentation | |
ec6160d5 | 228 | |
229 | return NULL; | |
230 | } | |
231 | ||
232 | int AliHLTGlobalAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance) | |
233 | { | |
234 | // see header file for class documentation | |
235 | if (pInstance==NULL) return -EINVAL; | |
236 | ||
237 | return 0; | |
238 | } | |
314b6bc2 | 239 | |
240 | AliHLTModulePreprocessor* AliHLTGlobalAgent::GetPreprocessor() | |
241 | { | |
242 | // create the preprocessor plugin | |
243 | return new AliHLTGlobalPreprocessor; | |
244 | } |