]>
Commit | Line | Data |
---|---|---|
d1ff7c16 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
1d8ae082 | 16 | // $Id$ |
d1ff7c16 | 17 | |
6253e09b | 18 | /// |
19 | /// @file AliHLTMUONAgent.cxx | |
20 | /// @author Artur Szostak <artursz@iafrica.com> | |
887a669c | 21 | /// @date 28 May 2007 |
6253e09b | 22 | /// @brief Implementation of the AliHLTMUONAgent class. |
23 | /// | |
d1ff7c16 | 24 | |
25 | #include "AliHLTMUONAgent.h" | |
887a669c | 26 | #include "AliHLTMUONConstants.h" |
6253e09b | 27 | #include "AliHLTMUONRecHitsSource.h" |
28 | #include "AliHLTMUONTriggerRecordsSource.h" | |
887a669c | 29 | #include "AliHLTMUONDigitPublisherComponent.h" |
6253e09b | 30 | #include "AliHLTMUONRootifierComponent.h" |
31 | #include "AliHLTMUONHitReconstructorComponent.h" | |
32 | #include "AliHLTMUONTriggerReconstructorComponent.h" | |
33 | #include "AliHLTMUONMansoTrackerFSMComponent.h" | |
c9537879 | 34 | #include "AliHLTMUONDecisionComponent.h" |
649ab027 | 35 | #include "AliHLTMUONESDMaker.h" |
0528e93a | 36 | #include "AliHLTMUONEmptyEventFilterComponent.h" |
dba14d7d | 37 | #include "AliHLTMUONDataCheckerComponent.h" |
17d68f2a | 38 | #include "AliHLTMUONClusterFinderComponent.h" |
a63da6d6 | 39 | #include "AliHLTMUONRawDataHistoComponent.h" |
94135365 | 40 | #include "AliHLTOUTHandlerChain.h" |
352670bf | 41 | #include "AliRawReader.h" |
d1ff7c16 | 42 | #include "AliRunLoader.h" |
887a669c | 43 | #include "TSystem.h" |
44 | #include "TString.h" | |
d1ff7c16 | 45 | |
6253e09b | 46 | // The single global instance of the dimuon HLT agent. |
47 | AliHLTMUONAgent AliHLTMUONAgent::fgkInstance; | |
d1ff7c16 | 48 | |
94135365 | 49 | AliHLTOUTHandlerChain AliHLTMUONAgent::fgkESDMakerChain("libAliHLTMUON.so chains=dHLT-make-esd"); |
50 | AliHLTOUTHandlerChain AliHLTMUONAgent::fgkRootifyDumpChain("libAliHLTMUON.so chains=dHLT-rootify-and-dump"); | |
51 | ||
52 | ||
d1ff7c16 | 53 | ClassImp(AliHLTMUONAgent); |
54 | ||
55 | ||
626bfcc1 | 56 | AliHLTMUONAgent::AliHLTMUONAgent() : AliHLTModuleAgent("MUON") |
d1ff7c16 | 57 | { |
6253e09b | 58 | /// |
59 | /// Default constructor. | |
60 | /// | |
d1ff7c16 | 61 | } |
62 | ||
63 | AliHLTMUONAgent::~AliHLTMUONAgent() | |
64 | { | |
6253e09b | 65 | /// |
66 | /// Default destructor. | |
67 | /// | |
d1ff7c16 | 68 | } |
69 | ||
887a669c | 70 | const char* AliHLTMUONAgent::GetReconstructionChains(AliRawReader* rawReader, |
71 | AliRunLoader* runloader | |
d1ff7c16 | 72 | ) const |
73 | { | |
6253e09b | 74 | /// |
75 | /// Inherited from AliHLTModuleAgent. | |
76 | /// Returns the top processing chain configurations for local event | |
77 | /// reconstruction. | |
78 | /// @param rawReader [in] AliRoot rawreader instance. | |
79 | /// @param runloader [in] AliRoot runloader | |
80 | /// @return string containing the top configurations separated by blanks. | |
81 | /// | |
887a669c | 82 | /// If rawReader is not NULL then the standard dHLT chain is run taking |
83 | /// data from raw DDL data. Otherwise runloader is checked and if it is | |
84 | /// not NULL then a dHLT chain is run with input data from digits. | |
6253e09b | 85 | |
887a669c | 86 | if (rawReader != NULL) |
87 | { | |
352670bf | 88 | // Check if there is any data from the tracker and trigger. |
89 | bool dataFromTracker = false; | |
90 | bool dataFromTrigger = false; | |
91 | rawReader->Select("MUONTRK", 0, 19); | |
92 | for (Int_t i = 0; i < 20; i++) | |
93 | { | |
94 | if (rawReader->ReadHeader()) dataFromTracker = true; | |
95 | } | |
96 | rawReader->Select("MUONTRG", 0, 1); | |
97 | for (Int_t i = 0; i < 2; i++) | |
98 | { | |
99 | if (rawReader->ReadHeader()) dataFromTrigger = true; | |
100 | } | |
a1dcf777 | 101 | rawReader->Reset(); |
352670bf | 102 | |
103 | // If raw data was found for our detector then select the | |
104 | // appropriate chain. | |
105 | if (dataFromTracker and dataFromTrigger) | |
106 | return "dHLT-sim-fromRaw"; | |
887a669c | 107 | } |
352670bf | 108 | |
109 | if (runloader != NULL) | |
887a669c | 110 | { |
352670bf | 111 | if (runloader->GetLoader("MUONLoader") != NULL) |
112 | return "dHLT-sim"; | |
887a669c | 113 | } |
352670bf | 114 | |
115 | return ""; | |
d1ff7c16 | 116 | } |
117 | ||
118 | const char* AliHLTMUONAgent::GetRequiredComponentLibraries() const | |
119 | { | |
6253e09b | 120 | /// |
121 | /// Inherited from AliHLTModuleAgent. | |
122 | /// Returns a list of libraries which the configurations registered by | |
123 | /// this module agent depend on. | |
124 | /// @return list of component libraries as a blank-separated string. | |
125 | /// | |
126 | ||
887a669c | 127 | // List of libraries that we depend on. |
128 | static const char* libs[] = | |
129 | { | |
130 | "libCore.so", | |
131 | "libCint.so", | |
132 | "libGraf.so", | |
133 | "libRIO.so", | |
134 | "libNet.so", | |
135 | "libHist.so", | |
136 | "libMatrix.so", | |
137 | "libMathCore.so", | |
138 | "libMinuit.so", | |
139 | "libTree.so", | |
140 | "libGraf3d.so", | |
141 | "libGpad.so", | |
142 | "libPhysics.so", | |
143 | "libGui.so", | |
144 | "libProofPlayer.so", | |
145 | "libProof.so", | |
146 | "libThread.so", | |
147 | "libGeom.so", | |
887a669c | 148 | "libEG.so", |
149 | "libTreePlayer.so", | |
150 | "libXMLIO.so", | |
151 | "libVMC.so", | |
152 | "libESD.so", | |
153 | "libCDB.so", | |
154 | "libSTEERBase.so", | |
155 | "libSTEER.so", | |
156 | "libGui.so", | |
157 | "libRAWDatasim.so", | |
158 | "libRAWDatarec.so", | |
159 | "libRAWDatabase.so", | |
160 | "libMUONcore.so", | |
161 | "libMUONraw.so", | |
162 | "libMUONbase.so", | |
163 | "libMUONgeometry.so", | |
164 | "libMUONmapping.so", | |
165 | "libMUONcalib.so", | |
166 | "libMUONsim.so", | |
167 | "libMUONtrigger.so", | |
168 | "libMUONevaluation.so", | |
169 | "libMUONrec.so", | |
170 | "libHLTbase.so", | |
171 | "libAliHLTUtil.so", | |
172 | NULL | |
173 | }; | |
174 | ||
175 | // First check if the library is not already loaded. If it is then we have | |
176 | // no reason to declare it as needed, so that we do not load it again. | |
177 | static TString result; | |
178 | for (const char** lib = libs; *lib != NULL; lib++) | |
179 | { | |
180 | const char* list = gSystem->GetLibraries(*lib, "", kFALSE); | |
181 | if (list == NULL) continue; | |
182 | // Check if not found, i.e. result was an empty string. | |
183 | // If so then add the library to the required list. | |
184 | if (list[0] == '\0') | |
185 | { | |
186 | result += *lib; | |
187 | result += " "; | |
188 | } | |
189 | } | |
190 | return result.Data(); | |
d1ff7c16 | 191 | } |
192 | ||
193 | ||
194 | int AliHLTMUONAgent::CreateConfigurations( | |
195 | AliHLTConfigurationHandler* handler, | |
887a669c | 196 | AliRawReader* rawReader, |
197 | AliRunLoader* runloader | |
d1ff7c16 | 198 | ) const |
199 | { | |
6253e09b | 200 | /// Register all processing configurations belonging to the dimuon HLT |
201 | /// library with the AliHLTConfigurationHandler. | |
202 | /// @param handler the configuration handler | |
203 | /// @param rawReader [in] AliRoot rawreader instance. | |
204 | /// @param runloader AliRoot runloader | |
205 | /// @return Zero on success and error code if failed. | |
206 | /// | |
887a669c | 207 | /// Chains available: |
208 | /// dHLT-sim - standard dHLT simulation chain. | |
209 | /// dHLT-sim-fromRaw - standard dHLT chain taking raw DDL data as input. | |
210 | /// dHLT-sim-fromMC - dHLT chain taking Monte Carlo hit data as input. | |
211 | /// So hit reconstruction is not checked, just the tracker. | |
6253e09b | 212 | |
d1ff7c16 | 213 | if (handler == NULL) return 0; |
887a669c | 214 | |
215 | const char* trackerId = AliHLTMUONConstants::MansoTrackerFSMId(); | |
216 | const char* decCompId = AliHLTMUONConstants::DecisionComponentId(); | |
217 | ||
218 | if (rawReader != NULL) | |
219 | { | |
220 | // Implement the dHLT-sim-fromRaw dHLT simulation chain reading | |
221 | // from raw data. | |
222 | const char* rawPubComp = "AliRawReaderPublisher"; | |
223 | const char* cmd13 = "-minid 2572 -datatype 'DDL_RAW ' 'MUON' -dataspec 0x001000"; | |
224 | const char* cmd14 = "-minid 2573 -datatype 'DDL_RAW ' 'MUON' -dataspec 0x002000"; | |
225 | const char* cmd15 = "-minid 2574 -datatype 'DDL_RAW ' 'MUON' -dataspec 0x004000"; | |
226 | const char* cmd16 = "-minid 2575 -datatype 'DDL_RAW ' 'MUON' -dataspec 0x008000"; | |
227 | const char* cmd17 = "-minid 2576 -datatype 'DDL_RAW ' 'MUON' -dataspec 0x010000"; | |
228 | const char* cmd18 = "-minid 2577 -datatype 'DDL_RAW ' 'MUON' -dataspec 0x020000"; | |
229 | const char* cmd19 = "-minid 2578 -datatype 'DDL_RAW ' 'MUON' -dataspec 0x040000"; | |
230 | const char* cmd20 = "-minid 2579 -datatype 'DDL_RAW ' 'MUON' -dataspec 0x080000"; | |
231 | const char* cmd21 = "-minid 2816 -datatype 'DDL_RAW ' 'MUON' -dataspec 0x100000"; | |
232 | const char* cmd22 = "-minid 2817 -datatype 'DDL_RAW ' 'MUON' -dataspec 0x200000"; | |
233 | handler->CreateConfiguration("RawDDL13", rawPubComp, NULL, cmd13); | |
234 | handler->CreateConfiguration("RawDDL14", rawPubComp, NULL, cmd14); | |
235 | handler->CreateConfiguration("RawDDL15", rawPubComp, NULL, cmd15); | |
236 | handler->CreateConfiguration("RawDDL16", rawPubComp, NULL, cmd16); | |
237 | handler->CreateConfiguration("RawDDL17", rawPubComp, NULL, cmd17); | |
238 | handler->CreateConfiguration("RawDDL18", rawPubComp, NULL, cmd18); | |
239 | handler->CreateConfiguration("RawDDL19", rawPubComp, NULL, cmd19); | |
240 | handler->CreateConfiguration("RawDDL20", rawPubComp, NULL, cmd20); | |
241 | handler->CreateConfiguration("RawDDL21", rawPubComp, NULL, cmd21); | |
242 | handler->CreateConfiguration("RawDDL22", rawPubComp, NULL, cmd22); | |
243 | const char* hrId = AliHLTMUONConstants::HitReconstructorId(); | |
244 | const char* trId = AliHLTMUONConstants::TriggerReconstructorId(); | |
245 | handler->CreateConfiguration("RecoRawDDL13", hrId, "RawDDL13", "-ddl 13 -cdb"); | |
246 | handler->CreateConfiguration("RecoRawDDL14", hrId, "RawDDL14", "-ddl 14 -cdb"); | |
247 | handler->CreateConfiguration("RecoRawDDL15", hrId, "RawDDL15", "-ddl 15 -cdb"); | |
248 | handler->CreateConfiguration("RecoRawDDL16", hrId, "RawDDL16", "-ddl 16 -cdb"); | |
249 | handler->CreateConfiguration("RecoRawDDL17", hrId, "RawDDL17", "-ddl 17 -cdb"); | |
250 | handler->CreateConfiguration("RecoRawDDL18", hrId, "RawDDL18", "-ddl 18 -cdb"); | |
251 | handler->CreateConfiguration("RecoRawDDL19", hrId, "RawDDL19", "-ddl 19 -cdb"); | |
252 | handler->CreateConfiguration("RecoRawDDL20", hrId, "RawDDL20", "-ddl 20 -cdb"); | |
253 | handler->CreateConfiguration("RecoRawDDL21", trId, "RawDDL21", "-ddl 21 -cdb -suppress_partial_triggers"); | |
254 | handler->CreateConfiguration("RecoRawDDL22", trId, "RawDDL22", "-ddl 22 -cdb -suppress_partial_triggers"); | |
255 | ||
256 | const char* recoSrcs = "RecoRawDDL13 RecoRawDDL14 RecoRawDDL15 RecoRawDDL16 RecoRawDDL17" | |
257 | " RecoRawDDL18 RecoRawDDL19 RecoRawDDL20 RecoRawDDL21 RecoRawDDL22"; | |
258 | handler->CreateConfiguration("MansoTrackerForRaw", trackerId, recoSrcs, ""); | |
259 | ||
147b1df7 | 260 | handler->CreateConfiguration("DecisionForRaw", decCompId, "MansoTrackerForRaw", ""); |
261 | ||
262 | TString outputSrcs = "DecisionForRaw MansoTrackerForRaw "; | |
263 | outputSrcs += recoSrcs; | |
264 | handler->CreateConfiguration("dHLT-sim-fromRaw", "BlockFilter", outputSrcs, ""); | |
887a669c | 265 | } |
266 | ||
267 | if (runloader != NULL) | |
268 | { | |
269 | // Implement the dHLT-sim dHLT simulation chain reading from | |
270 | // simulated digits. | |
271 | const char* digitPub = AliHLTMUONConstants::DigitPublisherId(); | |
272 | handler->CreateConfiguration("DigitDDL13", digitPub, NULL, "-simdata -ddl 13"); | |
273 | handler->CreateConfiguration("DigitDDL14", digitPub, NULL, "-simdata -ddl 14"); | |
274 | handler->CreateConfiguration("DigitDDL15", digitPub, NULL, "-simdata -ddl 15"); | |
275 | handler->CreateConfiguration("DigitDDL16", digitPub, NULL, "-simdata -ddl 16"); | |
276 | handler->CreateConfiguration("DigitDDL17", digitPub, NULL, "-simdata -ddl 17"); | |
277 | handler->CreateConfiguration("DigitDDL18", digitPub, NULL, "-simdata -ddl 18"); | |
278 | handler->CreateConfiguration("DigitDDL19", digitPub, NULL, "-simdata -ddl 19"); | |
279 | handler->CreateConfiguration("DigitDDL20", digitPub, NULL, "-simdata -ddl 20"); | |
280 | handler->CreateConfiguration("DigitDDL21", digitPub, NULL, "-simdata -ddl 21"); | |
281 | handler->CreateConfiguration("DigitDDL22", digitPub, NULL, "-simdata -ddl 22"); | |
282 | const char* hrId = AliHLTMUONConstants::HitReconstructorId(); | |
283 | const char* trId = AliHLTMUONConstants::TriggerReconstructorId(); | |
284 | handler->CreateConfiguration("RecoDDL13", hrId, "DigitDDL13", "-ddl 13 -cdb"); | |
285 | handler->CreateConfiguration("RecoDDL14", hrId, "DigitDDL14", "-ddl 14 -cdb"); | |
286 | handler->CreateConfiguration("RecoDDL15", hrId, "DigitDDL15", "-ddl 15 -cdb"); | |
287 | handler->CreateConfiguration("RecoDDL16", hrId, "DigitDDL16", "-ddl 16 -cdb"); | |
288 | handler->CreateConfiguration("RecoDDL17", hrId, "DigitDDL17", "-ddl 17 -cdb"); | |
289 | handler->CreateConfiguration("RecoDDL18", hrId, "DigitDDL18", "-ddl 18 -cdb"); | |
290 | handler->CreateConfiguration("RecoDDL19", hrId, "DigitDDL19", "-ddl 19 -cdb"); | |
291 | handler->CreateConfiguration("RecoDDL20", hrId, "DigitDDL20", "-ddl 20 -cdb"); | |
292 | handler->CreateConfiguration("RecoDDL21", trId, "DigitDDL21", "-ddl 21 -cdb -suppress_partial_triggers"); | |
293 | handler->CreateConfiguration("RecoDDL22", trId, "DigitDDL22", "-ddl 22 -cdb -suppress_partial_triggers"); | |
294 | ||
295 | const char* recoSrcs = "RecoDDL13 RecoDDL14 RecoDDL15 RecoDDL16 RecoDDL17" | |
296 | " RecoDDL18 RecoDDL19 RecoDDL20 RecoDDL21 RecoDDL22"; | |
297 | handler->CreateConfiguration("MansoTracker", trackerId, recoSrcs, ""); | |
298 | ||
147b1df7 | 299 | handler->CreateConfiguration("Decision", decCompId, "MansoTracker", ""); |
300 | ||
301 | TString outputSrcs = "Decision MansoTracker "; | |
302 | outputSrcs += recoSrcs; | |
303 | handler->CreateConfiguration("dHLT-sim", "BlockFilter", outputSrcs.Data(), ""); | |
887a669c | 304 | |
305 | // Implement the dHLT-sim-fromMC dHLT simulation chain reading | |
306 | // Monte Carlo geant hits and putting those into a tracker component. | |
307 | const char* rhsId = AliHLTMUONConstants::RecHitsSourceId(); | |
308 | const char* trsId = AliHLTMUONConstants::TriggerRecordsSourceId(); | |
309 | handler->CreateConfiguration("HitsDDL13", rhsId, NULL, "-simdata -plane left -chamber 7"); | |
310 | handler->CreateConfiguration("HitsDDL14", rhsId, NULL, "-simdata -plane right -chamber 7"); | |
311 | handler->CreateConfiguration("HitsDDL15", rhsId, NULL, "-simdata -plane left -chamber 8"); | |
312 | handler->CreateConfiguration("HitsDDL16", rhsId, NULL, "-simdata -plane right -chamber 8"); | |
313 | handler->CreateConfiguration("HitsDDL17", rhsId, NULL, "-simdata -plane left -chamber 9"); | |
314 | handler->CreateConfiguration("HitsDDL18", rhsId, NULL, "-simdata -plane right -chamber 9"); | |
315 | handler->CreateConfiguration("HitsDDL19", rhsId, NULL, "-simdata -plane left -chamber 10"); | |
316 | handler->CreateConfiguration("HitsDDL20", rhsId, NULL, "-simdata -plane right -chamber 10"); | |
317 | handler->CreateConfiguration("TrigRecsDDL21", trsId, NULL, "-hitdata -plane left"); | |
318 | handler->CreateConfiguration("TrigRecsDDL22", trsId, NULL, "-hitdata -plane right"); | |
319 | ||
320 | const char* dataSrcs = "HitsDDL13 HitsDDL14 HitsDDL15 HitsDDL16 HitsDDL17" | |
321 | " HitsDDL18 HitsDDL19 HitsDDL20 TrigRecsDDL21 TrigRecsDDL22"; | |
322 | handler->CreateConfiguration("MansoTrackerForMC", trackerId, dataSrcs, ""); | |
323 | ||
147b1df7 | 324 | handler->CreateConfiguration("DecisionForMC", decCompId, "MansoTrackerForMC", ""); |
325 | ||
326 | outputSrcs = "DecisionForMC MansoTrackerForMC "; | |
327 | outputSrcs += dataSrcs; | |
328 | handler->CreateConfiguration("dHLT-sim-fromMC", "BlockFilter", outputSrcs.Data(), ""); | |
887a669c | 329 | } |
330 | ||
94135365 | 331 | // Create a chain for generating AliESDEvent objects from dHLT raw reconstructed data. |
332 | handler->CreateConfiguration("HLTOUTPubTrigRecs", "AliHLTOUTPublisher", NULL, "-datatype 'TRIGRECS' 'MUON'"); | |
333 | handler->CreateConfiguration("HLTOUTPubMansoTracks", "AliHLTOUTPublisher", NULL, "-datatype 'MANTRACK' 'MUON'"); | |
334 | handler->CreateConfiguration( | |
335 | "dHLT-make-esd", | |
336 | AliHLTMUONConstants::ESDMakerId(), | |
337 | "HLTOUTPubTrigRecs HLTOUTPubMansoTracks", | |
338 | "-make_minimal_esd" | |
339 | ); | |
340 | ||
341 | // Create a chain for rootifying the raw dHLT data and dumping to file. | |
342 | // This is used during AliRoot reconstruction. | |
343 | handler->CreateConfiguration("HLTOUTPubTrigDbg", "AliHLTOUTPublisher", NULL, "-datatype 'TRIGRDBG' 'MUON'"); | |
344 | handler->CreateConfiguration("HLTOUTPubHits", "AliHLTOUTPublisher", NULL, "-datatype 'RECHITS ' 'MUON'"); | |
345 | handler->CreateConfiguration("HLTOUTPubClusters", "AliHLTOUTPublisher", NULL, "-datatype 'CLUSTERS' 'MUON'"); | |
346 | handler->CreateConfiguration("HLTOUTPubChannels", "AliHLTOUTPublisher", NULL, "-datatype 'CHANNELS' 'MUON'"); | |
347 | handler->CreateConfiguration("HLTOUTPubCandidates", "AliHLTOUTPublisher", NULL, "-datatype 'MNCANDID' 'MUON'"); | |
348 | handler->CreateConfiguration("HLTOUTPubSingles", "AliHLTOUTPublisher", NULL, "-datatype 'DECIDSIN' 'MUON'"); | |
349 | handler->CreateConfiguration("HLTOUTPubPairs", "AliHLTOUTPublisher", NULL, "-datatype 'DECIDPAR' 'MUON'"); | |
350 | handler->CreateConfiguration( | |
351 | "HLTOUTConverter", | |
352 | AliHLTMUONConstants::RootifierComponentId(), | |
353 | "HLTOUTPubTrigRecs HLTOUTPubTrigDbg HLTOUTPubHits HLTOUTPubClusters" | |
354 | " HLTOUTPubChannels HLTOUTPubMansoTracks HLTOUTPubCandidates" | |
355 | " HLTOUTPubSingles HLTOUTPubPairs", | |
356 | "" | |
357 | ); | |
358 | handler->CreateConfiguration( | |
359 | "dHLT-rootify-and-dump", | |
360 | "ROOTFileWriter", | |
361 | "HLTOUTConverter", | |
362 | "-concatenate-events -datafile dHLTRawData.root -specfmt" | |
363 | ); | |
364 | ||
d1ff7c16 | 365 | return 0; |
366 | } | |
6253e09b | 367 | |
368 | ||
369 | int AliHLTMUONAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const | |
370 | { | |
371 | /// | |
372 | /// Registers all available components of this module. | |
373 | /// @param pHandler [in] instance of the component handler. | |
374 | /// | |
375 | ||
376 | if (pHandler == NULL) return -EINVAL; | |
377 | pHandler->AddComponent(new AliHLTMUONRecHitsSource); | |
378 | pHandler->AddComponent(new AliHLTMUONTriggerRecordsSource); | |
887a669c | 379 | pHandler->AddComponent(new AliHLTMUONDigitPublisherComponent); |
6253e09b | 380 | pHandler->AddComponent(new AliHLTMUONRootifierComponent); |
381 | pHandler->AddComponent(new AliHLTMUONHitReconstructorComponent); | |
382 | pHandler->AddComponent(new AliHLTMUONTriggerReconstructorComponent); | |
383 | pHandler->AddComponent(new AliHLTMUONMansoTrackerFSMComponent); | |
c9537879 | 384 | pHandler->AddComponent(new AliHLTMUONDecisionComponent); |
649ab027 | 385 | pHandler->AddComponent(new AliHLTMUONESDMaker); |
0528e93a | 386 | pHandler->AddComponent(new AliHLTMUONEmptyEventFilterComponent); |
dba14d7d | 387 | pHandler->AddComponent(new AliHLTMUONDataCheckerComponent); |
17d68f2a | 388 | pHandler->AddComponent(new AliHLTMUONClusterFinderComponent); |
a63da6d6 | 389 | pHandler->AddComponent(new AliHLTMUONRawDataHistoComponent); |
6253e09b | 390 | return 0; |
391 | } | |
392 | ||
94135365 | 393 | |
394 | int AliHLTMUONAgent::GetHandlerDescription( | |
395 | AliHLTComponentDataType dt, | |
396 | #ifdef __DEBUG | |
397 | AliHLTUInt32_t spec, | |
398 | #else | |
399 | AliHLTUInt32_t /*spec*/, | |
400 | #endif | |
401 | AliHLTOUTHandlerDesc& desc | |
402 | ) const | |
403 | { | |
404 | /// Get handler decription for MUON data in the HLTOUT data stream. | |
405 | ||
406 | if (dt == AliHLTMUONConstants::TriggerRecordsBlockDataType() or | |
407 | dt == AliHLTMUONConstants::MansoTracksBlockDataType() | |
408 | ) | |
409 | { | |
410 | HLTDebug("Indicating we can handle data type = %s and specification" | |
411 | " = 0x%8.8X with dHLT-make-esd chain", | |
412 | AliHLTComponent::DataType2Text(dt).c_str(), | |
413 | spec | |
414 | ); | |
415 | desc = AliHLTOUTHandlerDesc(kChain, dt, "dHLT-make-esd"); | |
416 | return 1; | |
417 | } | |
418 | ||
419 | if (dt == AliHLTMUONConstants::TriggerRecordsBlockDataType() or | |
420 | dt == AliHLTMUONConstants::TrigRecsDebugBlockDataType() or | |
421 | dt == AliHLTMUONConstants::RecHitsBlockDataType() or | |
422 | dt == AliHLTMUONConstants::ClusterBlockDataType() or | |
423 | dt == AliHLTMUONConstants::ChannelBlockDataType() or | |
424 | dt == AliHLTMUONConstants::MansoTracksBlockDataType() or | |
425 | dt == AliHLTMUONConstants::MansoCandidatesBlockDataType() or | |
426 | dt == AliHLTMUONConstants::SinglesDecisionBlockDataType() or | |
427 | dt == AliHLTMUONConstants::PairsDecisionBlockDataType() | |
428 | ) | |
429 | { | |
430 | HLTDebug("Indicating we can handle data type = %s and specification" | |
431 | " = 0x%8.8X with dHLT-rootify-and-dump chain", | |
432 | AliHLTComponent::DataType2Text(dt).c_str(), | |
433 | spec | |
434 | ); | |
435 | desc = AliHLTOUTHandlerDesc(kChain, dt, "dHLT-rootify-and-dump"); | |
436 | return 1; | |
437 | } | |
438 | ||
439 | return 0; | |
440 | } | |
441 | ||
442 | ||
443 | AliHLTOUTHandler* AliHLTMUONAgent::GetOutputHandler( | |
444 | AliHLTComponentDataType dt, | |
445 | #ifdef __DEBUG | |
446 | AliHLTUInt32_t spec | |
447 | #else | |
448 | AliHLTUInt32_t /*spec*/ | |
449 | #endif | |
450 | ) | |
451 | { | |
452 | /// Get specific handler for MUON data in the HLTOUT data stream. | |
453 | ||
454 | HLTDebug("Trying to create HLTOUT handler for data type = %s and" | |
455 | " specification = 0x%8.8X", | |
456 | AliHLTComponent::DataType2Text(dt).c_str(), | |
457 | spec | |
458 | ); | |
459 | ||
460 | if (dt == AliHLTMUONConstants::TriggerRecordsBlockDataType() or | |
461 | dt == AliHLTMUONConstants::MansoTracksBlockDataType() | |
462 | ) | |
463 | { | |
464 | return &fgkESDMakerChain; | |
465 | } | |
466 | ||
467 | if (dt == AliHLTMUONConstants::TriggerRecordsBlockDataType() or | |
468 | dt == AliHLTMUONConstants::TrigRecsDebugBlockDataType() or | |
469 | dt == AliHLTMUONConstants::RecHitsBlockDataType() or | |
470 | dt == AliHLTMUONConstants::ClusterBlockDataType() or | |
471 | dt == AliHLTMUONConstants::ChannelBlockDataType() or | |
472 | dt == AliHLTMUONConstants::MansoTracksBlockDataType() or | |
473 | dt == AliHLTMUONConstants::MansoCandidatesBlockDataType() or | |
474 | dt == AliHLTMUONConstants::SinglesDecisionBlockDataType() or | |
475 | dt == AliHLTMUONConstants::PairsDecisionBlockDataType() | |
476 | ) | |
477 | { | |
478 | return &fgkRootifyDumpChain; | |
479 | } | |
480 | ||
481 | return NULL; | |
482 | } | |
483 | ||
484 | ||
485 | int AliHLTMUONAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance) | |
486 | { | |
487 | /// Deletes the HLTOUT handlers. In this case since the handlers are | |
488 | /// allocated statically, we just check that the right pointer was | |
489 | /// given and exit. | |
490 | ||
491 | HLTDebug("Trying to delete HLTOUT handler: %p", pInstance); | |
492 | ||
493 | if (pInstance != &fgkESDMakerChain or pInstance != &fgkRootifyDumpChain) | |
494 | return -EINVAL; | |
495 | ||
496 | return 0; | |
497 | } |