]>
Commit | Line | Data |
---|---|---|
51e9ec2a | 1 | // $Id$ |
5578cf60 | 2 | |
0efebbac | 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 | //************************************************************************** | |
5578cf60 | 18 | |
51e9ec2a | 19 | // @file AliHLTTPCAgent.cxx |
20 | // @author Matthias Richter | |
21 | // @date | |
22 | // @brief Agent of the libAliHLTTPC library | |
23 | // @note | |
5578cf60 | 24 | |
25 | #include "AliHLTTPCAgent.h" | |
626bfcc1 | 26 | #include "AliHLTTPCDefinitions.h" |
27 | #include "AliHLTOUT.h" | |
73449074 | 28 | #include "AliHLTOUTHandlerChain.h" |
352670bf | 29 | #include "AliRunLoader.h" |
286c9940 | 30 | #include "AliCDBManager.h" |
31 | #include "AliCDBEntry.h" | |
32 | #include "AliTPCParam.h" | |
5578cf60 | 33 | |
34 | /** global instance for agent registration */ | |
35 | AliHLTTPCAgent gAliHLTTPCAgent; | |
36 | ||
e1440dab | 37 | // component headers |
672f8b8c | 38 | #include "AliHLTTPCCompModelInflaterComponent.h" |
39 | #include "AliHLTTPCCompModelDeflaterComponent.h" | |
40 | #include "AliHLTTPCCompModelDeconverterComponent.h" | |
41 | #include "AliHLTTPCCompModelConverterComponent.h" | |
42 | #include "AliHLTTPCCompDumpComponent.h" | |
32e0c022 | 43 | //#include "AliHLTTPCCalibCEComponent.h" |
44 | //#include "AliHLTTPCCalibPulserComponent.h" | |
45 | //#include "AliHLTTPCCalibPedestalComponent.h" | |
751d16ac | 46 | #include "AliHLTTPCCAInputDataCompressorComponent.h" |
400d857a | 47 | #include "AliHLTTPCCATrackerComponent.h" |
ae481371 | 48 | #include "AliHLTTPCCATrackerOutputConverter.h" |
a6fb14f5 | 49 | #include "AliHLTTPCTrackMCMarkerComponent.h" |
400d857a | 50 | #include "AliHLTTPCCAGlobalMergerComponent.h" |
0973c527 | 51 | #include "AliHLTTPCdEdxComponent.h" |
672f8b8c | 52 | #include "AliHLTTPCGlobalMergerComponent.h" |
53 | #include "AliHLTTPCSliceTrackerComponent.h" | |
672f8b8c | 54 | #include "AliHLTTPCClusterFinderComponent.h" |
55 | #include "AliHLTTPCRawDataUnpackerComponent.h" | |
56 | #include "AliHLTTPCDigitPublisherComponent.h" | |
e1440dab | 57 | #include "AliHLTTPCDigitDumpComponent.h" |
0efebbac | 58 | #include "AliHLTTPCClusterDumpComponent.h" |
f32b83e1 | 59 | #include "AliHLTTPCEsdWriterComponent.h" |
1ac82ce6 | 60 | #include "AliHLTTPCOfflineClustererComponent.h" |
61 | #include "AliHLTTPCOfflineTrackerComponent.h" | |
0e442a0a | 62 | #include "AliHLTTPCOfflineTrackerCalibComponent.h" |
32e0c022 | 63 | #include "AliHLTTPCOfflineCalibrationComponent.h" // to be added to the calibration library agent |
0efebbac | 64 | #include "AliHLTTPCClusterHistoComponent.h" |
3a3550fa | 65 | #include "AliHLTTPCHistogramHandlerComponent.h" |
32e0c022 | 66 | //#include "AliHLTTPCCalibTracksComponent.h" |
22f34176 | 67 | #include "AliHLTTPCTrackHistoComponent.h" |
68 | #include "AliHLTTPCTrackDumpComponent.h" | |
a912b63b | 69 | #include "AliHLTTPCHWCFDataReverterComponent.h" |
6af4f584 | 70 | #include "AliHLTTPCHWClusterTransformComponent.h" |
cfe8311c | 71 | #include "AliHLTTPCCFComparisonComponent.h" |
32e0c022 | 72 | // #include "AliHLTTPCCalibSeedMakerComponent.h" |
73 | // #include "AliHLTTPCCalibTimeComponent.h" | |
74 | // #include "AliHLTTPCCalibTimeGainComponent.h" | |
75 | // #include "AliHLTTPCCalibrationComponent.h" | |
098c0d28 | 76 | #include "AliHLTTPCDataCheckerComponent.h" |
e1440dab | 77 | |
5578cf60 | 78 | /** ROOT macro for the implementation of ROOT specific class methods */ |
79 | ClassImp(AliHLTTPCAgent) | |
80 | ||
81 | AliHLTTPCAgent::AliHLTTPCAgent() | |
51e9ec2a | 82 | : AliHLTModuleAgent("TPC") |
83 | , fRawDataHandler(NULL) | |
84 | , fTracksegsDataHandler(NULL) | |
85 | , fClustersDataHandler(NULL) | |
5578cf60 | 86 | { |
87 | // see header file for class documentation | |
88 | // or | |
89 | // refer to README to build package | |
90 | // or | |
91 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
92 | } | |
93 | ||
94 | AliHLTTPCAgent::~AliHLTTPCAgent() | |
95 | { | |
96 | // see header file for class documentation | |
97 | } | |
98 | ||
99 | int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler, | |
4fc08fff | 100 | AliRawReader* rawReader, |
7c6a3cd3 | 101 | AliRunLoader* runloader) const |
5578cf60 | 102 | { |
103 | // see header file for class documentation | |
104 | if (handler) { | |
672f8b8c | 105 | |
106 | // This the tracking configuration for the full TPC | |
107 | // - 216 clusterfinders (1 per partition) | |
108 | // - 36 slice trackers | |
109 | // - one global merger | |
110 | // - the esd converter | |
111 | // The ESD is shipped embedded into a TTree | |
dfa1592e | 112 | int iMinSlice=0; |
672f8b8c | 113 | int iMaxSlice=35; |
dfa1592e | 114 | int iMinPart=0; |
672f8b8c | 115 | int iMaxPart=5; |
116 | TString mergerInput; | |
84bb5f35 | 117 | TString sinkClusterInput; |
5090799b | 118 | TString dEdXInput; |
dfa1592e | 119 | for (int slice=iMinSlice; slice<=iMaxSlice; slice++) { |
120 | TString trackerInput; | |
121 | for (int part=iMinPart; part<=iMaxPart; part++) { | |
122 | TString arg, publisher, cf; | |
123 | ||
124 | // digit publisher components | |
0ba35c53 | 125 | publisher.Form("TPC-DP_%02d_%d", slice, part); |
7c6a3cd3 | 126 | if (rawReader || !runloader) { |
127 | // AliSimulation: use the AliRawReaderPublisher if the raw reader is available | |
128 | // Alireconstruction: indicated by runloader==NULL, run always on raw data | |
4fc08fff | 129 | int ddlno=768; |
130 | if (part>1) ddlno+=72+4*slice+(part-2); | |
131 | else ddlno+=2*slice+part; | |
132 | arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x -silent", ddlno, slice, slice, part, part); | |
133 | handler->CreateConfiguration(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data()); | |
7c6a3cd3 | 134 | } else { |
135 | arg.Form("-slice %d -partition %d", slice, part); | |
136 | handler->CreateConfiguration(publisher.Data(), "TPCDigitPublisher", NULL , arg.Data()); | |
4fc08fff | 137 | } |
dfa1592e | 138 | |
139 | // cluster finder components | |
0ba35c53 | 140 | cf.Form("TPC-CF_%02d_%d", slice, part); |
3c788ec7 | 141 | arg="-release-memory"; |
9c790772 | 142 | if (!rawReader && runloader) { |
fc7c0369 | 143 | arg+=" -do-mc"; |
286c9940 | 144 | handler->CreateConfiguration(cf.Data(), "TPCClusterFinderUnpacked", publisher.Data(), arg.Data()); |
4fc08fff | 145 | } else { |
9c790772 | 146 | #ifndef HAVE_NOT_ALTRORAWSTREAMV3 |
3c788ec7 | 147 | handler->CreateConfiguration(cf.Data(), "TPCClusterFinder32Bit", publisher.Data(),arg.Data()); |
9c790772 | 148 | #else |
149 | // using the AltroDecoder if the official V3 decoder is not | |
150 | // available in the offline code | |
286c9940 | 151 | handler->CreateConfiguration(cf.Data(), "TPCClusterFinderDecoder", publisher.Data(), arg.Data()); |
9c790772 | 152 | #endif |
4fc08fff | 153 | } |
dfa1592e | 154 | if (trackerInput.Length()>0) trackerInput+=" "; |
155 | trackerInput+=cf; | |
5090799b | 156 | if (dEdXInput.Length()>0) dEdXInput+=" "; |
157 | dEdXInput+=cf; | |
84bb5f35 | 158 | if (sinkClusterInput.Length()>0) sinkClusterInput+=" "; |
159 | sinkClusterInput+=cf; | |
dfa1592e | 160 | } |
161 | TString tracker; | |
162 | // tracker finder components | |
0ba35c53 | 163 | tracker.Form("TPC-TR_%02d", slice); |
fc7c0369 | 164 | handler->CreateConfiguration(tracker.Data(), "TPCCATracker", trackerInput.Data(), ""); |
dfa1592e | 165 | |
672f8b8c | 166 | if (mergerInput.Length()>0) mergerInput+=" "; |
167 | mergerInput+=tracker; | |
dfa1592e | 168 | |
dfa1592e | 169 | } |
5578cf60 | 170 | |
672f8b8c | 171 | // GlobalMerger component |
fc7c0369 | 172 | handler->CreateConfiguration("TPC-globalmerger","TPCCAGlobalMerger",mergerInput.Data(),""); |
672f8b8c | 173 | |
5090799b | 174 | if (dEdXInput.Length()>0) dEdXInput+=" "; |
175 | dEdXInput+="TPC-globalmerger"; | |
176 | ||
177 | handler->CreateConfiguration("TPC-dEdx","TPCdEdx",dEdXInput.Data(),""); | |
178 | ||
672f8b8c | 179 | // the esd converter configuration |
791fbeb7 | 180 | TString converterInput="TPC-globalmerger"; |
9c790772 | 181 | if (!rawReader && runloader) { |
791fbeb7 | 182 | // propagate cluster info to the esd converter in order to fill the MC information |
6595fdc6 | 183 | handler->CreateConfiguration("TPC-clustermc-info", "BlockFilter" , sinkClusterInput.Data(), "-datatype 'CLMCINFO' 'TPC '"); |
184 | handler->CreateConfiguration("TPC-mcTrackMarker","TPCTrackMCMarker","TPC-globalmerger TPC-clustermc-info","" ); | |
791fbeb7 | 185 | converterInput+=" "; |
6595fdc6 | 186 | converterInput+="TPC-mcTrackMarker"; |
791fbeb7 | 187 | } |
188 | handler->CreateConfiguration("TPC-esd-converter", "TPCEsdConverter" , converterInput.Data(), ""); | |
73449074 | 189 | |
84bb5f35 | 190 | // cluster dump collection |
191 | handler->CreateConfiguration("TPC-clusters", "BlockFilter" , sinkClusterInput.Data(), "-datatype 'CLUSTERS' 'TPC '"); | |
192 | ||
73449074 | 193 | ///////////////////////////////////////////////////////////////////////////////////// |
194 | // | |
195 | // a kChain HLTOUT configuration for processing of {'TRAKSEGS':'TPC '} data blocks | |
196 | // collects the data blocks, merges the tracks and produces an ESD object | |
197 | ||
198 | // publisher component | |
199 | handler->CreateConfiguration("TPC-hltout-tracksegs-publisher", "AliHLTOUTPublisher" , NULL, ""); | |
200 | ||
201 | // GlobalMerger component | |
202 | handler->CreateConfiguration("TPC-hltout-tracksegs-merger", "TPCGlobalMerger", "TPC-hltout-tracksegs-publisher", ""); | |
203 | ||
204 | // the esd converter configuration | |
205 | handler->CreateConfiguration("TPC-hltout-tracksegs-esd-converter", "TPCEsdConverter", "TPC-hltout-tracksegs-merger", ""); | |
206 | ||
207 | ///////////////////////////////////////////////////////////////////////////////////// | |
208 | // | |
209 | // a kChain HLTOUT configuration for processing of {'TRACKS ':'TPC '} data blocks | |
210 | // produces an ESD object from the track structure | |
211 | ||
212 | // publisher component | |
213 | handler->CreateConfiguration("TPC-hltout-tracks-publisher", "AliHLTOUTPublisher" , NULL, ""); | |
214 | ||
215 | // the esd converter configuration | |
216 | handler->CreateConfiguration("TPC-hltout-tracks-esd-converter", "TPCEsdConverter", "TPC-hltout-tracks-publisher", ""); | |
51e9ec2a | 217 | |
218 | ///////////////////////////////////////////////////////////////////////////////////// | |
219 | // | |
220 | // a kChain HLTOUT configuration for processing of {'CLUSTERS':'TPC '} data blocks | |
221 | // stores the blocks in file HLT.TPC.Clusters.root in HOMER format | |
222 | ||
223 | // publisher component | |
224 | handler->CreateConfiguration("TPC-hltout-cluster-publisher", "AliHLTOUTPublisher" , NULL, ""); | |
225 | ||
226 | // the HLTOUT component collects the blocks and stores the file | |
227 | handler->CreateConfiguration("TPC-hltout-cluster-dump", "HLTOUT", "TPC-hltout-cluster-publisher", "-digitfile HLT.TPC.Clusters.root -rawout=off -links 2"); | |
5578cf60 | 228 | } |
51e9ec2a | 229 | |
5578cf60 | 230 | return 0; |
231 | } | |
232 | ||
dee38f1b | 233 | const char* AliHLTTPCAgent::GetReconstructionChains(AliRawReader* /*rawReader*/, |
ff6648de | 234 | AliRunLoader* runloader) const |
5578cf60 | 235 | { |
236 | // see header file for class documentation | |
ff6648de | 237 | if (runloader) { |
238 | // reconstruction chains for AliRoot simulation | |
239 | // Note: run loader is only available while running embedded into | |
240 | // AliRoot simulation | |
6595fdc6 | 241 | //if (runloader->GetLoader("TPCLoader") != NULL) |
242 | //return "TPC-esd-converter TPC-clusters"; | |
e9f84626 | 243 | |
244 | // 2010-10-26 TPC clusters not written to HLTOUT in order to make the simulation | |
245 | // closer to the real data | |
246 | //return "TPC-clusters"; | |
ff6648de | 247 | } |
248 | return NULL; | |
5578cf60 | 249 | } |
250 | ||
251 | const char* AliHLTTPCAgent::GetRequiredComponentLibraries() const | |
252 | { | |
253 | // see header file for class documentation | |
5ad1e184 | 254 | |
255 | // actually, the TPC library has dependencies to Util and RCU | |
256 | // so the two has to be loaded anyhow before we get here | |
257 | //return "libAliHLTUtil.so libAliHLTRCU.so"; | |
9c790772 | 258 | return "libAliHLTUtil.so"; |
5578cf60 | 259 | } |
f3506ea2 | 260 | |
e1440dab | 261 | int AliHLTTPCAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const |
f3506ea2 | 262 | { |
e1440dab | 263 | // see header file for class documentation |
264 | if (!pHandler) return -EINVAL; | |
672f8b8c | 265 | |
32e0c022 | 266 | // pHandler->AddComponent(new AliHLTTPCCalibCEComponent); |
267 | // pHandler->AddComponent(new AliHLTTPCCalibPulserComponent); | |
268 | // pHandler->AddComponent(new AliHLTTPCCalibPedestalComponent); | |
672f8b8c | 269 | pHandler->AddComponent(new AliHLTTPCCompModelInflaterComponent); |
270 | pHandler->AddComponent(new AliHLTTPCCompModelDeflaterComponent); | |
271 | pHandler->AddComponent(new AliHLTTPCCompModelDeconverterComponent); | |
272 | pHandler->AddComponent(new AliHLTTPCCompModelConverterComponent); | |
273 | pHandler->AddComponent(new AliHLTTPCCompDumpComponent); | |
751d16ac | 274 | pHandler->AddComponent(new AliHLTTPCCAInputDataCompressorComponent); |
400d857a | 275 | pHandler->AddComponent(new AliHLTTPCCATrackerComponent); |
ae481371 | 276 | pHandler->AddComponent(new AliHLTTPCCATrackerOutputConverter); |
400d857a | 277 | pHandler->AddComponent(new AliHLTTPCCAGlobalMergerComponent); |
a6fb14f5 | 278 | pHandler->AddComponent(new AliHLTTPCTrackMCMarkerComponent); |
672f8b8c | 279 | pHandler->AddComponent(new AliHLTTPCGlobalMergerComponent); |
0973c527 | 280 | pHandler->AddComponent(new AliHLTTPCdEdxComponent); |
672f8b8c | 281 | pHandler->AddComponent(new AliHLTTPCSliceTrackerComponent); |
672f8b8c | 282 | pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinderPacked)); |
283 | pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinderUnpacked)); | |
284 | pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinderDecoder)); | |
6f23f6cc | 285 | pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinder32Bit)); |
672f8b8c | 286 | pHandler->AddComponent(new AliHLTTPCRawDataUnpackerComponent); |
287 | pHandler->AddComponent(new AliHLTTPCDigitPublisherComponent); | |
e1440dab | 288 | pHandler->AddComponent(new AliHLTTPCDigitDumpComponent); |
0efebbac | 289 | pHandler->AddComponent(new AliHLTTPCClusterDumpComponent); |
f32b83e1 | 290 | pHandler->AddComponent(new AliHLTTPCEsdWriterComponent::AliWriter); |
291 | pHandler->AddComponent(new AliHLTTPCEsdWriterComponent::AliConverter); | |
1ac82ce6 | 292 | pHandler->AddComponent(new AliHLTTPCOfflineClustererComponent); |
293 | pHandler->AddComponent(new AliHLTTPCOfflineTrackerComponent); | |
0e442a0a | 294 | pHandler->AddComponent(new AliHLTTPCOfflineTrackerCalibComponent); |
e642ae99 | 295 | pHandler->AddComponent(new AliHLTTPCOfflineCalibrationComponent); |
0efebbac | 296 | pHandler->AddComponent(new AliHLTTPCClusterHistoComponent); |
3a3550fa | 297 | pHandler->AddComponent(new AliHLTTPCHistogramHandlerComponent); |
32e0c022 | 298 | //pHandler->AddComponent(new AliHLTTPCCalibTracksComponent); |
22f34176 | 299 | pHandler->AddComponent(new AliHLTTPCTrackHistoComponent); |
300 | pHandler->AddComponent(new AliHLTTPCTrackDumpComponent); | |
a912b63b | 301 | pHandler->AddComponent(new AliHLTTPCHWCFDataReverterComponent); |
6af4f584 | 302 | pHandler->AddComponent(new AliHLTTPCHWClusterTransformComponent); |
cfe8311c | 303 | pHandler->AddComponent(new AliHLTTPCCFComparisonComponent); |
32e0c022 | 304 | // pHandler->AddComponent(new AliHLTTPCCalibSeedMakerComponent); |
305 | // pHandler->AddComponent(new AliHLTTPCCalibTimeComponent); | |
306 | // pHandler->AddComponent(new AliHLTTPCCalibTimeGainComponent); | |
307 | // pHandler->AddComponent(new AliHLTTPCCalibrationComponent); | |
098c0d28 | 308 | pHandler->AddComponent(new AliHLTTPCDataCheckerComponent); |
a912b63b | 309 | |
f3506ea2 | 310 | return 0; |
311 | } | |
626bfcc1 | 312 | |
313 | int AliHLTTPCAgent::GetHandlerDescription(AliHLTComponentDataType dt, | |
314 | AliHLTUInt32_t spec, | |
315 | AliHLTOUTHandlerDesc& desc) const | |
316 | { | |
317 | // see header file for class documentation | |
73449074 | 318 | |
319 | // raw data blocks to be fed into offline reconstruction | |
626bfcc1 | 320 | if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTPC)) { |
321 | int slice=AliHLTTPCDefinitions::GetMinSliceNr(spec); | |
322 | int part=AliHLTTPCDefinitions::GetMinPatchNr(spec); | |
323 | if (slice==AliHLTTPCDefinitions::GetMaxSliceNr(spec) && | |
324 | part==AliHLTTPCDefinitions::GetMaxPatchNr(spec)) { | |
325 | desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId()); | |
326 | return 1; | |
327 | } else { | |
328 | HLTWarning("handler can not process merged data from multiple ddls:" | |
329 | " min slice %d, max slice %d, min part %d, max part %d", | |
330 | slice, AliHLTTPCDefinitions::GetMaxSliceNr(spec), | |
331 | part, AliHLTTPCDefinitions::GetMaxPatchNr(spec)); | |
332 | return 0; | |
333 | } | |
334 | } | |
73449074 | 335 | |
51e9ec2a | 336 | // dump for {'CLUSTERS':'TPC '} blocks stored in a 'digit' file |
84bb5f35 | 337 | if (dt==AliHLTTPCDefinitions::fgkClustersDataType) { |
51e9ec2a | 338 | desc=AliHLTOUTHandlerDesc(kChain, dt, GetModuleId()); |
84bb5f35 | 339 | return 1; |
340 | } | |
341 | ||
73449074 | 342 | // afterburner for {'TRAKSEGS':'TPC '} blocks to be converted to ESD format |
343 | if (dt==AliHLTTPCDefinitions::fgkTrackSegmentsDataType) { | |
344 | desc=AliHLTOUTHandlerDesc(kChain, dt, GetModuleId()); | |
345 | return 1; | |
346 | } | |
347 | ||
348 | // afterburner for {'TRACKS ':'TPC '} block to be converted to ESD format | |
349 | // there is only one data block | |
350 | if (dt==AliHLTTPCDefinitions::fgkTracksDataType) { | |
351 | desc=AliHLTOUTHandlerDesc(kChain, dt, GetModuleId()); | |
352 | return 1; | |
353 | } | |
626bfcc1 | 354 | return 0; |
355 | } | |
356 | ||
357 | AliHLTOUTHandler* AliHLTTPCAgent::GetOutputHandler(AliHLTComponentDataType dt, | |
b0914d2e | 358 | AliHLTUInt32_t /*spec*/) |
626bfcc1 | 359 | { |
360 | // see header file for class documentation | |
73449074 | 361 | |
362 | // raw data blocks to be fed into offline reconstruction | |
626bfcc1 | 363 | if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTPC)) { |
364 | if (!fRawDataHandler) { | |
365 | fRawDataHandler=new AliHLTTPCAgent::AliHLTTPCRawDataHandler; | |
366 | } | |
626bfcc1 | 367 | return fRawDataHandler; |
368 | } | |
73449074 | 369 | |
51e9ec2a | 370 | // dump for {'CLUSTERS':'TPC '}, stored in a file HLT.TPC.Clusters.root in HOMER format |
371 | if (dt==AliHLTTPCDefinitions::fgkClustersDataType) { | |
372 | if (fClustersDataHandler==NULL) | |
373 | fClustersDataHandler=new AliHLTOUTHandlerChain("chains=TPC-hltout-cluster-dump libHLTsim.so libAliHLTUtil.so"); | |
374 | return fClustersDataHandler; | |
375 | } | |
376 | ||
73449074 | 377 | // afterburner for {'TRAKSEGS':'TPC '} blocks to be converted to ESD format |
378 | // in a kChain HLTOUT handler | |
379 | if (dt==AliHLTTPCDefinitions::fgkTrackSegmentsDataType) { | |
380 | if (fTracksegsDataHandler==NULL) | |
381 | fTracksegsDataHandler=new AliHLTOUTHandlerChain("chains=TPC-hltout-tracksegs-esd-converter"); | |
382 | return fTracksegsDataHandler; | |
383 | } | |
384 | ||
385 | // afterburner for {'TRACKS ':'TPC '} block to be converted to ESD format | |
386 | // there is only one data block | |
387 | if (dt==AliHLTTPCDefinitions::fgkTracksDataType) { | |
388 | return new AliHLTOUTHandlerChain("chains=TPC-hltout-tracks-esd-converter"); | |
389 | } | |
390 | ||
626bfcc1 | 391 | return NULL; |
392 | } | |
393 | ||
394 | int AliHLTTPCAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance) | |
395 | { | |
396 | // see header file for class documentation | |
397 | if (pInstance==NULL) return -EINVAL; | |
398 | ||
399 | if (pInstance==fRawDataHandler) { | |
73449074 | 400 | delete fRawDataHandler; |
401 | fRawDataHandler=NULL; | |
402 | } | |
403 | ||
404 | if (pInstance==fTracksegsDataHandler) { | |
405 | delete fTracksegsDataHandler; | |
406 | fTracksegsDataHandler=NULL; | |
626bfcc1 | 407 | } |
51e9ec2a | 408 | |
409 | if (pInstance==fClustersDataHandler) { | |
410 | delete fClustersDataHandler; | |
411 | fClustersDataHandler=NULL; | |
412 | } | |
413 | ||
626bfcc1 | 414 | return 0; |
415 | } | |
416 | ||
417 | AliHLTTPCAgent::AliHLTTPCRawDataHandler::AliHLTTPCRawDataHandler() | |
418 | { | |
419 | // see header file for class documentation | |
420 | } | |
421 | ||
422 | AliHLTTPCAgent::AliHLTTPCRawDataHandler::~AliHLTTPCRawDataHandler() | |
423 | { | |
424 | // see header file for class documentation | |
425 | } | |
426 | ||
427 | int AliHLTTPCAgent::AliHLTTPCRawDataHandler::ProcessData(AliHLTOUT* pData) | |
428 | { | |
429 | // see header file for class documentation | |
430 | if (!pData) return -EINVAL; | |
431 | AliHLTComponentDataType dt=kAliHLTVoidDataType; | |
432 | AliHLTUInt32_t spec=kAliHLTVoidDataSpec; | |
433 | int iResult=pData->GetDataBlockDescription(dt, spec); | |
434 | if (iResult>=0) { | |
435 | int slice=AliHLTTPCDefinitions::GetMinSliceNr(spec); | |
436 | int part=AliHLTTPCDefinitions::GetMinPatchNr(spec); | |
437 | if (slice==AliHLTTPCDefinitions::GetMaxSliceNr(spec) && | |
438 | part==AliHLTTPCDefinitions::GetMaxPatchNr(spec)) { | |
439 | iResult=768; | |
440 | if (part>1) iResult+=72+4*slice+(part-2); | |
441 | else iResult+=2*slice+part; | |
442 | } else { | |
443 | HLTError("handler can not process merged data from multiple ddls:" | |
444 | " min slice %d, max slice %d, min part %d, max part %d", | |
445 | slice, AliHLTTPCDefinitions::GetMaxSliceNr(spec), | |
446 | part, AliHLTTPCDefinitions::GetMaxPatchNr(spec)); | |
447 | iResult=-EBADMSG; | |
448 | } | |
449 | } | |
450 | return iResult; | |
451 | } |