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 fClusterData = new AliHLTTPCCAClusterData[fgkNSlices];
442 if (fGPUHelperThreads != -1)
444 char cc[256] = "HelperThreads";
445 fTracker->SetGPUTrackerOption(cc, fGPUHelperThreads);
448 char cc[256] = "CPUTrackers";
449 fTracker->SetGPUTrackerOption(cc, fCPUTrackers);
450 char cc2[256] = "SlicesPerCPUTracker";
451 fTracker->SetGPUTrackerOption(cc2, 1);
455 char cc[256] = "GlobalTracking";
456 fTracker->SetGPUTrackerOption(cc, 1);
465 int AliHLTTPCCATrackerComponent::DoDeinit()
467 // see header file for class documentation
468 if (fTracker) delete fTracker;
470 if (fClusterData) delete[] fClusterData;
475 int AliHLTTPCCATrackerComponent::Reconfigure( const char* cdbEntry, const char* chainId )
477 // Reconfigure the component from OCDB .
478 return Configure( cdbEntry, chainId, NULL );
481 int AliHLTTPCCATrackerComponent::DoEvent
483 const AliHLTComponentEventData& evtData,
484 const AliHLTComponentBlockData* blocks,
485 AliHLTComponentTriggerData& /*trigData*/,
486 AliHLTUInt8_t* outputPtr,
487 AliHLTUInt32_t& size,
488 vector<AliHLTComponentBlockData>& outputBlocks )
493 HLTError( "CATracker not initialized properly" );
497 AliHLTUInt32_t maxBufferSize = size;
498 size = 0; // output size
500 if ( GetFirstInputBlock( kAliHLTDataTypeSOR ) || GetFirstInputBlock( kAliHLTDataTypeEOR ) ) {
504 fBenchmark.StartNewEvent();
507 //Logging( kHLTLogWarning, "HLT::TPCCATracker::DoEvent", "DoEvent", "CA::DoEvent()" );
508 if ( evtData.fBlockCnt <= 0 ) {
509 HLTWarning( "no blocks in event" );
513 const AliHLTComponentBlockData* iter = NULL;
516 // min and max patch numbers and row numbers
517 int sliceminPatch[fgkNSlices];
518 int slicemaxPatch[fgkNSlices];
519 for (int i = 0;i < fSliceCount;i++)
521 sliceminPatch[i] = 100;
522 slicemaxPatch[i] = -1;
525 //Prepare everything for all slices
527 for (int islice = 0;islice < fSliceCount;islice++)
529 int slice = fMinSlice + islice;
532 int nClustersTotal = 0;
535 std::vector<unsigned long> patchIndices;
537 for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ ) {
539 if ( slice != AliHLTTPCDefinitions::GetMinSliceNr( *iter ) ) continue;
540 if ( iter->fDataType == AliHLTTPCDefinitions::fgkClustersDataType ){
541 AliHLTTPCClusterData* inPtrSP = ( AliHLTTPCClusterData* )( iter->fPtr );
542 nClustersTotal += inPtrSP->fSpacePointCnt;
543 fBenchmark.AddInput(iter->fSize);
545 if ( iter->fDataType == AliHLTTPCCADefinitions::fgkCompressedInputDataType){
546 fBenchmark.AddInput(iter->fSize);
547 const AliHLTUInt8_t * inPtr = (const AliHLTUInt8_t *)iter->fPtr;
548 while( inPtr< ((const AliHLTUInt8_t *) iter->fPtr) + iter->fSize ){
549 AliHLTTPCCACompressedClusterRow *row = (AliHLTTPCCACompressedClusterRow*)inPtr;
550 nClustersTotal+= row->fNClusters;
551 inPtr = (const AliHLTUInt8_t *)(row->fClusters+row->fNClusters);
556 int patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter );
557 if ( sliceminPatch[islice] > patch ) {
558 sliceminPatch[islice] = patch;
560 if ( slicemaxPatch[islice] < patch ) {
561 slicemaxPatch[islice] = patch;
563 std::vector<unsigned long>::iterator pIter = patchIndices.begin();
564 while ( pIter != patchIndices.end() && AliHLTTPCDefinitions::GetMinPatchNr( blocks[*pIter] ) < patch ) {
567 patchIndices.insert( pIter, ndx );
571 // pass event to CA Tracker
574 Logging( kHLTLogDebug, "HLT::TPCCATracker::DoEvent", "Reading hits",
575 "Total %d hits to read for slice %d", nClustersTotal, slice );
577 if (nClustersTotal > 500000)
579 HLTWarning( "Too many clusters in tracker input: Slice %d, Number of Clusters %d, slice not included in tracking", slice, nClustersTotal );
580 fClusterData[islice].StartReading( slice, 0 );
584 fClusterData[islice].StartReading( slice, nClustersTotal );
586 for ( std::vector<unsigned long>::iterator pIter = patchIndices.begin(); pIter != patchIndices.end(); pIter++ ) {
589 int patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter );
592 if ( iter->fDataType == AliHLTTPCDefinitions::fgkClustersDataType ) {
593 AliHLTTPCCAClusterData::Data* pCluster = &fClusterData[islice].Clusters()[fClusterData[islice].NumberOfClusters()];
594 AliHLTTPCClusterData* inPtrSP = ( AliHLTTPCClusterData* )( iter->fPtr );
595 nPatchClust = inPtrSP->fSpacePointCnt;
596 const AliHLTTPCSpacePointData* pLastSpacePoint = &inPtrSP->fSpacePoints[inPtrSP->fSpacePointCnt];
597 for ( const AliHLTTPCSpacePointData* pSpacePoint = inPtrSP->fSpacePoints; pSpacePoint < pLastSpacePoint; pSpacePoint++ ) {
598 if ( pSpacePoint->fZ > fClusterZCut || pSpacePoint->fZ < -fClusterZCut) continue;
599 pCluster->fId = pSpacePoint->fID;
600 pCluster->fRow = pSpacePoint->fPadRow;
601 pCluster->fX = pSpacePoint->fX;
602 pCluster->fY = pSpacePoint->fY;
603 pCluster->fZ = pSpacePoint->fZ;
604 pCluster->fAmp = pSpacePoint->fCharge;
607 fClusterData[islice].SetNumberOfClusters(pCluster - fClusterData[islice].Clusters());
609 else if ( iter->fDataType == AliHLTTPCCADefinitions::fgkCompressedInputDataType)
611 const AliHLTUInt8_t * inPtr = (const AliHLTUInt8_t *)iter->fPtr;
613 while( inPtr< ((const AliHLTUInt8_t *)iter->fPtr) + iter->fSize ){
614 AliHLTTPCCACompressedClusterRow *row = (AliHLTTPCCACompressedClusterRow*)inPtr;
615 UInt_t id = row->fSlicePatchRowID;
616 UInt_t jslice = id>>10;
617 UInt_t jpatch = (id>>6) & 0x7;
618 UInt_t jrow = id & 0x3F;
619 jrow+= AliHLTTPCTransform::GetFirstRow( jpatch );
620 Double_t rowX = AliHLTTPCTransform::Row2X( jrow );
621 //cout<<"Read row: s "<<jslice<<" p "<<jpatch<<" r "<<jrow<<" x "<<row->fX<<" nclu "<<row->fNClusters<<" :"<<endl;
623 HLTError( "Wrong TPC cluster with row number %d received", jrow );
626 for ( unsigned int i = 0; i < row->fNClusters; i++ ) {
627 AliHLTTPCCACompressedCluster *c = &( row->fClusters[i] );
629 UInt_t ix0 = c->fP0 >>24;
630 UInt_t ix1 = c->fP1 >>24;
631 Double_t x = (ix1<<8) + ix0;
632 Double_t y = c->fP0 & 0x00FFFFFF;
633 Double_t z = c->fP1 & 0x00FFFFFF;
634 x = (x - 32768.)*1.e-4 + rowX;
635 y = (y - 8388608.)*1.e-4;
636 z = (z - 8388608.)*1.e-4;
638 UInt_t cluId = AliHLTTPCSpacePointData::GetID( jslice, jpatch, nPatchClust );
639 //cout<<"clu "<<i<<": "<<x<<" "<<y<<" "<<z<<" "<<cluId<<endl;
640 if ( CAMath::Abs( z ) <= fClusterZCut){
641 fClusterData[islice].ReadCluster( cluId, jrow, x, y, z, 0 );
645 inPtr = (const AliHLTUInt8_t *)(row->fClusters+row->fNClusters);
648 Logging( kHLTLogInfo, "HLT::TPCCATracker::DoEvent", "Reading hits",
649 "Read %d hits for slice %d - patch %d", nPatchClust, slice, patch );
655 AliHLTTPCCASliceOutput::outputControlStruct outputControl;
656 outputControl.fEndOfSpace = 0;
657 outputControl.fOutputPtr = (char*) outputPtr;
658 outputControl.fOutputMaxSize = maxBufferSize;
659 fTracker->SetOutputControl(&outputControl);
661 memset(fSliceOutput, 0, fSliceCount * sizeof(AliHLTTPCCASliceOutput*));
663 // reconstruct the event
665 fTracker->ProcessSlices(fMinSlice, fSliceCount, fClusterData, fSliceOutput);
669 unsigned int mySize = 0;
673 for (int islice = 0;islice < fSliceCount;islice++)
675 if (slicemaxPatch[islice] == -1) continue;
676 int slice = fMinSlice + islice;
678 if( outputControl.fEndOfSpace ){
679 HLTWarning( "Output buffer size exceeded (buffer size %d, required size %d), tracks are not stored", maxBufferSize, mySize );
685 if (fSliceOutput[islice])
687 // write reconstructed tracks
688 Logging( kHLTLogDebug, "HLT::TPCCATracker::DoEvent", "Reconstruct", "%d tracks found for slice %d", fSliceOutput[islice]->NTracks(), slice );
690 mySize += fSliceOutput[islice]->Size();
691 ntracks += fSliceOutput[islice]->NTracks();
695 HLTWarning( "Error during Tracking, no tracks stored" );
707 for (int islice = 0;islice < fSliceCount;islice++)
709 int slice = fMinSlice + islice;
711 mySize = fSliceOutput[islice]->Size();
714 AliHLTComponentBlockData bd;
716 bd.fOffset = ((char*) fSliceOutput[islice] - (char*) outputPtr);
718 bd.fSpecification = AliHLTTPCDefinitions::EncodeDataSpecification( slice, slice, sliceminPatch[islice], slicemaxPatch[islice] );
719 bd.fDataType = GetOutputDataType();
720 outputBlocks.push_back( bd );
722 fBenchmark.AddOutput(bd.fSize);
731 // Set log level to "Warning" for on-line system monitoring
733 //Min and Max Patch are taken for first slice processed...
735 fBenchmark.SetName(Form("CATracker"));
737 HLTInfo(fBenchmark.GetStatistics());