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