dummy reconfiguration handler added
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCClusterFinderComponent.cxx
CommitLineData
71d7c760 1// $Id$
2
3/**************************************************************************
9be2600f 4 * This file is property of and copyright by the ALICE HLT Project *
5 * ALICE Experiment at CERN, All rights reserved. *
71d7c760 6 * *
9be2600f 7 * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 * Timm Steinbeck <timm@kip.uni-heidelberg.de> *
9 * Jochen Thaeder <thaeder@kip.uni-heidelberg.de> *
10 * for The ALICE HLT Project. *
71d7c760 11 * *
12 * Permission to use, copy, modify and distribute this software and its *
13 * documentation strictly for non-commercial purposes is hereby granted *
14 * without fee, provided that the above copyright notice appears in all *
15 * copies and that both the copyright notice and this permission notice *
16 * appear in the supporting documentation. The authors make no claims *
17 * about the suitability of this software for any purpose. It is *
18 * provided "as is" without express or implied warranty. *
19 **************************************************************************/
20
96bda103 21/** @file AliHLTTPCClusterFinderComponent.cxx
27f5f8ed 22 @author Timm Steinbeck, Matthias Richter, Jochen Thaeder, Kenneth Aamodt
de554e07 23 @date
24 @brief The TPC cluster finder processing component
25*/
a38a7850 26
e67b0680 27// see header file for class documentation //
28// or //
29// refer to README to build package //
30// or //
31// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt //
32
db16520a 33#if __GNUC__>= 3
71d7c760 34using namespace std;
35#endif
71d7c760 36#include "AliHLTTPCClusterFinderComponent.h"
a38a7850 37#include "AliHLTTPCDigitReaderPacked.h"
38#include "AliHLTTPCDigitReaderUnpacked.h"
db16520a 39#include "AliHLTTPCDigitReaderRaw.h"
a38a7850 40#include "AliHLTTPCClusterFinder.h"
a6c02c85 41#include "AliHLTTPCSpacePointData.h"
71d7c760 42#include "AliHLTTPCClusterDataFormat.h"
a6c02c85 43#include "AliHLTTPCTransform.h"
01f43166 44#include "AliHLTTPCClusters.h"
e67b0680 45#include "AliHLTTPCDefinitions.h"
c3cda394 46#include "AliCDBEntry.h"
47#include "AliCDBManager.h"
48
e67b0680 49#include <cstdlib>
50#include <cerrno>
ecefc48a 51#include "TString.h"
c3cda394 52#include "TObjString.h"
01f43166 53#include <sys/time.h>
71d7c760 54
55// this is a global object used for automatic component registration, do not use this
2a083ac4 56// use fPackedSwitch = true for packed inputtype "gkDDLPackedRawDataType"
57// use fPackedSwitch = false for unpacked inputtype "gkUnpackedRawDataType"
a38a7850 58AliHLTTPCClusterFinderComponent gAliHLTTPCClusterFinderComponentPacked(true);
59AliHLTTPCClusterFinderComponent gAliHLTTPCClusterFinderComponentUnpacked(false);
71d7c760 60
c3cda394 61/** ROOT macro for the implementation of ROOT specific class methods */
71d7c760 62ClassImp(AliHLTTPCClusterFinderComponent)
63
a38a7850 64AliHLTTPCClusterFinderComponent::AliHLTTPCClusterFinderComponent(bool packed)
74c73e5a 65 :
74c73e5a 66 fClusterFinder(NULL),
67 fReader(NULL),
68 fClusterDeconv(true),
69 fXYClusterError(-1),
2a083ac4 70 fZClusterError(-1),
01f43166 71 fPackedSwitch(packed),
01f43166 72 fUnsorted(0),
a1dbf058 73 fPatch(0),
b1c46961 74 fPadArray(NULL),
75 fGetActivePads(0)
74c73e5a 76{
2a083ac4 77 // see header file for class documentation
78 // or
79 // refer to README to build package
80 // or
81 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
74c73e5a 82}
83
71d7c760 84AliHLTTPCClusterFinderComponent::~AliHLTTPCClusterFinderComponent()
7e99beb3 85{
2a083ac4 86 // see header file for class documentation
7e99beb3 87}
71d7c760 88
89// Public functions to implement AliHLTComponent's interface.
90// These functions are required for the registration process
91
92const char* AliHLTTPCClusterFinderComponent::GetComponentID()
7e99beb3 93{
2a083ac4 94 // see header file for class documentation
7e99beb3 95 if (fPackedSwitch) return "TPCClusterFinderPacked";
96 else return "TPCClusterFinderUnpacked";
97}
71d7c760 98
8ede8717 99void AliHLTTPCClusterFinderComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
7e99beb3 100{
2a083ac4 101 // see header file for class documentation
7e99beb3 102 list.clear();
f69743b7 103 if (fPackedSwitch) list.push_back( kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC );
7e99beb3 104 else list.push_back( AliHLTTPCDefinitions::fgkUnpackedRawDataType );
a38a7850 105
7e99beb3 106}
71d7c760 107
8ede8717 108AliHLTComponentDataType AliHLTTPCClusterFinderComponent::GetOutputDataType()
7e99beb3 109{
2a083ac4 110 // see header file for class documentation
64defa03 111 return kAliHLTMultipleDataType;
112}
113
114int AliHLTTPCClusterFinderComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList)
115
116{
117 // see header file for class documentation
118 tgtList.clear();
119 tgtList.push_back(AliHLTTPCDefinitions::fgkClustersDataType);
120 tgtList.push_back(AliHLTTPCDefinitions::fgkActivePadsDataType);
121 return tgtList.size();
7e99beb3 122}
71d7c760 123
124void AliHLTTPCClusterFinderComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
7e99beb3 125{
2a083ac4 126 // see header file for class documentation
7e99beb3 127 // XXX TODO: Find more realistic values.
128 constBase = 0;
129 if (fPackedSwitch) inputMultiplier = (6 * 0.4);
130 else inputMultiplier = 0.4;
131}
71d7c760 132
133AliHLTComponent* AliHLTTPCClusterFinderComponent::Spawn()
7e99beb3 134{
2a083ac4 135 // see header file for class documentation
7e99beb3 136 return new AliHLTTPCClusterFinderComponent(fPackedSwitch);
137}
71d7c760 138
139int AliHLTTPCClusterFinderComponent::DoInit( int argc, const char** argv )
7e99beb3 140{
2a083ac4 141 // see header file for class documentation
7e99beb3 142 if ( fClusterFinder )
143 return EINPROGRESS;
144
145 fClusterFinder = new AliHLTTPCClusterFinder();
146
147 Int_t rawreadermode = -1;
148 Int_t sigthresh = -1;
b1c46961 149 Double_t sigmathresh= -1;
7e99beb3 150 Float_t occulimit = 1.0;
151 Int_t oldRCUFormat=0;
152 // Data Format version numbers:
153 // 0: RCU Data format as delivered during TPC commissioning, pads/padrows are sorted, RCU trailer is one 32 bit word.
154 // 1: As 0, but pads/padrows are delivered "as is", without sorting
155 // 2: As 0, but RCU trailer is 3 32 bit words.
156 // 3: As 1, but RCU trailer is 3 32 bit words.
157 // -1: use offline raw reader
158
159 Int_t i = 0;
160 Char_t* cpErr;
161
162 while ( i < argc ) {
163
164 // -- raw reader mode option
165 if ( !strcmp( argv[i], "rawreadermode" ) ) {
166 if ( argc <= i+1 ) {
167 Logging( kHLTLogError, "HLT::TPCClusterFinder::DoInit", "Missing rawreadermode", "Raw Reader Mode not specified" );
168 return ENOTSUP;
169 }
f3f599e0 170
7e99beb3 171 // Decodes the rawreader mode: either number or string and returns the rawreadermode
172 // -1 on failure, -2 for offline
173 rawreadermode = AliHLTTPCDigitReaderRaw::DecodeMode( argv[i+1] );
f3f599e0 174
7e99beb3 175 if (rawreadermode == -1 ) {
176 Logging( kHLTLogError, "HLT::TPCClusterFinder::DoInit", "Missing rawreadermode", "Cannot convert rawreadermode specifier '%s'.", argv[i+1] );
177 return EINVAL;
db16520a 178 }
179
7e99beb3 180 i += 2;
181 continue;
182 }
db16520a 183
7e99beb3 184 // -- pp run option
185 if ( !strcmp( argv[i], "pp-run" ) ) {
186 fClusterDeconv = false;
187 i++;
188 continue;
189 }
190
191 // -- zero suppression threshold
192 if ( !strcmp( argv[i], "adc-threshold" ) ) {
193 sigthresh = strtoul( argv[i+1], &cpErr ,0);
194 if ( *cpErr ) {
195 HLTError("Cannot convert threshold specifier '%s'.", argv[i+1]);
196 return EINVAL;
84645eb0 197 }
7e99beb3 198 i+=2;
199 continue;
200 }
84645eb0 201
7e99beb3 202 // -- pad occupancy limit
203 if ( !strcmp( argv[i], "occupancy-limit" ) ) {
d0173e83 204 occulimit = strtod( argv[i+1], &cpErr);
7e99beb3 205 if ( *cpErr ) {
206 HLTError("Cannot convert occupancy specifier '%s'.", argv[i+1]);
207 return EINVAL;
5235c3e9 208 }
7e99beb3 209 i+=2;
210 continue;
211 }
5235c3e9 212
7e99beb3 213 // -- number of timebins (default 1024)
214 if ( !strcmp( argv[i], "timebins" ) ) {
215 TString parameter(argv[i+1]);
216 parameter.Remove(TString::kLeading, ' '); // remove all blanks
217 if (parameter.IsDigit()) {
218 AliHLTTPCTransform::SetNTimeBins(parameter.Atoi());
74511e22 219 HLTInfo("number of timebins set to %d, zbin=%f", AliHLTTPCTransform::GetNTimeBins(), AliHLTTPCTransform::GetZWidth());
7e99beb3 220 } else {
221 HLTError("Cannot timebin specifier '%s'.", argv[i+1]);
222 return EINVAL;
ecefc48a 223 }
7e99beb3 224 i+=2;
225 continue;
226 }
ecefc48a 227
7e99beb3 228 // -- checking for rcu format
229 if ( !strcmp( argv[i], "oldrcuformat" ) ) {
230 oldRCUFormat = strtoul( argv[i+1], &cpErr ,0);
231 if ( *cpErr ){
232 HLTError("Cannot convert oldrcuformat specifier '%s'. Should be 0(off) or 1(on), must be integer", argv[i+1]);
233 return EINVAL;
27f5f8ed 234 }
7e99beb3 235 i+=2;
236 continue;
237 }
27f5f8ed 238
01f43166 239 // -- checking for unsorted clusterfinding
240 if ( !strcmp( argv[i], "unsorted" ) ) {
241 fUnsorted = strtoul( argv[i+1], &cpErr ,0);
242 if ( *cpErr ){
243 HLTError("Cannot convert unsorted specifier '%s'. Should be 0(off) or 1(on), must be integer", argv[i+1]);
244 return EINVAL;
245 }
246 i+=2;
247 continue;
248 }
249
b1c46961 250 // -- checking for active pads, used in 2007 December run
251 if ( !strcmp( argv[i], "activepads" ) ) {
252 fGetActivePads = strtoul( argv[i+1], &cpErr ,0);
253 if ( *cpErr ){
254 HLTError("Cannot convert activepads specifier '%s'. Should be 0(off) or 1(on), must be integer", argv[i+1]);
255 return EINVAL;
256 }
257 i+=2;
258 continue;
259 }
260
261 // -- checking for nsigma-threshold, used in 2007 December run in ZeroSuppression
262 if ( !strcmp( argv[i], "nsigma-threshold" ) ) {
263 sigmathresh = strtoul( argv[i+1], &cpErr ,0);
264 if ( *cpErr ){
265 HLTError("Cannot convert nsigma-threshold specifier '%s'. Must be integer", argv[i+1]);
266 return EINVAL;
267 }
268 i+=2;
269 continue;
270 }
271
7e99beb3 272 Logging(kHLTLogError, "HLT::TPCClusterFinder::DoInit", "Unknown Option", "Unknown option '%s'", argv[i] );
273 return EINVAL;
27f5f8ed 274
7e99beb3 275 }
db16520a 276
7e99beb3 277 // Choose reader
db16520a 278
7e99beb3 279 if (fPackedSwitch) {
280 if (rawreadermode == -2) {
f44e97dc 281 HLTDebug("using AliHLTTPCDigitReaderPacked");
7e99beb3 282 fReader = new AliHLTTPCDigitReaderPacked();
283 if(oldRCUFormat==1){
284 fReader->SetOldRCUFormat(kTRUE);
285 }
286 else if(oldRCUFormat!=0){
287 HLTWarning("Wrong oldrcuformat specifier %d; oldrcuformat set to default(kFALSE)",oldRCUFormat);
288 }
aff6e981 289 if(fUnsorted==1){
01f43166 290 fReader->SetUnsorted(kTRUE);
291 }
7e99beb3 292 fClusterFinder->SetReader(fReader);
7e99beb3 293 } else {
db16520a 294#if defined(HAVE_TPC_MAPPING)
f44e97dc 295 HLTDebug("using AliHLTTPCDigitReaderRaw mode %d", rawreadermode);
7e99beb3 296 fReader = new AliHLTTPCDigitReaderRaw(rawreadermode);
297 fClusterFinder->SetReader(fReader);
db16520a 298#else //! defined(HAVE_TPC_MAPPING)
299 HLTFatal("DigitReaderRaw not available - check your build");
300 return -ENODEV;
301#endif //defined(HAVE_TPC_MAPPING)
a38a7850 302 }
7e99beb3 303 }
304 else {
f44e97dc 305 HLTDebug("using AliHLTTPCDigitReaderUnpacked");
7e99beb3 306 fReader = new AliHLTTPCDigitReaderUnpacked();
307 fClusterFinder->SetReader(fReader);
308 }
309
310 // if pp-run use occupancy limit else set to 1. ==> use all
311 if ( !fClusterDeconv )
312 fClusterFinder->SetOccupancyLimit(occulimit);
313 else
314 fClusterFinder->SetOccupancyLimit(1.0);
db16520a 315
7e99beb3 316 // Variables to setup the Clusterfinder
317 // TODO: this sounds strange and has to be verified; is the cluster finder not working when
318 // fClusterDeconv = false ?
319 fClusterDeconv = true;
320 fXYClusterError = -1;
321 fZClusterError = -1;
a38a7850 322
db16520a 323
7e99beb3 324 fClusterFinder->SetDeconv( fClusterDeconv );
325 fClusterFinder->SetXYError( fXYClusterError );
326 fClusterFinder->SetZError( fZClusterError );
327 if ( (fXYClusterError>0) && (fZClusterError>0) )
328 fClusterFinder->SetCalcErr( false );
329 fClusterFinder->SetSignalThreshold(sigthresh);
b1c46961 330 fClusterFinder->SetNSigmaThreshold(sigmathresh);
01f43166 331
7e99beb3 332 return 0;
333}
71d7c760 334
335int AliHLTTPCClusterFinderComponent::DoDeinit()
7e99beb3 336{
2a083ac4 337 // see header file for class documentation
a38a7850 338
7e99beb3 339 if ( fClusterFinder )
340 delete fClusterFinder;
341 fClusterFinder = NULL;
a38a7850 342
7e99beb3 343 if ( fReader )
344 delete fReader;
345 fReader = NULL;
a38a7850 346
7e99beb3 347 return 0;
348}
71d7c760 349
8ede8717 350int AliHLTTPCClusterFinderComponent::DoEvent( const AliHLTComponentEventData& evtData,
351 const AliHLTComponentBlockData* blocks,
5d2abf3b 352 AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr,
a38a7850 353 AliHLTUInt32_t& size,
8ede8717 354 vector<AliHLTComponentBlockData>& outputBlocks )
7e99beb3 355{
2a083ac4 356 // see header file for class documentation
db16520a 357
7e99beb3 358 // == init iter (pointer to datablock)
359 const AliHLTComponentBlockData* iter = NULL;
360 unsigned long ndx;
a38a7850 361
7e99beb3 362 // == OUTdatatype pointer
363 AliHLTTPCClusterData* outPtr;
a38a7850 364
7e99beb3 365 AliHLTUInt8_t* outBPtr;
366 UInt_t offset, mysize, nSize, tSize = 0;
a38a7850 367
7e99beb3 368 outBPtr = outputPtr;
369 outPtr = (AliHLTTPCClusterData*)outBPtr;
a38a7850 370
7e99beb3 371 Int_t slice, patch, row[2];
372 unsigned long maxPoints, realPoints = 0;
a38a7850 373
7e99beb3 374 for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
375 {
376 iter = blocks+ndx;
377 mysize = 0;
378 offset = tSize;
a38a7850 379
380
f69743b7 381 if (fPackedSwitch) {
382 HLTDebug("Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s",
383 evtData.fEventID, evtData.fEventID,
384 DataType2Text( iter->fDataType).c_str(),
385 DataType2Text(kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC).c_str());
a38a7850 386
f69743b7 387 if (iter->fDataType == AliHLTTPCDefinitions::fgkDDLPackedRawDataType &&
388 GetEventCount()<2) {
389 HLTWarning("data type %s is depricated, use %s (kAliHLTDataTypeDDLRaw)!",
390 DataType2Text(AliHLTTPCDefinitions::fgkDDLPackedRawDataType).c_str(),
391 DataType2Text(kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC).c_str());
392 }
393
394 if ( iter->fDataType != (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC) &&
395 iter->fDataType != AliHLTTPCDefinitions::fgkDDLPackedRawDataType ) continue;
a38a7850 396
7e99beb3 397 }
398 else {
f69743b7 399 HLTDebug("Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s",
400 evtData.fEventID, evtData.fEventID,
401 DataType2Text( iter->fDataType).c_str(),
402 DataType2Text(AliHLTTPCDefinitions::fgkUnpackedRawDataType).c_str());
a38a7850 403
7e99beb3 404 if ( iter->fDataType != AliHLTTPCDefinitions::fgkUnpackedRawDataType ) continue;
a38a7850 405
7e99beb3 406 }
a38a7850 407
7e99beb3 408 slice = AliHLTTPCDefinitions::GetMinSliceNr( *iter );
409 patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter );
410 row[0] = AliHLTTPCTransform::GetFirstRow( patch );
411 row[1] = AliHLTTPCTransform::GetLastRow( patch );
71d7c760 412
aff6e981 413 if(fUnsorted){
414 if(fPadArray==NULL){
415 fClusterFinder->SetUnsorted(fUnsorted);
416 fPadArray = new AliHLTTPCPadArray(patch);
417 fPadArray->InitializeVector();
418 }
419 else if(fPadArray->GetPatch()!=patch||fPadArray->GetPatch()==-1){
420 if (GetEventCount()<3) {
421 HLTWarning("pad array not initialized for data of specification 0x%08x, block skipped", iter->fSpecification);
422 } else if ((GetEventCount()%5000)==0) { // assuming 0.5 to 1kHz this gives a message rate of 0.1 to 0.5 Hz
423 HLTWarning("reminder: pad array not initialized for data of specification 0x%08x", iter->fSpecification);
424 }
425 continue;
426 }
427 }
428
7e99beb3 429 outPtr = (AliHLTTPCClusterData*)outBPtr;
a38a7850 430
7e99beb3 431 maxPoints = (size-tSize-sizeof(AliHLTTPCClusterData))/sizeof(AliHLTTPCSpacePointData);
db16520a 432
7e99beb3 433 fClusterFinder->InitSlice( slice, patch, row[0], row[1], maxPoints );
e83e889b 434 fClusterFinder->SetOutputArray( (AliHLTTPCSpacePointData*)outPtr->fSpacePoints );
01f43166 435
436 if(fUnsorted){
437
438
439 fClusterFinder->SetPadArray(fPadArray);
aff6e981 440 /*
01f43166 441 double totalT=0;
442 struct timeval startT, endT;
443 gettimeofday( &startT, NULL );
aff6e981 444 */
01f43166 445 fClusterFinder->ReadDataUnsorted(iter->fPtr, iter->fSize );
aff6e981 446 /*
01f43166 447 gettimeofday( &endT, NULL );
448 unsigned long long dt;
449 dt = endT.tv_sec-startT.tv_sec;
450 dt *= 1000000ULL;
451 dt += endT.tv_usec-startT.tv_usec;
452 double dtd = ((double)dt);
453 totalT += dtd;
454 // dtd = dtd / (double)eventIterations;
455 // if ( iterations<=1 )
456 cout<<endl;
457 printf( "Time needed to read data: %f microsec. / %f millisec. / %f s\n",
458 dtd, dtd/1000.0, dtd/1000000.0 );
459
460 cout<<endl;
aff6e981 461 */
01f43166 462 fClusterFinder->FindClusters();
463 }
464 else{
465 fClusterFinder->Read(iter->fPtr, iter->fSize );
466 fClusterFinder->ProcessDigits();
467 }
7e99beb3 468 realPoints = fClusterFinder->GetNumberOfClusters();
71d7c760 469
7e99beb3 470 outPtr->fSpacePointCnt = realPoints;
471 nSize = sizeof(AliHLTTPCSpacePointData)*realPoints;
472 mysize += nSize+sizeof(AliHLTTPCClusterData);
74511e22 473
474 Logging( kHLTLogDebug, "HLT::TPCClusterFinder::DoEvent", "Spacepoints",
7e99beb3 475 "Number of spacepoints: %lu Slice/Patch/RowMin/RowMax: %d/%d/%d/%d.",
476 realPoints, slice, patch, row[0], row[1] );
477 AliHLTComponentBlockData bd;
478 FillBlockData( bd );
479 bd.fOffset = offset;
480 bd.fSize = mysize;
481 bd.fSpecification = iter->fSpecification;
64defa03 482 bd.fDataType = AliHLTTPCDefinitions::fgkClustersDataType;
7e99beb3 483 //AliHLTSubEventDescriptor::FillBlockAttributes( bd.fAttributes );
484 outputBlocks.push_back( bd );
71d7c760 485
7e99beb3 486 tSize += mysize;
487 outBPtr += mysize;
488 outPtr = (AliHLTTPCClusterData*)outBPtr;
71d7c760 489
b1c46961 490 if(fGetActivePads){
491 AliHLTTPCPadArray::AliHLTTPCActivePads* outPtrActive;
492 UInt_t activePadsSize, activePadsN = 0;
493 outPtrActive = (AliHLTTPCPadArray::AliHLTTPCActivePads*)outBPtr;
494 offset=tSize;
495 Int_t maxActivePads = (size-tSize)/sizeof(AliHLTTPCPadArray::AliHLTTPCActivePads);
496 activePadsSize= fClusterFinder->GetActivePads((AliHLTTPCPadArray::AliHLTTPCActivePads*)outPtrActive,maxActivePads)*sizeof(AliHLTTPCPadArray::AliHLTTPCActivePads);
497
498 AliHLTComponentBlockData bdActive;
499 FillBlockData( bdActive );
500 bdActive.fOffset = offset;
501 bdActive.fSize = activePadsSize;
502 bdActive.fSpecification = iter->fSpecification;
503 bdActive.fDataType = AliHLTTPCDefinitions::fgkActivePadsDataType;
504 outputBlocks.push_back( bdActive );
505
506 tSize+=activePadsSize;
507 outBPtr += activePadsSize;
508 outPtrActive = (AliHLTTPCPadArray::AliHLTTPCActivePads*)outBPtr;
509 }
510
511
7e99beb3 512 if ( tSize > size )
513 {
514 Logging( kHLTLogFatal, "HLT::TPCClusterFinder::DoEvent", "Too much data",
515 "Data written over allowed buffer. Amount written: %lu, allowed amount: %lu.",
516 tSize, size );
517 return EMSGSIZE;
71d7c760 518 }
71d7c760 519 }
7e99beb3 520
521 size = tSize;
71d7c760 522
7e99beb3 523 return 0;
524}
c3cda394 525
526int AliHLTTPCClusterFinderComponent::Reconfigure(const char* cdbEntry, const char* chainId)
527{
528 // see header file for class documentation
529 const char* path="HLT/ConfigTPC";
530 if (cdbEntry) path=cdbEntry;
531 if (path) {
532 HLTInfo("reconfigure from entry %s, chain id %s", path, (chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
533 AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/);
534 if (pEntry) {
535 TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
536 if (pString) {
537 HLTInfo("received configuration object: %s", pString->GetString().Data());
538 } else {
539 HLTError("configuration object \"%s\" has wrong type, required TObjString", path);
540 }
541 } else {
542 HLTError("can not fetch object \"%s\" from CDB", path);
543 }
544 }
545}