2 // **************************************************************************
3 // This file is property of and copyright by the ALICE HLT Project *
4 // ALICE Experiment at CERN, All rights reserved. *
6 // Primary Authors: Sergey Gorbunov <sergey.gorbunov@kip.uni-heidelberg.de> *
7 // Ivan Kisel <kisel@kip.uni-heidelberg.de> *
8 // for The ALICE HLT Project. *
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. *
18 //***************************************************************************
21 ///////////////////////////////////////////////////////////////////////////////
23 // a TPC tracker processing component for the HLT based on CA by Ivan Kisel //
25 ///////////////////////////////////////////////////////////////////////////////
31 #include "AliHLTTPCCATrackerComponent.h"
32 #include "AliHLTTPCTransform.h"
33 #include "AliHLTTPCCATrackerFramework.h"
34 #include "AliHLTTPCCAParam.h"
35 #include "AliHLTTPCCATrackConvertor.h"
36 #include "AliHLTArray.h"
38 #include "AliHLTTPCSpacePointData.h"
39 #include "AliHLTTPCClusterDataFormat.h"
40 #include "AliHLTTPCCACompressedInputData.h"
41 #include "AliHLTTPCTransform.h"
42 #include "AliHLTTPCDefinitions.h"
43 #include "AliExternalTrackParam.h"
45 #include "AliCDBEntry.h"
46 #include "AliCDBManager.h"
47 #include "TObjString.h"
48 #include "TObjArray.h"
49 #include "AliHLTTPCCASliceOutput.h"
50 #include "AliHLTTPCCAClusterData.h"
52 const AliHLTComponentDataType AliHLTTPCCADefinitions::fgkTrackletsDataType = AliHLTComponentDataTypeInitializer( "CATRACKL", kAliHLTDataOriginTPC );
54 /** ROOT macro for the implementation of ROOT specific class methods */
55 ClassImp( AliHLTTPCCATrackerComponent )
57 AliHLTTPCCATrackerComponent::AliHLTTPCCATrackerComponent()
62 fSliceCount( fgkNSlices ),
64 fMinNTrackClusters( 30 ),
67 fNeighboursSearchArea( 0 ),
68 fClusterErrorCorrectionY(0),
69 fClusterErrorCorrectionZ(0),
70 fBenchmark("CATracker"),
72 fGPUHelperThreads(-1),
78 // see header file for class documentation
80 // refer to README to build package
82 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
83 for( int i=0; i<fgkNSlices; i++ ){
84 fSliceOutput[i] = NULL;
88 AliHLTTPCCATrackerComponent::AliHLTTPCCATrackerComponent( const AliHLTTPCCATrackerComponent& )
94 fSliceCount( fgkNSlices ),
96 fMinNTrackClusters( 30 ),
99 fNeighboursSearchArea(0),
100 fClusterErrorCorrectionY(0),
101 fClusterErrorCorrectionZ(0),
102 fBenchmark("CATracker"),
104 fGPUHelperThreads(-1),
110 // see header file for class documentation
111 for( int i=0; i<fgkNSlices; i++ ){
112 fSliceOutput[i] = NULL;
114 HLTFatal( "copy constructor untested" );
117 AliHLTTPCCATrackerComponent& AliHLTTPCCATrackerComponent::operator=( const AliHLTTPCCATrackerComponent& )
119 // see header file for class documentation
120 for( int i=0; i<fgkNSlices; i++ ){
121 fSliceOutput[i] = NULL;
123 HLTFatal( "assignment operator untested" );
127 AliHLTTPCCATrackerComponent::~AliHLTTPCCATrackerComponent()
129 // see header file for class documentation
130 if (fTracker) delete fTracker;
131 if (fClusterData) delete[] fClusterData;
135 // Public functions to implement AliHLTComponent's interface.
136 // These functions are required for the registration process
139 const char* AliHLTTPCCATrackerComponent::GetComponentID()
141 // see header file for class documentation
142 return "TPCCATracker";
145 void AliHLTTPCCATrackerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list )
147 // see header file for class documentation
149 list.push_back( AliHLTTPCDefinitions::fgkClustersDataType );
150 list.push_back( AliHLTTPCCADefinitions::fgkCompressedInputDataType );
153 AliHLTComponentDataType AliHLTTPCCATrackerComponent::GetOutputDataType()
155 // see header file for class documentation
156 return AliHLTTPCCADefinitions::fgkTrackletsDataType;
159 void AliHLTTPCCATrackerComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
161 // define guess for the output data size
162 constBase = 1200; // minimum size
163 inputMultiplier = 0.6; // size relative to input
166 AliHLTComponent* AliHLTTPCCATrackerComponent::Spawn()
168 // see header file for class documentation
169 return new AliHLTTPCCATrackerComponent;
172 void AliHLTTPCCATrackerComponent::SetDefaultConfiguration()
174 // Set default configuration for the CA tracker component
175 // Some parameters can be later overwritten from the OCDB
177 fSolenoidBz = -5.00668;
178 fMinNTrackClusters = 30;
181 fNeighboursSearchArea = 0;
182 fClusterErrorCorrectionY = 0;
183 fClusterErrorCorrectionZ = 0;
185 fBenchmark.SetTimer(0,"total");
186 fBenchmark.SetTimer(1,"reco");
189 int AliHLTTPCCATrackerComponent::ReadConfigurationString( const char* arguments )
191 // Set configuration parameters for the CA tracker component from the string
194 if ( !arguments ) return iResult;
196 TString allArgs = arguments;
198 int bMissingParam = 0;
200 TObjArray* pTokens = allArgs.Tokenize( " " );
202 int nArgs = pTokens ? pTokens->GetEntries() : 0;
204 for ( int i = 0; i < nArgs; i++ ) {
205 argument = ( ( TObjString* )pTokens->At( i ) )->GetString();
206 if ( argument.IsNull() ) continue;
208 if ( argument.CompareTo( "-solenoidBz" ) == 0 ) {
209 if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
210 HLTWarning("argument -solenoidBz is deprecated, magnetic field set up globally (%f)", GetBz());
214 if ( argument.CompareTo( "-minNClustersOnTrack" ) == 0 ) {
215 if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
216 fMinNTrackClusters = ( ( TObjString* )pTokens->At( i ) )->GetString().Atoi();
217 HLTInfo( "minNClustersOnTrack set to: %d", fMinNTrackClusters );
221 if ( argument.CompareTo( "-minTrackPt" ) == 0 ) {
222 if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
223 fMinTrackPt = ( ( TObjString* )pTokens->At( i ) )->GetString().Atof();
224 HLTInfo( "minTrackPt set to: %f", fMinTrackPt );
228 if ( argument.CompareTo( "-clusterZCut" ) == 0 ) {
229 if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
230 fClusterZCut = TMath::Abs( ( ( TObjString* )pTokens->At( i ) )->GetString().Atof() );
231 HLTInfo( "ClusterZCut set to: %f", fClusterZCut );
235 if ( argument.CompareTo( "-neighboursSearchArea" ) == 0 ) {
236 if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
237 fNeighboursSearchArea = TMath::Abs( ( ( TObjString* )pTokens->At( i ) )->GetString().Atof() );
238 HLTInfo( "NeighboursSearchArea set to: %f", fNeighboursSearchArea );
242 if ( argument.CompareTo( "-errorCorrectionY" ) == 0 ) {
243 if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
244 fClusterErrorCorrectionY = ( ( TObjString* )pTokens->At( i ) )->GetString().Atof();
245 HLTInfo( "Cluster Y error correction factor set to: %f", fClusterErrorCorrectionY );
249 if ( argument.CompareTo( "-errorCorrectionZ" ) == 0 ) {
250 if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
251 fClusterErrorCorrectionZ = ( ( TObjString* )pTokens->At( i ) )->GetString().Atof();
252 HLTInfo( "Cluster Z error correction factor set to: %f", fClusterErrorCorrectionZ );
256 if (argument.CompareTo( "-allowGPU" ) == 0) {
258 HLTImportant( "Will try to run tracker on GPU" );
262 if (argument.CompareTo( "-GlobalTracking" ) == 0) {
264 HLTImportant( "Global Tracking Activated" );
268 if ( argument.CompareTo( "-GPUHelperThreads" ) == 0 ) {
269 if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
270 fGPUHelperThreads = ( ( TObjString* )pTokens->At( i ) )->GetString().Atoi();
271 HLTInfo( "Number of GPU Helper Threads set to: %d", fGPUHelperThreads );
275 if ( argument.CompareTo( "-CPUTrackers" ) == 0 ) {
276 if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
277 fCPUTrackers = ( ( TObjString* )pTokens->At( i ) )->GetString().Atoi();
278 HLTInfo( "Number of CPU Trackers set to: %d", fCPUTrackers );
282 if ( argument.CompareTo( "-GPUDeviceNum" ) == 0 ) {
283 if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
284 fGPUDeviceNum = ( ( TObjString* )pTokens->At( i ) )->GetString().Atoi();
285 HLTInfo( "Using GPU Device Number %d", fGPUDeviceNum );
289 if ( argument.CompareTo( "-GPULibrary" ) == 0 ) {
290 if ( ( bMissingParam = ( ++i >= pTokens->GetEntries() ) ) ) break;
291 fGPULibrary = ( ( TObjString* )pTokens->At( i ) )->GetString();
295 HLTError( "Unknown option \"%s\"", argument.Data() );
300 if ( bMissingParam ) {
301 HLTError( "Specifier missed for parameter \"%s\"", argument.Data() );
309 int AliHLTTPCCATrackerComponent::ReadCDBEntry( const char* cdbEntry, const char* chainId )
311 // see header file for class documentation
313 const char* defaultNotify = "";
316 cdbEntry = "HLT/ConfigTPC/TPCCATracker";
317 defaultNotify = " (default)";
321 HLTInfo( "configure from entry \"%s\"%s, chain id %s", cdbEntry, defaultNotify, ( chainId != NULL && chainId[0] != 0 ) ? chainId : "<none>" );
322 AliCDBEntry *pEntry = AliCDBManager::Instance()->Get( cdbEntry );//,GetRunNo());
325 HLTError( "cannot fetch object \"%s\" from CDB", cdbEntry );
329 TObjString* pString = dynamic_cast<TObjString*>( pEntry->GetObject() );
332 HLTError( "configuration object \"%s\" has wrong type, required TObjString", cdbEntry );
336 HLTInfo( "received configuration object string: \"%s\"", pString->GetString().Data() );
338 return ReadConfigurationString( pString->GetString().Data() );
342 int AliHLTTPCCATrackerComponent::Configure( const char* cdbEntry, const char* chainId, const char *commandLine )
344 // Configure the component
345 // There are few levels of configuration,
346 // parameters which are set on one step can be overwritten on the next step
348 //* read hard-coded values
349 SetDefaultConfiguration();
351 //* read the default CDB entry
352 int iResult1 = ReadCDBEntry( NULL, chainId );
354 //* read magnetic field
355 fSolenoidBz = GetBz();
357 //* read the actual CDB entry if required
358 int iResult2 = ( cdbEntry ) ? ReadCDBEntry( cdbEntry, chainId ) : 0;
360 //* read extra parameters from input (if they are)
363 if ( commandLine && commandLine[0] != '\0' ) {
364 HLTInfo( "received configuration string from HLT framework: \"%s\"", commandLine );
365 iResult3 = ReadConfigurationString( commandLine );
368 if (fTracker) ConfigureSlices();
370 return iResult1 ? iResult1 : ( iResult2 ? iResult2 : iResult3 );
373 void AliHLTTPCCATrackerComponent::ConfigureSlices()
375 // Initialize the tracker slices
376 for (int slice = 0;slice < fgkNSlices;slice++)
379 float inRmin = 83.65;
380 // float inRmax = 133.3;
381 // float outRmin = 133.5;
382 float outRmax = 247.7;
383 float plusZmin = 0.0529937;
384 float plusZmax = 249.778;
385 float minusZmin = -249.645;
386 float minusZmax = -0.0799937;
387 float dalpha = 0.349066;
388 float alpha = 0.174533 + dalpha * iSec;
390 bool zPlus = ( iSec < 18 );
391 float zMin = zPlus ? plusZmin : minusZmin;
392 float zMax = zPlus ? plusZmax : minusZmax;
393 //TPCZmin = -249.645, ZMax = 249.778
394 // float rMin = inRmin;
395 // float rMax = outRmax;
396 int nRows = AliHLTTPCTransform::GetNRows();
398 float padPitch = 0.4;
399 float sigmaZ = 0.228808;
401 float *rowX = new float [nRows];
402 for ( int irow = 0; irow < nRows; irow++ ) {
403 rowX[irow] = AliHLTTPCTransform::Row2X( irow );
406 AliHLTTPCCAParam param;
408 param.Initialize( iSec, nRows, rowX, alpha, dalpha,
409 inRmin, outRmax, zMin, zMax, padPitch, sigmaZ, fSolenoidBz );
410 param.SetHitPickUpFactor( 2 );
411 if( fNeighboursSearchArea>0 ) param.SetNeighboursSearchArea( fNeighboursSearchArea );
412 if( fClusterErrorCorrectionY>1.e-4 ) param.SetClusterError2CorrectionY( fClusterErrorCorrectionY*fClusterErrorCorrectionY );
413 if( fClusterErrorCorrectionZ>1.e-4 ) param.SetClusterError2CorrectionZ( fClusterErrorCorrectionZ*fClusterErrorCorrectionZ );
414 param.SetMinNTrackClusters( fMinNTrackClusters );
415 param.SetMinTrackPt( fMinTrackPt );
418 fTracker->InitializeSliceParam( slice, param );
423 int AliHLTTPCCATrackerComponent::DoInit( int argc, const char** argv )
425 if ( fTracker ) return EINPROGRESS;
427 // Configure the CA tracker component
428 TString arguments = "";
429 for ( int i = 0; i < argc; i++ ) {
430 if ( !arguments.IsNull() ) arguments += " ";
431 arguments += argv[i];
434 int retVal = Configure( NULL, NULL, arguments.Data() );
438 fSliceCount = fgkNSlices;
439 //Create tracker instance and set parameters
440 fTracker = new AliHLTTPCCATrackerFramework(fAllowGPU, fGPULibrary, fGPUDeviceNum);
441 if ( fAllowGPU && fTracker->GetGPUStatus() < 2 ) {
442 HLTError("GPU Tracker requested but unavailable, aborting.");
445 fClusterData = new AliHLTTPCCAClusterData[fgkNSlices];
446 if (fGPUHelperThreads != -1)
448 char cc[256] = "HelperThreads";
449 fTracker->SetGPUTrackerOption(cc, fGPUHelperThreads);
452 char cc[256] = "CPUTrackers";
453 fTracker->SetGPUTrackerOption(cc, fCPUTrackers);
454 char cc2[256] = "SlicesPerCPUTracker";
455 fTracker->SetGPUTrackerOption(cc2, 1);
459 char cc[256] = "GlobalTracking";
460 fTracker->SetGPUTrackerOption(cc, 1);
469 int AliHLTTPCCATrackerComponent::DoDeinit()
471 // see header file for class documentation
472 if (fTracker) delete fTracker;
474 if (fClusterData) delete[] fClusterData;
479 int AliHLTTPCCATrackerComponent::Reconfigure( const char* cdbEntry, const char* chainId )
481 // Reconfigure the component from OCDB .
482 return Configure( cdbEntry, chainId, NULL );
485 int AliHLTTPCCATrackerComponent::DoEvent
487 const AliHLTComponentEventData& evtData,
488 const AliHLTComponentBlockData* blocks,
489 AliHLTComponentTriggerData& /*trigData*/,
490 AliHLTUInt8_t* outputPtr,
491 AliHLTUInt32_t& size,
492 vector<AliHLTComponentBlockData>& outputBlocks )
497 HLTError( "CATracker not initialized properly" );
501 AliHLTUInt32_t maxBufferSize = size;
502 size = 0; // output size
504 if ( GetFirstInputBlock( kAliHLTDataTypeSOR ) || GetFirstInputBlock( kAliHLTDataTypeEOR ) ) {
508 fBenchmark.StartNewEvent();
511 //Logging( kHLTLogWarning, "HLT::TPCCATracker::DoEvent", "DoEvent", "CA::DoEvent()" );
512 if ( evtData.fBlockCnt <= 0 ) {
513 HLTWarning( "no blocks in event" );
517 const AliHLTComponentBlockData* iter = NULL;
520 // min and max patch numbers and row numbers
521 int sliceminPatch[fgkNSlices];
522 int slicemaxPatch[fgkNSlices];
523 for (int i = 0;i < fSliceCount;i++)
525 sliceminPatch[i] = 100;
526 slicemaxPatch[i] = -1;
529 //Prepare everything for all slices
531 for (int islice = 0;islice < fSliceCount;islice++)
533 int slice = fMinSlice + islice;
536 int nClustersTotal = 0;
539 std::vector<unsigned long> patchIndices;
541 for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ ) {
543 if ( slice != AliHLTTPCDefinitions::GetMinSliceNr( *iter ) ) continue;
544 if ( iter->fDataType == AliHLTTPCDefinitions::fgkClustersDataType ){
545 AliHLTTPCClusterData* inPtrSP = ( AliHLTTPCClusterData* )( iter->fPtr );
546 nClustersTotal += inPtrSP->fSpacePointCnt;
547 fBenchmark.AddInput(iter->fSize);
549 if ( iter->fDataType == AliHLTTPCCADefinitions::fgkCompressedInputDataType){
550 fBenchmark.AddInput(iter->fSize);
551 const AliHLTUInt8_t * inPtr = (const AliHLTUInt8_t *)iter->fPtr;
552 while( inPtr< ((const AliHLTUInt8_t *) iter->fPtr) + iter->fSize ){
553 AliHLTTPCCACompressedClusterRow *row = (AliHLTTPCCACompressedClusterRow*)inPtr;
554 nClustersTotal+= row->fNClusters;
555 inPtr = (const AliHLTUInt8_t *)(row->fClusters+row->fNClusters);
560 int patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter );
561 if ( sliceminPatch[islice] > patch ) {
562 sliceminPatch[islice] = patch;
564 if ( slicemaxPatch[islice] < patch ) {
565 slicemaxPatch[islice] = patch;
567 std::vector<unsigned long>::iterator pIter = patchIndices.begin();
568 while ( pIter != patchIndices.end() && AliHLTTPCDefinitions::GetMinPatchNr( blocks[*pIter] ) < patch ) {
571 patchIndices.insert( pIter, ndx );
575 // pass event to CA Tracker
578 Logging( kHLTLogDebug, "HLT::TPCCATracker::DoEvent", "Reading hits",
579 "Total %d hits to read for slice %d", nClustersTotal, slice );
581 if (nClustersTotal > 500000)
583 HLTWarning( "Too many clusters in tracker input: Slice %d, Number of Clusters %d, slice not included in tracking", slice, nClustersTotal );
584 fClusterData[islice].StartReading( slice, 0 );
588 fClusterData[islice].StartReading( slice, nClustersTotal );
590 for ( std::vector<unsigned long>::iterator pIter = patchIndices.begin(); pIter != patchIndices.end(); pIter++ ) {
593 int patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter );
596 if ( iter->fDataType == AliHLTTPCDefinitions::fgkClustersDataType ) {
597 AliHLTTPCCAClusterData::Data* pCluster = &fClusterData[islice].Clusters()[fClusterData[islice].NumberOfClusters()];
598 AliHLTTPCClusterData* inPtrSP = ( AliHLTTPCClusterData* )( iter->fPtr );
599 nPatchClust = inPtrSP->fSpacePointCnt;
600 const AliHLTTPCSpacePointData* pLastSpacePoint = &inPtrSP->fSpacePoints[inPtrSP->fSpacePointCnt];
601 for ( const AliHLTTPCSpacePointData* pSpacePoint = inPtrSP->fSpacePoints; pSpacePoint < pLastSpacePoint; pSpacePoint++ ) {
602 if ( pSpacePoint->fZ > fClusterZCut || pSpacePoint->fZ < -fClusterZCut) continue;
603 pCluster->fId = pSpacePoint->fID;
604 pCluster->fRow = pSpacePoint->fPadRow;
605 pCluster->fX = pSpacePoint->fX;
606 pCluster->fY = pSpacePoint->fY;
607 pCluster->fZ = pSpacePoint->fZ;
608 pCluster->fAmp = pSpacePoint->fCharge;
611 fClusterData[islice].SetNumberOfClusters(pCluster - fClusterData[islice].Clusters());
613 else if ( iter->fDataType == AliHLTTPCCADefinitions::fgkCompressedInputDataType)
615 const AliHLTUInt8_t * inPtr = (const AliHLTUInt8_t *)iter->fPtr;
617 while( inPtr< ((const AliHLTUInt8_t *)iter->fPtr) + iter->fSize ){
618 AliHLTTPCCACompressedClusterRow *row = (AliHLTTPCCACompressedClusterRow*)inPtr;
619 UInt_t id = row->fSlicePatchRowID;
620 UInt_t jslice = id>>10;
621 UInt_t jpatch = (id>>6) & 0x7;
622 UInt_t jrow = id & 0x3F;
623 jrow+= AliHLTTPCTransform::GetFirstRow( jpatch );
624 Double_t rowX = AliHLTTPCTransform::Row2X( jrow );
625 //cout<<"Read row: s "<<jslice<<" p "<<jpatch<<" r "<<jrow<<" x "<<row->fX<<" nclu "<<row->fNClusters<<" :"<<endl;
627 HLTError( "Wrong TPC cluster with row number %d received", jrow );
630 for ( unsigned int i = 0; i < row->fNClusters; i++ ) {
631 AliHLTTPCCACompressedCluster *c = &( row->fClusters[i] );
633 UInt_t ix0 = c->fP0 >>24;
634 UInt_t ix1 = c->fP1 >>24;
635 Double_t x = (ix1<<8) + ix0;
636 Double_t y = c->fP0 & 0x00FFFFFF;
637 Double_t z = c->fP1 & 0x00FFFFFF;
638 x = (x - 32768.)*1.e-4 + rowX;
639 y = (y - 8388608.)*1.e-4;
640 z = (z - 8388608.)*1.e-4;
642 UInt_t cluId = AliHLTTPCSpacePointData::GetID( jslice, jpatch, nPatchClust );
643 //cout<<"clu "<<i<<": "<<x<<" "<<y<<" "<<z<<" "<<cluId<<endl;
644 if ( CAMath::Abs( z ) <= fClusterZCut){
645 fClusterData[islice].ReadCluster( cluId, jrow, x, y, z, 0 );
649 inPtr = (const AliHLTUInt8_t *)(row->fClusters+row->fNClusters);
652 Logging( kHLTLogInfo, "HLT::TPCCATracker::DoEvent", "Reading hits",
653 "Read %d hits for slice %d - patch %d", nPatchClust, slice, patch );
659 AliHLTTPCCASliceOutput::outputControlStruct outputControl;
660 outputControl.fEndOfSpace = 0;
661 outputControl.fOutputPtr = (char*) outputPtr;
662 outputControl.fOutputMaxSize = maxBufferSize;
663 fTracker->SetOutputControl(&outputControl);
665 memset(fSliceOutput, 0, fSliceCount * sizeof(AliHLTTPCCASliceOutput*));
667 // reconstruct the event
669 fTracker->ProcessSlices(fMinSlice, fSliceCount, fClusterData, fSliceOutput);
673 unsigned int mySize = 0;
677 for (int islice = 0;islice < fSliceCount;islice++)
679 if (slicemaxPatch[islice] == -1) continue;
680 int slice = fMinSlice + islice;
682 if( outputControl.fEndOfSpace ){
683 HLTWarning( "Output buffer size exceeded (buffer size %d, required size %d), tracks are not stored", maxBufferSize, mySize );
689 if (fSliceOutput[islice])
691 // write reconstructed tracks
692 Logging( kHLTLogDebug, "HLT::TPCCATracker::DoEvent", "Reconstruct", "%d tracks found for slice %d", fSliceOutput[islice]->NTracks(), slice );
694 mySize += fSliceOutput[islice]->Size();
695 ntracks += fSliceOutput[islice]->NTracks();
699 HLTWarning( "Error during Tracking, no tracks stored" );
711 for (int islice = 0;islice < fSliceCount && fSliceOutput[islice];islice++)
713 int slice = fMinSlice + islice;
715 mySize = fSliceOutput[islice]->Size();
718 AliHLTComponentBlockData bd;
720 bd.fOffset = ((char*) fSliceOutput[islice] - (char*) outputPtr);
722 bd.fSpecification = AliHLTTPCDefinitions::EncodeDataSpecification( slice, slice, sliceminPatch[islice], slicemaxPatch[islice] );
723 bd.fDataType = GetOutputDataType();
724 outputBlocks.push_back( bd );
726 fBenchmark.AddOutput(bd.fSize);
735 // Set log level to "Warning" for on-line system monitoring
737 //Min and Max Patch are taken for first slice processed...
739 fBenchmark.SetName(Form("CATracker"));
741 HLTInfo(fBenchmark.GetStatistics());