3 //**************************************************************************
4 //* This file is property of and copyright by the *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
9 //* Permission to use, copy, modify and distribute this software and its *
10 //* documentation strictly for non-commercial purposes is hereby granted *
11 //* without fee, provided that the above copyright notice appears in all *
12 //* copies and that both the copyright notice and this permission notice *
13 //* appear in the supporting documentation. The authors make no claims *
14 //* about the suitability of this software for any purpose. It is *
15 //* provided "as is" without express or implied warranty. *
16 //**************************************************************************
18 // @file AliHLTTPCAgent.cxx
19 // @author Matthias Richter
21 // @brief Agent of the libAliHLTTPC library
24 #include "AliHLTTPCAgent.h"
25 #include "AliHLTTPCDefinitions.h"
26 #include "AliHLTOUT.h"
27 #include "AliHLTOUTHandlerChain.h"
28 #include "AliHLTMisc.h"
29 #include "AliRunLoader.h"
30 #include "AliCDBManager.h"
31 #include "AliCDBEntry.h"
32 #include "AliTPCParam.h"
33 #include "AliTPCRecoParam.h"
36 /** global instance for agent registration */
37 AliHLTTPCAgent gAliHLTTPCAgent;
40 #include "AliHLTTPCCAInputDataCompressorComponent.h"
41 #include "AliHLTTPCCATrackerComponent.h"
42 #include "AliHLTTPCCATrackerOutputConverter.h"
43 #include "AliHLTTPCTrackMCMarkerComponent.h"
44 #include "AliHLTTPCCAGlobalMergerComponent.h"
45 #include "AliHLTTPCdEdxComponent.h"
46 #include "AliHLTTPCdEdxMonitoringComponent.h"
47 #include "AliHLTTPCClusterFinderComponent.h"
48 #include "AliHLTTPCRawDataUnpackerComponent.h"
49 #include "AliHLTTPCDigitPublisherComponent.h"
50 #include "AliHLTTPCDigitDumpComponent.h"
51 #include "AliHLTTPCClusterDumpComponent.h"
52 #include "AliHLTTPCClusterHistoComponent.h"
53 #include "AliHLTTPCHistogramHandlerComponent.h"
54 #include "AliHLTTPCTrackHistoComponent.h"
55 #include "AliHLTTPCTrackDumpComponent.h"
56 #include "AliHLTTPCHWCFDataReverterComponent.h"
57 #include "AliHLTTPCHWClusterTransformComponent.h"
58 #include "AliHLTTPCCFComparisonComponent.h"
59 #include "AliHLTTPCDataCheckerComponent.h"
60 #include "AliHLTTPCHWCFEmulatorComponent.h"
61 #include "AliHLTTPCHWCFConsistencyControlComponent.h"
62 #include "AliHLTTPCDataCompressionComponent.h"
63 #include "AliHLTTPCDataCompressionMonitorComponent.h"
64 #include "AliHLTTPCDataCompressionFilterComponent.h"
65 #include "AliHLTTPCDataPublisherComponent.h"
67 /** ROOT macro for the implementation of ROOT specific class methods */
68 ClassImp(AliHLTTPCAgent)
70 AliHLTTPCAgent::AliHLTTPCAgent()
71 : AliHLTModuleAgent("TPC")
72 , fRawDataHandler(NULL)
73 , fTracksegsDataHandler(NULL)
74 , fClustersDataHandler(NULL)
75 , fCompressionMonitorHandler(NULL)
77 // see header file for class documentation
79 // refer to README to build package
81 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
84 AliHLTTPCAgent::~AliHLTTPCAgent()
86 // see header file for class documentation
89 int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
90 AliRawReader* rawReader,
91 AliRunLoader* runloader) const
93 // see header file for class documentation
95 // AliSimulation: use the AliRawReaderPublisher if the raw reader is available
96 // AliReconstruction: indicated by runloader==NULL, run always on raw data
97 bool bPublishRaw=rawReader!=NULL || runloader==NULL;
99 // This the tracking configuration for the full TPC
100 // - 216 clusterfinders (1 per partition)
101 // - 36 slice trackers
102 // - one global merger
103 // - the esd converter
104 // The ESD is shipped embedded into a TTree
112 TString sinkHWClusterInput;
114 TString hwclustOutput;
115 TString compressorInput;
116 TString trackerInput;
119 arg.Form("-publish-raw filtered");
120 handler->CreateConfiguration("TPC-DP", "TPCDataPublisher", NULL , arg.Data());
122 for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
123 for (int part=iMinPart; part<=iMaxPart; part++) {
126 // digit publisher components
127 publisher.Form("TPC-DP_%02d_%d", slice, part);
129 // AliSimulation: use the AliRawReaderPublisher if the raw reader is available
130 // AliReconstruction: indicated by runloader==NULL, run always on raw data
132 if (part>1) ddlno+=72+4*slice+(part-2);
133 else ddlno+=2*slice+part;
134 arg.Form("-datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x", slice, slice, part, part);
135 handler->CreateConfiguration(publisher.Data(), "BlockFilter", "TPC-DP" , arg.Data());
136 if (sinkRawData.Length()>0) sinkRawData+=" ";
137 sinkRawData+=publisher;
139 arg.Form("-slice %d -partition %d", slice, part);
140 handler->CreateConfiguration(publisher.Data(), "TPCDigitPublisher", NULL , arg.Data());
143 // Hardware CF emulator
145 hwcfemu.Form("TPC-HWCFEmu_%02d_%d", slice, part);
147 if (!bPublishRaw) arg+=" -do-mc 1";
148 handler->CreateConfiguration(hwcfemu.Data(), "TPCHWClusterFinderEmulator", publisher.Data(), arg.Data());
149 if (hwclustOutput.Length()>0) hwclustOutput+=" ";
150 hwclustOutput+=hwcfemu;
153 hwcf.Form("TPC-HWCF_%02d_%d", slice, part);
154 handler->CreateConfiguration(hwcf.Data(), "TPCHWClusterTransform",hwcfemu.Data(), "-publish-raw");
156 if (trackerInput.Length()>0) trackerInput+=" ";
158 if (dEdXInput.Length()>0) dEdXInput+=" ";
160 if (sinkHWClusterInput.Length()>0) sinkHWClusterInput+=" ";
161 sinkHWClusterInput+=hwcf;
165 // tracker finder component
166 // 2012-01-05 changing the configuration according to online setup
167 // the tracking strategy has been changed in the online system in Sep 2011
168 // the tracker now processes all clusters, and several of this 'global' trackers
169 // run in parallel. The GlobalMerger is still in the chain as it produces the final
172 tracker.Form("TPC-TR");
173 handler->CreateConfiguration(tracker.Data(), "TPCCATracker", trackerInput.Data(), "-GlobalTracking");
175 if (mergerInput.Length()>0) mergerInput+=" ";
176 mergerInput+=tracker;
178 // GlobalMerger component
179 handler->CreateConfiguration("TPC-globalmerger","TPCCAGlobalMerger",mergerInput.Data(),"");
182 if (dEdXInput.Length()>0) dEdXInput+=" ";
183 dEdXInput+="TPC-globalmerger";
185 handler->CreateConfiguration("TPC-dEdx","TPCdEdx",dEdXInput.Data(),"");
187 // compression component
188 if (compressorInput.Length()>0) compressorInput+=" ";
189 compressorInput+=hwclustOutput;
191 // special configuration to run the emulation automatically if the compressed clusters
192 // of a particular partition is missing. This configuration is announced for reconstruction
193 // of raw data if the HLT mode of the TPC reconstruction is enabled. Compression component
194 // always needs to run in mode 1. Even if the recorded data is mode 3 (optimized partition
195 // clusters), 2 (track model compression), or 4. The emulation can not be in mode 2 or 4,
196 // since the track model block can not be identified with a partition. Have to duplicate the
197 // configuration of the compression component
198 handler->CreateConfiguration("TPC-compression-emulation", "TPCDataCompressor", compressorInput.Data(), "-mode 1");
200 if (compressorInput.Length()>0) compressorInput+=" ";
201 compressorInput+="TPC-globalmerger";
202 handler->CreateConfiguration("TPC-compression", "TPCDataCompressor", compressorInput.Data(), "");
203 handler->CreateConfiguration("TPC-compression-huffman-trainer", "TPCDataCompressor", compressorInput.Data(),"-deflater-mode 3");
204 handler->CreateConfiguration("TPC-compression-monitoring-component", "TPCDataCompressorMonitor", "TPC-compression TPC-hwcfdata","-pushback-period=30");
205 handler->CreateConfiguration("TPC-compression-monitoring", "ROOTFileWriter", "TPC-compression-monitoring-component","-concatenate-events -overwrite -datafile HLT.TPCDataCompression-statistics.root");
207 // the esd converter configuration
208 TString converterInput="TPC-globalmerger";
210 // propagate cluster info to the esd converter in order to fill the MC information
211 handler->CreateConfiguration("TPC-clustermc-info", "BlockFilter" , sinkHWClusterInput.Data(), "-datatype 'CLMCINFO' 'TPC '");
212 handler->CreateConfiguration("TPC-mcTrackMarker","TPCTrackMCMarker","TPC-globalmerger TPC-clustermc-info","" );
214 converterInput+="TPC-mcTrackMarker";
216 handler->CreateConfiguration("TPC-esd-converter", "TPCEsdConverter" , converterInput.Data(), "");
218 // cluster dump collection
219 handler->CreateConfiguration("TPC-clusters", "BlockFilter" , sinkHWClusterInput.Data(), "-datatype 'CLUSTERS' 'TPC ' -datatype 'CLMCINFO' 'TPC '");
220 handler->CreateConfiguration("TPC-raw-clusters", "BlockFilter" , sinkHWClusterInput.Data(), "-datatype 'CLUSTRAW' 'TPC ' -datatype 'CLMCINFO' 'TPC '");
221 handler->CreateConfiguration("TPC-hwclusters", "BlockFilter" , sinkHWClusterInput.Data(), "-datatype 'CLUSTERS' 'TPC ' -datatype 'CLMCINFO' 'TPC '");
222 handler->CreateConfiguration("TPC-raw-hwclusters", "BlockFilter" , sinkHWClusterInput.Data(), "-datatype 'CLUSTRAW' 'TPC ' -datatype 'CLMCINFO' 'TPC '");
225 handler->CreateConfiguration("TPC-raw-data", "BlockFilter" , sinkRawData.Data(), "");
227 handler->CreateConfiguration("TPC-hwcfdata", "BlockFilter" , hwclustOutput.Data(), "-datatype 'HWCLUST1' 'TPC '");
229 /////////////////////////////////////////////////////////////////////////////////////
231 // dumps on the ALTRO digit level
233 // selected channel dump
234 arg.Form("-datafile selected-channel.dump -specfmt=_0x%%08x -subdir -blcknofmt= -idfmt=");
235 handler->CreateConfiguration("TPC-selected-altro-digits", "TPCDigitDump", "RCU-channelselect", arg.Data());
238 arg.Form("-datafile channel.dump -specfmt=_0x%%08x -subdir -blcknofmt= -idfmt=");
239 handler->CreateConfiguration("TPC-raw-altro-digits", "TPCDigitDump", "TPC-raw-data", arg.Data());
241 /////////////////////////////////////////////////////////////////////////////////////
243 // a kChain HLTOUT configuration for processing of {'TRAKSEGS':'TPC '} data blocks
244 // collects the data blocks, merges the tracks and produces an ESD object
246 // publisher component
247 handler->CreateConfiguration("TPC-hltout-tracksegs-publisher", "AliHLTOUTPublisher" , NULL, "");
249 // GlobalMerger component
250 handler->CreateConfiguration("TPC-hltout-tracksegs-merger", "TPCGlobalMerger", "TPC-hltout-tracksegs-publisher", "");
252 // the esd converter configuration
253 handler->CreateConfiguration("TPC-hltout-tracksegs-esd-converter", "TPCEsdConverter", "TPC-hltout-tracksegs-merger", "");
255 /////////////////////////////////////////////////////////////////////////////////////
257 // a kChain HLTOUT configuration for processing of {'TRACKS ':'TPC '} data blocks
258 // produces an ESD object from the track structure
260 // publisher component
261 handler->CreateConfiguration("TPC-hltout-tracks-publisher", "AliHLTOUTPublisher" , NULL, "");
263 // the esd converter configuration
264 handler->CreateConfiguration("TPC-hltout-tracks-esd-converter", "TPCEsdConverter", "TPC-hltout-tracks-publisher", "");
266 /////////////////////////////////////////////////////////////////////////////////////
268 // a kChain HLTOUT configuration for processing of {'CLUSTERS':'TPC '} data blocks
269 // stores the blocks in file HLT.TPC.Clusters.root in HOMER format
271 // publisher component
272 handler->CreateConfiguration("TPC-hltout-cluster-publisher", "AliHLTOUTPublisher" , NULL, "");
274 // the HLTOUT component collects the blocks and stores the file
275 handler->CreateConfiguration("TPC-hltout-cluster-dump", "HLTOUT", "TPC-hltout-cluster-publisher", "-digitfile HLT.TPC.Clusters.root -rawout=off -links 2");
277 /////////////////////////////////////////////////////////////////////////////////////
279 // monitoring of compressed TPC data {CLUSTRAW:TPC }, {REMCLSCM,TPC }, {CLSTRKCM,TPC }
282 // publisher component
283 handler->CreateConfiguration("TPC-hltout-compressionmonitor-publisher", "AliHLTOUTPublisher" , NULL,
284 "-datatype HWCLUST1 'TPC ' "
285 "-datatype CLUSTRAW 'TPC ' "
286 "-datatype REMCLSCM 'TPC ' "
287 "-datatype CLSTRKCM 'TPC ' "
288 "-datatype REMCLIDS 'TPC ' "
289 "-datatype CLIDSTRK 'TPC ' "
292 // the HLTOUT component collects the blocks and stores the file
293 handler->CreateConfiguration("TPC-hltout-compressionmonitor", "TPCDataCompressorMonitor", "TPC-hltout-compressionmonitor-publisher", "-histogram-file HLT.TPC-compression-statistics.root -publishing-mode off");
299 const char* AliHLTTPCAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
300 AliRunLoader* runloader) const
302 // see header file for class documentation
304 // reconstruction chains for AliRoot simulation
305 return "TPC-compression";
307 // TODO: activate after further testing (2012-06-07)
308 //return "TPC-compression-emulation";
313 const char* AliHLTTPCAgent::GetRequiredComponentLibraries() const
315 // see header file for class documentation
317 // actually, the TPC library has dependencies to Util and RCU
318 // so the two has to be loaded anyhow before we get here
319 //return "libAliHLTUtil.so libAliHLTRCU.so";
320 return "libAliHLTUtil.so";
323 int AliHLTTPCAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
325 // see header file for class documentation
326 if (!pHandler) return -EINVAL;
328 pHandler->AddComponent(new AliHLTTPCCAInputDataCompressorComponent);
329 pHandler->AddComponent(new AliHLTTPCCATrackerComponent);
330 pHandler->AddComponent(new AliHLTTPCCATrackerOutputConverter);
331 pHandler->AddComponent(new AliHLTTPCCAGlobalMergerComponent);
332 pHandler->AddComponent(new AliHLTTPCTrackMCMarkerComponent);
333 pHandler->AddComponent(new AliHLTTPCdEdxComponent);
334 pHandler->AddComponent(new AliHLTTPCdEdxMonitoringComponent);
335 pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinderPacked));
336 pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinderUnpacked));
337 pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinderDecoder));
338 pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinder32Bit));
339 pHandler->AddComponent(new AliHLTTPCRawDataUnpackerComponent);
340 pHandler->AddComponent(new AliHLTTPCDigitPublisherComponent);
341 pHandler->AddComponent(new AliHLTTPCDigitDumpComponent);
342 pHandler->AddComponent(new AliHLTTPCClusterDumpComponent);
343 pHandler->AddComponent(new AliHLTTPCClusterHistoComponent);
344 pHandler->AddComponent(new AliHLTTPCHistogramHandlerComponent);
345 pHandler->AddComponent(new AliHLTTPCTrackHistoComponent);
346 pHandler->AddComponent(new AliHLTTPCTrackDumpComponent);
347 pHandler->AddComponent(new AliHLTTPCHWCFDataReverterComponent);
348 pHandler->AddComponent(new AliHLTTPCHWClusterTransformComponent);
349 pHandler->AddComponent(new AliHLTTPCCFComparisonComponent);
350 pHandler->AddComponent(new AliHLTTPCDataCheckerComponent);
351 pHandler->AddComponent(new AliHLTTPCHWCFEmulatorComponent);
352 // pHandler->AddComponent(new AliHLTTPCHWCFConsistencyControlComponent); //FIXME: Causes crash: https://savannah.cern.ch/bugs/?83677
353 pHandler->AddComponent(new AliHLTTPCDataCompressionComponent);
354 pHandler->AddComponent(new AliHLTTPCDataCompressionMonitorComponent);
355 pHandler->AddComponent(new AliHLTTPCDataCompressionFilterComponent);
356 pHandler->AddComponent(new AliHLTTPCDataPublisherComponent);
360 int AliHLTTPCAgent::GetHandlerDescription(AliHLTComponentDataType dt,
362 AliHLTOUTHandlerDesc& desc) const
364 // see header file for class documentation
366 // raw data blocks to be fed into offline reconstruction
367 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTPC)) {
368 int slice=AliHLTTPCDefinitions::GetMinSliceNr(spec);
369 int part=AliHLTTPCDefinitions::GetMinPatchNr(spec);
370 if (slice==AliHLTTPCDefinitions::GetMaxSliceNr(spec) &&
371 part==AliHLTTPCDefinitions::GetMaxPatchNr(spec)) {
372 desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId());
375 HLTWarning("handler can not process merged data from multiple ddls:"
376 " min slice %d, max slice %d, min part %d, max part %d",
377 slice, AliHLTTPCDefinitions::GetMaxSliceNr(spec),
378 part, AliHLTTPCDefinitions::GetMaxPatchNr(spec));
383 // dump for {'CLUSTERS':'TPC '} blocks stored in a 'digit' file
384 if (dt==AliHLTTPCDefinitions::fgkClustersDataType) {
385 desc=AliHLTOUTHandlerDesc(kChain, dt, GetModuleId());
389 // define handlers for all blocks related to compression, flag if the
390 // cluster id blocks are existing, this will be used to decide
391 // whether to create the handler or not
392 // {'CLUSTRAW':'TPC '}
393 // {'HWCLUST1':'TPC '}
394 // {'REMCLSCM':'TPC '}
395 // {'CLSTRKCM':'TPC '}
396 // {'REMCLIDS':'TPC '}
397 // {'CLIDSTRK':'TPC '}
398 if (dt==AliHLTTPCDefinitions::RawClustersDataType() ||
399 dt==AliHLTTPCDefinitions::HWClustersDataType() ||
400 dt==AliHLTTPCDefinitions::RemainingClustersCompressedDataType() ||
401 dt==AliHLTTPCDefinitions::ClusterTracksCompressedDataType()) {
402 desc=AliHLTOUTHandlerDesc(kProprietary, dt, GetModuleId());
405 if (dt==AliHLTTPCDefinitions::RemainingClusterIdsDataType() ||
406 dt==AliHLTTPCDefinitions::ClusterIdTracksDataType()) {
407 desc=AliHLTOUTHandlerDesc(kProprietary, dt, GetModuleId());
408 const_cast<AliHLTTPCAgent*>(this)->SetBit(kHaveCompressedClusterIdDataBlock);
412 // {'CLMCINFO':'TPC '}
413 if (dt==AliHLTTPCDefinitions::fgkAliHLTDataTypeClusterMCInfo) {
414 desc=AliHLTOUTHandlerDesc(kProprietary, dt, GetModuleId());
418 // afterburner for {'TRAKSEGS':'TPC '} blocks to be converted to ESD format
419 if (dt==AliHLTTPCDefinitions::fgkTrackSegmentsDataType) {
420 desc=AliHLTOUTHandlerDesc(kChain, dt, GetModuleId());
424 // afterburner for {'TRACKS ':'TPC '} block to be converted to ESD format
425 // there is only one data block
426 if (dt==AliHLTTPCDefinitions::fgkTracksDataType) {
427 desc=AliHLTOUTHandlerDesc(kChain, dt, GetModuleId());
433 AliHLTOUTHandler* AliHLTTPCAgent::GetOutputHandler(AliHLTComponentDataType dt,
434 AliHLTUInt32_t /*spec*/)
436 // see header file for class documentation
438 // raw data blocks to be fed into offline reconstruction
439 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTPC)) {
440 if (!fRawDataHandler) {
441 fRawDataHandler=new AliHLTTPCAgent::AliHLTTPCRawDataHandler;
443 return fRawDataHandler;
446 // dump for {'CLUSTERS':'TPC '}, stored in a file HLT.TPC.Clusters.root in HOMER format
447 if (dt==AliHLTTPCDefinitions::fgkClustersDataType) {
448 if (fClustersDataHandler==NULL)
449 fClustersDataHandler=new AliHLTOUTHandlerChain("chains=TPC-hltout-cluster-dump libHLTsim.so libAliHLTUtil.so");
450 return fClustersDataHandler;
453 // afterburner for {'TRAKSEGS':'TPC '} blocks to be converted to ESD format
454 // in a kChain HLTOUT handler
455 if (dt==AliHLTTPCDefinitions::fgkTrackSegmentsDataType) {
456 if (fTracksegsDataHandler==NULL)
457 fTracksegsDataHandler=new AliHLTOUTHandlerChain("chains=TPC-hltout-tracksegs-esd-converter");
458 return fTracksegsDataHandler;
461 // afterburner for {'TRACKS ':'TPC '} block to be converted to ESD format
462 // there is only one data block
463 if (dt==AliHLTTPCDefinitions::fgkTracksDataType) {
464 return new AliHLTOUTHandlerChain("chains=TPC-hltout-tracks-esd-converter");
467 // monitoring of compressed data if cluster verification blocks exist
468 // {'REMCLIDS':'TPC '}
469 // {'CLIDSTRK':'TPC '}
470 // FIXME: needs to be commissioned
471 // if (dt==AliHLTTPCDefinitions::RawClustersDataType() ||
472 // dt==AliHLTTPCDefinitions::HWClustersDataType() ||
473 // dt==AliHLTTPCDefinitions::RemainingClustersCompressedDataType() ||
474 // dt==AliHLTTPCDefinitions::ClusterTracksCompressedDataType() ||
475 // dt==AliHLTTPCDefinitions::RemainingClusterIdsDataType() ||
476 // dt==AliHLTTPCDefinitions::ClusterIdTracksDataType()) {
477 // const char* arg="chains=TPC-hltout-compressionmonitor";
478 // if (!TestBit(kHaveCompressedClusterIdDataBlock))
479 // arg="chains=TPC-hltout-compressionmonitorpublisher";
480 // if (!fCompressionMonitorHandler)
481 // fCompressionMonitorHandler=new AliHLTOUTHandlerChain(arg);
482 // return fCompressionMonitorHandler;
488 int AliHLTTPCAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
490 // see header file for class documentation
491 if (pInstance==NULL) return -EINVAL;
493 if (pInstance==fRawDataHandler) {
494 delete fRawDataHandler;
495 fRawDataHandler=NULL;
498 if (pInstance==fTracksegsDataHandler) {
499 delete fTracksegsDataHandler;
500 fTracksegsDataHandler=NULL;
503 if (pInstance==fClustersDataHandler) {
504 delete fClustersDataHandler;
505 fClustersDataHandler=NULL;
508 if (pInstance==fCompressionMonitorHandler) {
509 delete fCompressionMonitorHandler;
510 fCompressionMonitorHandler=NULL;
516 AliHLTTPCAgent::AliHLTTPCRawDataHandler::AliHLTTPCRawDataHandler()
518 // see header file for class documentation
521 AliHLTTPCAgent::AliHLTTPCRawDataHandler::~AliHLTTPCRawDataHandler()
523 // see header file for class documentation
526 int AliHLTTPCAgent::AliHLTTPCRawDataHandler::ProcessData(AliHLTOUT* pData)
528 // see header file for class documentation
529 if (!pData) return -EINVAL;
530 AliHLTComponentDataType dt=kAliHLTVoidDataType;
531 AliHLTUInt32_t spec=kAliHLTVoidDataSpec;
532 int iResult=pData->GetDataBlockDescription(dt, spec);
534 int slice=AliHLTTPCDefinitions::GetMinSliceNr(spec);
535 int part=AliHLTTPCDefinitions::GetMinPatchNr(spec);
536 if (slice==AliHLTTPCDefinitions::GetMaxSliceNr(spec) &&
537 part==AliHLTTPCDefinitions::GetMaxPatchNr(spec)) {
539 if (part>1) iResult+=72+4*slice+(part-2);
540 else iResult+=2*slice+part;
542 HLTError("handler can not process merged data from multiple ddls:"
543 " min slice %d, max slice %d, min part %d, max part %d",
544 slice, AliHLTTPCDefinitions::GetMaxSliceNr(spec),
545 part, AliHLTTPCDefinitions::GetMaxPatchNr(spec));