3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Timm Steinbeck, Matthias Richter *
8 //* Developers: Kenneth Aamodt <kenneth.aamodt@student.uib.no> *
9 //* for The ALICE HLT Project. *
11 //* Permission to use, copy, modify and distribute this software and its *
12 //* documentation strictly for non-commercial purposes is hereby granted *
13 //* without fee, provided that the above copyright notice appears in all *
14 //* copies and that both the copyright notice and this permission notice *
15 //* appear in the supporting documentation. The authors make no claims *
16 //* about the suitability of this software for any purpose. It is *
17 //* provided "as is" without express or implied warranty. *
18 //**************************************************************************
20 /** @file AliHLTTPCClusterFinderComponent.cxx
21 @author Kenneth Aamodt <kenneth.aamodt@student.uib.no>
23 @brief The TPC cluster finder processing component
29 #include "AliHLTTPCClusterFinderComponent.h"
30 #include "AliHLTTPCDigitReaderPacked.h"
31 #include "AliHLTTPCDigitReaderUnpacked.h"
32 #include "AliHLTTPCDigitReaderDecoder.h"
33 #include "AliHLTTPCDigitReader32Bit.h"
34 #include "AliHLTTPCClusterFinder.h"
35 #include "AliHLTTPCSpacePointData.h"
36 #include "AliHLTTPCClusterDataFormat.h"
37 #include "AliHLTTPCTransform.h"
38 #include "AliHLTTPCClusters.h"
39 #include "AliHLTTPCDefinitions.h"
40 #include "AliCDBEntry.h"
41 #include "AliCDBManager.h"
42 #include "AliTPCcalibDB.h"
43 #include "AliTPCCalPad.h"
44 #include "AliTPCParam.h"
49 #include "TObjString.h"
50 #include "TObjArray.h"
51 #include "AliCDBEntry.h"
52 #include "AliCDBManager.h"
53 #include "AliCDBStorage.h"
57 /** ROOT macro for the implementation of ROOT specific class methods */
58 ClassImp(AliHLTTPCClusterFinderComponent)
60 const char* AliHLTTPCClusterFinderComponent::fgkOCDBEntryPacked="HLT/ConfigTPC/TPCClusterFinderPacked";
61 const char* AliHLTTPCClusterFinderComponent::fgkOCDBEntryUnpacked="HLT/ConfigTPC/TPCClusterFinderUnpacked";
62 const char* AliHLTTPCClusterFinderComponent::fgkOCDBEntryDecoder="HLT/ConfigTPC/TPCClusterFinderDecoder";
63 const char* AliHLTTPCClusterFinderComponent::fgkOCDBEntry32Bit="HLT/ConfigTPC/TPCClusterFinder32Bit";
65 AliHLTTPCClusterFinderComponent::AliHLTTPCClusterFinderComponent(int mode)
71 fClusterDeconv(false),
82 // see header file for class documentation
84 // refer to README to build package
86 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
87 if (fModeSwitch!=kClusterFinderPacked &&
88 fModeSwitch!=kClusterFinderUnpacked &&
89 fModeSwitch!=kClusterFinderDecoder &&
90 fModeSwitch!=kClusterFinder32Bit) {
91 HLTFatal("unknown digit reader type");
95 AliHLTTPCClusterFinderComponent::~AliHLTTPCClusterFinderComponent()
97 // see header file for class documentation
100 // Public functions to implement AliHLTComponent's interface.
101 // These functions are required for the registration process
103 const char* AliHLTTPCClusterFinderComponent::GetComponentID()
105 // see header file for class documentation
107 case kClusterFinderPacked:
108 return "TPCClusterFinderPacked";
110 case kClusterFinderUnpacked:
111 return "TPCClusterFinderUnpacked";
113 case kClusterFinderDecoder:
114 return "TPCClusterFinderDecoder";
116 case kClusterFinder32Bit:
117 return "TPCClusterFinder32Bit";
123 void AliHLTTPCClusterFinderComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
125 // see header file for class documentation
128 case kClusterFinderPacked:
129 list.push_back( kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC );
131 case kClusterFinderUnpacked:
132 list.push_back( AliHLTTPCDefinitions::fgkUnpackedRawDataType );
134 case kClusterFinderDecoder:
135 list.push_back( kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC );
137 case kClusterFinder32Bit:
138 list.push_back( kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC );
143 AliHLTComponentDataType AliHLTTPCClusterFinderComponent::GetOutputDataType()
145 // see header file for class documentation
146 return kAliHLTMultipleDataType;
149 int AliHLTTPCClusterFinderComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList)
152 // see header file for class documentation
154 tgtList.push_back(AliHLTTPCDefinitions::fgkClustersDataType);
155 tgtList.push_back(kAliHLTDataTypeHwAddr16);
156 return tgtList.size();
159 void AliHLTTPCClusterFinderComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
161 // see header file for class documentation
162 // XXX TODO: Find more realistic values.
165 case kClusterFinderPacked:
166 inputMultiplier = (6 * 0.4);
168 case kClusterFinderUnpacked:
169 inputMultiplier = 0.4;
171 case kClusterFinderDecoder:
172 inputMultiplier = (6 * 0.4);
174 case kClusterFinder32Bit:
175 inputMultiplier = (6 * 0.4);
180 AliHLTComponent* AliHLTTPCClusterFinderComponent::Spawn()
182 // see header file for class documentation
183 return new AliHLTTPCClusterFinderComponent(fModeSwitch);
186 int AliHLTTPCClusterFinderComponent::DoInit( int argc, const char** argv )
188 // see header file for class documentation
189 if ( fClusterFinder )
192 //Test if the OCDB entries used by AliTPCTransform is availible
193 AliTPCcalibDB* calib=AliTPCcalibDB::Instance();
196 HLTError("AliTPCcalibCD does not exist");
199 AliTPCCalPad * time0TPC = calib->GetPadTime0();
201 HLTError("OCDB entry TPC/Calib/PadTime0 (AliTPCcalibDB::GetPadTime0()) is not available.");
205 AliTPCParam * param = calib->GetParameters();
207 HLTError("OCDB entry TPC/Calib/Parameters (AliTPCcalibDB::GetParameters()) is not available.");
211 fClusterFinder = new AliHLTTPCClusterFinder();
213 // first configure the default
216 case kClusterFinderPacked:
217 iResult=ConfigureFromCDBTObjString(fgkOCDBEntryPacked);
219 case kClusterFinderUnpacked:
220 iResult=ConfigureFromCDBTObjString(fgkOCDBEntryUnpacked);
222 case kClusterFinderDecoder:
223 iResult=ConfigureFromCDBTObjString(fgkOCDBEntryDecoder);
225 case kClusterFinder32Bit:
226 iResult=ConfigureFromCDBTObjString(fgkOCDBEntry32Bit);
230 // configure from the command line parameters if specified
231 if (iResult>=0 && argc>0)
232 iResult=ConfigureFromArgumentString(argc, argv);
236 //initialize the magnetic field from CDB
237 iResult = ConfigureFromCDBTObjString(kAliHLTCDBSolenoidBz);
242 TString configuration="";
244 for (int i=0; i<argc && iResult>=0; i++) {
246 if (!configuration.IsNull()) configuration+=" ";
247 configuration+=argument;
250 if (!configuration.IsNull()) {
251 iResult=Configure(configuration.Data());
253 iResult=Reconfigure(NULL, NULL);
257 //Checking for conflicting arguments
259 if(fDeconvPad==kTRUE || fDeconvTime==kTRUE){
260 HLTWarning("Conflicting arguments: argument 'pp-run' will be ignored.");
263 if(fClusterFinder->GetOccupancyLimit()!=1.0 && fUnsorted){
264 HLTWarning("Argument 'occupancy-limit' is deprecated when doing unsorted data reading.");
266 if(fGetActivePads==kTRUE && fUnsorted==kFALSE){
267 HLTWarning("Argument '-active-pads' only work with unsorted data reading. Active pads list will not be produced.");
272 if (fModeSwitch==kClusterFinderPacked) {
273 HLTDebug("using AliHLTTPCDigitReaderPacked");
274 fReader = new AliHLTTPCDigitReaderPacked();
275 if(fUnsorted==1){ fReader->SetUnsorted(kTRUE); }
276 fClusterFinder->SetReader(fReader);
278 else if(fModeSwitch==kClusterFinderUnpacked){
279 HLTDebug("using AliHLTTPCDigitReaderUnpacked");
280 fReader = new AliHLTTPCDigitReaderUnpacked();
281 if(fUnsorted==1){ fReader->SetUnsorted(kTRUE); }
282 fClusterFinder->SetReader(fReader);
284 else if(fModeSwitch==kClusterFinderDecoder){
285 HLTDebug("using AliHLTTPCDigitReaderDecoder");
286 fReader = new AliHLTTPCDigitReaderDecoder();
287 fClusterFinder->SetReader(fReader);
289 else if(fModeSwitch==kClusterFinder32Bit){
290 HLTDebug("using AliHLTTPCDigitReader32Bit");
291 fReader = new AliHLTTPCDigitReader32Bit();
292 fClusterFinder->SetReader(fReader);
293 fClusterFinder->Set32BitFormat(kTRUE);
296 HLTFatal("No mode set for clusterfindercomponent");
300 fClusterFinder->SetOccupancyLimit(1.0);
303 fClusterFinder->SetDeconv(fClusterDeconv);
304 fClusterFinder->SetDeconvPad(fDeconvPad);
305 fClusterFinder->SetDeconvTime(fDeconvPad);
306 fClusterFinder->SetXYError( fXYClusterError );
307 fClusterFinder->SetZError( fZClusterError );
308 if ( (fXYClusterError>0) && (fZClusterError>0) ){
309 fClusterFinder->SetCalcErr( false );
313 fClusterFinder->SetFirstTimeBin(fFirstTimeBin);
315 if(fLastTimeBin>0 && fLastTimeBin>fFirstTimeBin && fLastTimeBin<=AliHLTTPCTransform::GetNTimeBins()){
316 fClusterFinder->SetLastTimeBin(fLastTimeBin);
322 int AliHLTTPCClusterFinderComponent::DoDeinit()
324 // see header file for class documentation
326 if ( fClusterFinder )
327 delete fClusterFinder;
328 fClusterFinder = NULL;
337 int AliHLTTPCClusterFinderComponent::DoEvent( const AliHLTComponentEventData& evtData,
338 const AliHLTComponentBlockData* blocks,
339 AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr,
340 AliHLTUInt32_t& size,
341 vector<AliHLTComponentBlockData>& outputBlocks )
343 // see header file for class documentation
347 HLTFatal("Digit reader not initialized, skipping HLT TPC cluster reconstruction.");
357 // == init iter (pointer to datablock)
358 const AliHLTComponentBlockData* iter = NULL;
361 // == OUTdatatype pointer
362 AliHLTTPCClusterData* outPtr;
364 AliHLTUInt8_t* outBPtr;
365 UInt_t offset, mysize, nSize, tSize = 0;
368 outPtr = (AliHLTTPCClusterData*)outBPtr;
371 unsigned long maxPoints, realPoints = 0;
373 for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
379 // Kenneth 16. July 2009
380 // 32 byte is the size of the common data header (CDH)
381 // this is introduced as a protection of empty files
382 // normally when running with file publisher where
383 // Timms script is used to create the missing files
384 if(iter->fSize <= 32){
389 if (fModeSwitch==0 || fModeSwitch==2 || fModeSwitch==3) {
390 HLTDebug("Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s",
391 evtData.fEventID, evtData.fEventID,
392 DataType2Text( iter->fDataType).c_str(),
393 DataType2Text(kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC).c_str());
395 if (iter->fDataType == AliHLTTPCDefinitions::fgkDDLPackedRawDataType &&
397 HLTWarning("data type %s is depricated, use %s (kAliHLTDataTypeDDLRaw)!",
398 DataType2Text(AliHLTTPCDefinitions::fgkDDLPackedRawDataType).c_str(),
399 DataType2Text(kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC).c_str());
402 if ( iter->fDataType != (kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC) &&
403 iter->fDataType != AliHLTTPCDefinitions::fgkDDLPackedRawDataType ) continue;
406 else if(fModeSwitch==1){
407 HLTDebug("Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s",
408 evtData.fEventID, evtData.fEventID,
409 DataType2Text( iter->fDataType).c_str(),
410 DataType2Text(AliHLTTPCDefinitions::fgkUnpackedRawDataType).c_str());
412 if ( iter->fDataType != AliHLTTPCDefinitions::fgkUnpackedRawDataType ) continue;
416 slice = AliHLTTPCDefinitions::GetMinSliceNr( *iter );
417 patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter );
420 fClusterFinder->SetUnsorted(fUnsorted);
421 fClusterFinder->SetPatch(patch);
424 outPtr = (AliHLTTPCClusterData*)outBPtr;
426 maxPoints = (size-tSize-sizeof(AliHLTTPCClusterData))/sizeof(AliHLTTPCSpacePointData);
428 fClusterFinder->InitSlice( slice, patch, maxPoints );
429 fClusterFinder->SetOutputArray( (AliHLTTPCSpacePointData*)outPtr->fSpacePoints );
433 fClusterFinder->SetDoPadSelection(kTRUE);
436 fClusterFinder->ReadDataUnsortedDeconvoluteTime(iter->fPtr, iter->fSize);
439 fClusterFinder->ReadDataUnsorted(iter->fPtr, iter->fSize);
442 fClusterFinder->FindClusters();
445 fClusterFinder->Read(iter->fPtr, iter->fSize );
446 fClusterFinder->ProcessDigits();
450 realPoints = fClusterFinder->GetNumberOfClusters();
452 outPtr->fSpacePointCnt = realPoints;
453 nSize = sizeof(AliHLTTPCSpacePointData)*realPoints;
454 mysize += nSize+sizeof(AliHLTTPCClusterData);
456 Logging( kHLTLogDebug, "HLT::TPCClusterFinder::DoEvent", "Spacepoints",
457 "Number of spacepoints: %lu Slice/Patch/RowMin/RowMax: %d/%d/%d/%d.",
458 realPoints, slice, patch,AliHLTTPCTransform::GetFirstRow( patch ) , AliHLTTPCTransform::GetLastRow( patch ) );
459 AliHLTComponentBlockData bd;
463 bd.fSpecification = iter->fSpecification;
464 bd.fDataType = AliHLTTPCDefinitions::fgkClustersDataType;
465 outputBlocks.push_back( bd );
469 outPtr = (AliHLTTPCClusterData*)outBPtr;
474 Logging( kHLTLogFatal, "HLT::TPCClusterFinder::DoEvent", "Too much data",
475 "Data written over allowed buffer. Amount written: %lu, allowed amount: %lu.",
481 if(fUnsorted && fGetActivePads){
482 Int_t maxNumberOfHW=(Int_t)((size-tSize)/sizeof(AliHLTUInt16_t)-1);
483 AliHLTUInt16_t* outputHWPtr= (AliHLTUInt16_t*)(outputPtr+tSize);
484 Int_t nHWAdd = fClusterFinder->FillHWAddressList(outputHWPtr, maxNumberOfHW);
486 AliHLTComponentBlockData bdHW;
487 FillBlockData( bdHW );
488 bdHW.fOffset = tSize ;
489 bdHW.fSize = nHWAdd*sizeof(AliHLTUInt16_t);
490 bdHW.fSpecification = iter->fSpecification;
491 bdHW.fDataType = kAliHLTDataTypeHwAddr16;
492 outputBlocks.push_back( bdHW );
494 tSize+=nHWAdd*sizeof(AliHLTUInt16_t);
498 Int_t maxNumberOfClusterMCInfo = (Int_t)((size-tSize)/sizeof(AliHLTTPCClusterFinder::ClusterMCInfo)-1);
499 AliHLTTPCClusterFinder::ClusterMCInfo* outputMCInfo= (AliHLTTPCClusterFinder::ClusterMCInfo*)(outputPtr+tSize);
500 Int_t nMCInfo = fClusterFinder->FillOutputMCInfo(outputMCInfo, maxNumberOfClusterMCInfo);
502 AliHLTComponentBlockData bdMCInfo;
503 FillBlockData( bdMCInfo );
504 bdMCInfo.fOffset = tSize ;
505 bdMCInfo.fSize = nMCInfo*sizeof(AliHLTTPCClusterFinder::ClusterMCInfo);
506 bdMCInfo.fSpecification = iter->fSpecification;
507 bdMCInfo.fDataType = AliHLTTPCDefinitions::fgkAliHLTDataTypeClusterMCInfo;
508 outputBlocks.push_back( bdMCInfo );
510 tSize+=nMCInfo*sizeof(AliHLTTPCClusterFinder::ClusterMCInfo);
521 int AliHLTTPCClusterFinderComponent::ScanConfigurationArgument(int argc, const char** argv){
523 // see header file for class documentation
525 if (argc<=0) return 0;
527 TString argument=argv[i];
529 if (argument.CompareTo("-solenoidBz")==0){
530 if (++i>=argc) return -EPROTO;
532 AliTPCcalibDB* calib=AliTPCcalibDB::Instance();
534 HLTError("CalibDB not availible");
536 Float_t magneticField = argument.Atof();
537 calib->SetExBField(magneticField);
538 HLTInfo("SolenoidBz is set to %f in the calibDB",magneticField);
542 if (argument.CompareTo("-update-calibdb")==0 || argument.CompareTo("-update-transform")==0 ){
543 if(fClusterFinder->UpdateCalibDB()){
544 HLTDebug("CalibDB and offline transform successfully updated.");
547 HLTError("CalibDB could not be updated.");
552 if (argument.CompareTo("-deconvolute-time")==0){
553 HLTDebug("Switching on deconvolution in time direction.");
555 fClusterFinder->SetDeconvTime(fDeconvTime);
559 if (argument.CompareTo("-deconvolute-pad")==0){
560 HLTDebug("Switching on deconvolution in pad direction.");
562 fClusterFinder->SetDeconvPad(fDeconvPad);
566 if (argument.CompareTo("-timebins")==0 || argument.CompareTo("timebins" )==0){
567 HLTWarning("Argument %s is depreciated after moving to the offline AliTPCTransform class for xyz calculations.",argument.Data());
569 if (++i>=argc) return -EPROTO;
571 AliHLTTPCTransform::SetNTimeBins(argument.Atoi());
572 fClusterFinder->UpdateLastTimeBin();
573 HLTInfo("number of timebins set to %d, zbin=%f", AliHLTTPCTransform::GetNTimeBins(), AliHLTTPCTransform::GetZWidth());
576 if(argument.CompareTo("timebins")==0){
577 HLTWarning("Argument 'timebins' is old, please switch to new argument naming convention (-timebins). The timebins argument will still work, but please change anyway.");
582 if (argument.CompareTo("-first-timebin")==0){
583 if (++i>=argc) return -EPROTO;
585 fFirstTimeBin = argument.Atoi();
586 if(fFirstTimeBin>=0){
587 HLTDebug("fFirstTimeBin set to %d",fFirstTimeBin);
588 fClusterFinder->SetFirstTimeBin(fFirstTimeBin);
591 HLTError("-first-timebin specifier is negative: %d",fFirstTimeBin);
596 if (argument.CompareTo("-last-timebin")==0){
597 if (++i>=argc) return -EPROTO;
599 fLastTimeBin = argument.Atoi();
600 if(fLastTimeBin<AliHLTTPCTransform::GetNTimeBins()){
601 HLTDebug("fLastTimeBin set to %d",fLastTimeBin);
604 HLTError("fLastTimeBins is too big: %d. Maximum: %d",fLastTimeBin,AliHLTTPCTransform::GetNTimeBins());
609 if (argument.CompareTo("-sorted")==0) {
611 HLTDebug("Swithching unsorted off.");
612 fClusterFinder->SetUnsorted(0);
616 if (argument.CompareTo("-do-mc")==0) {
618 fClusterFinder->SetDoMC(fDoMC);
619 HLTDebug("Setting fDoMC to true.");
623 if (argument.CompareTo("-active-pads")==0 || argument.CompareTo("activepads")==0){
624 if(argument.CompareTo("activepads" )==0){
625 HLTWarning("Please change to new component argument naming scheme and use '-active-pads' instead of 'activepads'");
627 HLTDebug("Switching on ActivePads");
629 fClusterFinder->SetDoPadSelection(kTRUE);
633 if (argument.CompareTo("-occupancy-limit")==0 || argument.CompareTo("occupancy-limit")==0){
634 if(argument.CompareTo("occupancy-limit" )==0){
635 HLTWarning("Please switch to new component argument naming convention, use '-occupancy-limit' instead of 'occupancy-limit'");
637 if (++i>=argc) return -EPROTO;
639 fClusterFinder->SetOccupancyLimit(argument.Atof());
640 HLTDebug("Occupancy limit set to occulimit %f", argument.Atof());
644 if (argument.CompareTo("rawreadermode")==0){
645 if (++i>=argc) return -EPROTO;
646 HLTWarning("Argument 'rawreadermode' is deprecated");
650 if (argument.CompareTo("pp-run")==0){
651 HLTWarning("Argument 'pp-run' is obsolete, deconvolution is swiched off in both time and pad directions by default.");
652 fClusterDeconv = false;
656 if (argument.CompareTo("adc-threshold" )==0){
657 if (++i>=argc) return -EPROTO;
658 HLTWarning("'adc-threshold' is no longer a valid argument, please use TPCZeroSuppression component if you want to zerosuppress data.");
662 if (argument.CompareTo("oldrcuformat" )==0){
663 if (++i>=argc) return -EPROTO;
664 HLTWarning("Argument 'oldrcuformat' is deprecated.");
668 if (argument.CompareTo("unsorted" )==0 || argument.CompareTo("-unsorted" )==0){
669 HLTWarning("Argument is obsolete, unsorted reading is default.");
670 // fClusterFinder->SetUnsorted(1);
673 if (argument.CompareTo("nsigma-threshold")==0){
674 if (++i>=argc) return -EPROTO;
675 HLTWarning("Argument 'nsigma-threshold' argument is obsolete.");
683 int AliHLTTPCClusterFinderComponent::Reconfigure(const char* cdbEntry, const char* /*chainId*/)
685 // see header file for class documentation
687 const char* entry=cdbEntry;
688 if (!entry || entry[0]==0){
690 case kClusterFinderPacked:
691 entry=fgkOCDBEntryPacked;
693 case kClusterFinderUnpacked:
694 entry=fgkOCDBEntryUnpacked;
696 case kClusterFinderDecoder:
697 entry=fgkOCDBEntryDecoder;
699 case kClusterFinder32Bit:
700 entry=fgkOCDBEntry32Bit;
705 return ConfigureFromCDBTObjString(entry);
710 const char* path="HLT/ConfigTPC/ClusterFinderComponent";
711 if (cdbEntry) path=cdbEntry;
713 HLTInfo("reconfigure from entry %s, chain id %s", path, (chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
714 AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path);//,GetRunNo());
716 TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
718 HLTInfo("received configuration object: %s", pString->GetString().Data());
719 iResult = Configure(pString->GetString().Data());
721 HLTError("configuration object \"%s\" has wrong type, required TObjString", path);
724 HLTError("can not fetch object \"%s\" from CDB", path);
731 int AliHLTTPCClusterFinderComponent::Configure(const char* arguments){
732 // see header file for class documentation
734 if (!arguments) return iResult;
736 TString allArgs=arguments;
740 TObjArray* pTokens=allArgs.Tokenize(" ");
743 for (int i=0; i<pTokens->GetEntries() && iResult>=0; i++) {
744 argument=((TObjString*)pTokens->At(i))->GetString();
746 if (argument.IsNull()) continue;
748 // -- deconvolute-time option
749 if (argument.CompareTo("-deconvolute-time")==0){
750 HLTDebug("Switching on deconvolution in time direction.");
752 fClusterFinder->SetDeconvTime(fDeconvTime);
754 else if (argument.CompareTo("-deconvolute-pad")==0){
755 HLTDebug("Switching on deconvolution in pad direction.");
757 fClusterFinder->SetDeconvPad(fDeconvPad);
759 else if (argument.CompareTo("-timebins")==0 || argument.CompareTo("timebins" )==0){
760 HLTWarning("Argument %s is depreciated after moving to the offline AliTPCTransform class for xyz calculations.",argument.Data());
762 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
763 AliHLTTPCTransform::SetNTimeBins(((TObjString*)pTokens->At(i))->GetString().Atoi());
764 fClusterFinder->UpdateLastTimeBin();
765 HLTInfo("number of timebins set to %d, zbin=%f", AliHLTTPCTransform::GetNTimeBins(), AliHLTTPCTransform::GetZWidth());
767 if(argument.CompareTo("timebins")==0){
768 HLTWarning("Argument 'timebins' is old, please switch to new argument naming convention (-timebins). The timebins argument will still work, but please change anyway.");
772 else if (argument.CompareTo("-first-timebin")==0){
773 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
774 fFirstTimeBin = ((TObjString*)pTokens->At(i))->GetString().Atoi();
775 if(fFirstTimeBin>=0){
776 HLTDebug("fFirstTimeBin set to %d",fFirstTimeBin);
777 fClusterFinder->SetFirstTimeBin(fFirstTimeBin);
780 HLTError("-first-timebin specifier is negative: %d",fFirstTimeBin);
783 else if (argument.CompareTo("-last-timebin")==0){
784 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
785 fLastTimeBin = ((TObjString*)pTokens->At(i))->GetString().Atoi();
786 if(fLastTimeBin<AliHLTTPCTransform::GetNTimeBins()){
787 HLTDebug("fLastTimeBin set to %d",fLastTimeBin);
790 HLTError("fLastTimeBins is too big: %d. Maximum: %d",fLastTimeBin,AliHLTTPCTransform::GetNTimeBins());
793 else if (argument.CompareTo("-sorted")==0) {
795 HLTDebug("Swithching unsorted off.");
796 fClusterFinder->SetUnsorted(0);
798 else if (argument.CompareTo("-do-mc")==0) {
800 fClusterFinder->SetDoMC(fDoMC);
801 HLTInfo("Setting fDoMC to true.");
803 else if (argument.CompareTo("-active-pads")==0 || argument.CompareTo("activepads")==0){
804 if(argument.CompareTo("activepads" )==0){
805 HLTWarning("Please change to new component argument naming scheme and use '-active-pads' instead of 'activepads'");
807 HLTDebug("Switching on ActivePads");
809 fClusterFinder->SetDoPadSelection(kTRUE);
811 else if (argument.CompareTo("-occupancy-limit")==0 || argument.CompareTo("occupancy-limit")==0){
812 if(argument.CompareTo("occupancy-limit" )==0){
813 HLTWarning("Please switch to new component argument naming convention, use '-occupancy-limit' instead of 'occupancy-limit'");
815 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
816 fClusterFinder->SetOccupancyLimit(((TObjString*)pTokens->At(i))->GetString().Atof());
817 HLTDebug("Occupancy limit set to occulimit %f", ((TObjString*)pTokens->At(i))->GetString().Atof());
819 else if (argument.CompareTo("rawreadermode")==0){
820 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
821 HLTWarning("Argument 'rawreadermode' is deprecated");
823 else if (argument.CompareTo("pp-run")==0){
824 HLTWarning("Argument 'pp-run' is obsolete, deconvolution is swiched off in both time and pad directions by default.");
825 fClusterDeconv = false;
827 else if (argument.CompareTo("adc-threshold" )==0){
828 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
829 HLTWarning("'adc-threshold' is no longer a valid argument, please use TPCZeroSuppression component if you want to zerosuppress data.");
831 else if (argument.CompareTo("oldrcuformat" )==0){
832 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
833 HLTWarning("Argument 'oldrcuformat' is deprecated.");
835 else if (argument.CompareTo("unsorted" )==0){
836 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
837 HLTDebug("Using unsorted reading.");
838 fClusterFinder->SetUnsorted(1);
840 else if (argument.CompareTo("nsigma-threshold")==0){
841 if ((bMissingParam=(++i>=pTokens->GetEntries()))) break;
842 HLTWarning("Argument 'nsigma-threshold' argument is obsolete.");
844 else if (argument.CompareTo("-update-calibdb")==0){
845 fClusterFinder->UpdateCalibDB();
848 HLTError("unknown argument %s", argument.Data());
856 HLTError("missing parameter for argument %s", argument.Data());