]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/ITS/AliHLTITSClusterFinderComponent.cxx
remove also dependency on AliESDCaloCluster, functionality already existing to get...
[u/mrichter/AliRoot.git] / HLT / ITS / AliHLTITSClusterFinderComponent.cxx
CommitLineData
6b7742a2 1// $Id$
2//**************************************************************************
3//* This file is property of and copyright by the ALICE HLT Project *
4//* ALICE Experiment at CERN, All rights reserved. *
5//* *
6//* Primary Authors: Gaute Øvrebekk <st05886@alf.uib.no> *
7//* for The ALICE HLT Project. *
8//* *
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//**************************************************************************
17
18/** @file AliHLTITSClusterFinderComponent.cxx
19 @author Gaute Øvrebekk <st05886@alf.uib.no>
20 @date
21 @brief Component to run offline clusterfinders
22*/
23
24#if __GNUC__>= 3
25using namespace std;
26#endif
27
28#include "AliHLTITSClusterFinderComponent.h"
29
30#include "AliCDBEntry.h"
31#include "AliCDBManager.h"
2bd1335e 32#include "AliCDBStorage.h"
6b7742a2 33#include "AliITSgeomTGeo.h"
34#include "AliITSRecPoint.h"
35#include "AliHLTITSSpacePointData.h"
36#include "AliHLTITSClusterDataFormat.h"
37#include <AliHLTDAQ.h>
38#include "AliGeomManager.h"
060f29ad 39#include "AliITSRecoParam.h"
40#include "AliITSReconstructor.h"
3f61e9ce 41#include "AliHLTITSClusterFinderSPD.h"
a2a2a7ce 42#include "AliHLTITSClusterFinderSSD.h"
6b7742a2 43
44#include <cstdlib>
45#include <cerrno>
46#include "TString.h"
47#include "TObjString.h"
48#include <sys/time.h>
49
50/** ROOT macro for the implementation of ROOT specific class methods */
51ClassImp(AliHLTITSClusterFinderComponent);
52
53AliHLTITSClusterFinderComponent::AliHLTITSClusterFinderComponent(int mode)
54 :
55 fModeSwitch(mode),
a2a2a7ce 56 fInputDataType(kAliHLTVoidDataType),
57 fOutputDataType(kAliHLTVoidDataType),
58 fUseOfflineFinder(0),
6b7742a2 59 fNModules(0),
60 fId(0),
61 fNddl(0),
d293cef8 62 fClusters(NULL),
6b7742a2 63 fRawReader(NULL),
64 fDettype(NULL),
65 fgeom(NULL),
3f61e9ce 66 fgeomInit(NULL),
a2a2a7ce 67 fSPD(NULL),
618f422f 68 fSSD(NULL),
69 tD(NULL),
70 tR(NULL),
57a4102f 71 fclusters(),
72 fBenchmark(GetComponentID())
6b7742a2 73{
74 // see header file for class documentation
75 // or
76 // refer to README to build package
77 // or
78 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
a2a2a7ce 79
80 switch(fModeSwitch){
81 case kClusterFinderSPD:
82 fInputDataType = kAliHLTDataTypeDDLRaw | kAliHLTDataOriginITSSPD;
83 fOutputDataType = kAliHLTDataTypeClusters|kAliHLTDataOriginITSSPD;
84 break;
85 case kClusterFinderSDD:
86 fInputDataType = kAliHLTDataTypeDDLRaw | kAliHLTDataOriginITSSDD;
87 fOutputDataType = kAliHLTDataTypeClusters|kAliHLTDataOriginITSSDD;
88 break;
89 case kClusterFinderSSD:
90 fInputDataType = kAliHLTDataTypeDDLRaw | kAliHLTDataOriginITSSSD;
91 fOutputDataType = kAliHLTDataTypeClusters|kAliHLTDataOriginITSSSD;
92 break;
618f422f 93 case kClusterFinderDigits:
59b3dd4b 94 fInputDataType = kAliHLTDataTypeAliTreeD|kAliHLTDataOriginITS;
618f422f 95 fOutputDataType = kAliHLTDataTypeClusters|kAliHLTDataOriginITS;
96 break;
a2a2a7ce 97 default:
6b7742a2 98 HLTFatal("unknown cluster finder");
99 }
100}
101
3f61e9ce 102AliHLTITSClusterFinderComponent::~AliHLTITSClusterFinderComponent()
103{
6b7742a2 104 // see header file for class documentation
3f61e9ce 105 delete fRawReader;
106 delete fDettype;
107 delete fgeomInit;
108 delete fSPD;
a2a2a7ce 109 delete fSSD;
6b7742a2 110}
111
112// Public functions to implement AliHLTComponent's interface.
113// These functions are required for the registration process
114
115const char* AliHLTITSClusterFinderComponent::GetComponentID()
116{
117 // see header file for class documentation
118 switch(fModeSwitch){
119 case kClusterFinderSPD:
120 return "ITSClusterFinderSPD";
121 break;
122 case kClusterFinderSDD:
123 return "ITSClusterFinderSDD";
124 break;
125 case kClusterFinderSSD:
126 return "ITSClusterFinderSSD";
127 break;
618f422f 128 case kClusterFinderDigits:
129 return "ITSClusterFinderDigits";
130 break;
6b7742a2 131 }
132 return "";
133}
134
a2a2a7ce 135void AliHLTITSClusterFinderComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
136{
6b7742a2 137 // see header file for class documentation
138 list.clear();
a2a2a7ce 139 list.push_back( fInputDataType );
6b7742a2 140}
141
a2a2a7ce 142AliHLTComponentDataType AliHLTITSClusterFinderComponent::GetOutputDataType()
143{
6b7742a2 144 // see header file for class documentation
a2a2a7ce 145 return fOutputDataType;
6b7742a2 146}
147
148void AliHLTITSClusterFinderComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) {
149 // see header file for class documentation
150 constBase = 0;
151 inputMultiplier = 100;
152}
153
154AliHLTComponent* AliHLTITSClusterFinderComponent::Spawn() {
155 // see header file for class documentation
156 return new AliHLTITSClusterFinderComponent(fModeSwitch);
157}
158
1ea949fd 159Int_t AliHLTITSClusterFinderComponent::DoInit( int argc, const char** argv ) {
6b7742a2 160 // see header file for class documentation
57a4102f 161 fBenchmark.Reset();
162 fBenchmark.SetTimer(0,"total");
163 fBenchmark.SetTimer(1,"reco");
164
a2a2a7ce 165 /*
3f61e9ce 166 fStatTime = 0;
167 fStatTimeAll = 0;
168 fStatTimeC = 0;
169 fStatTimeAllC = 0;
170 fStatNEv = 0;
a2a2a7ce 171 */
2bd1335e 172
173 Int_t runNo = GetRunNo();
174 AliCDBStorage* store = AliCDBManager::Instance()->GetDefaultStorage();
175 if (!store) {
176 return NULL;
177 }
178
179 bool cdbOK = true;
180 //OCDB for SPD
181 if(store->GetLatestVersion("ITS/Calib/SPDNoisy", runNo)<0){
182 HLTError("SPDNoisy is not found in SPD/Calib");
183 cdbOK = false;
184 }
185 if(store->GetLatestVersion("ITS/Calib/SPDDead", runNo)<0){
186 HLTError("SPDDead is not found in SPD/Calib");
187 cdbOK = false;
188 }
189 if(store->GetLatestVersion("TRIGGER/SPD/PITConditions", runNo)<0){
190 HLTError("PITConditions is not found in TRIGGER/SPD");
191 cdbOK = false;
192 }
193
194 //OCDB for SDD
195 if(store->GetLatestVersion("ITS/Calib/CalibSDD", runNo)<0){
196 HLTError("CalibSDD is not found in ITS/Calib");
197 cdbOK = false;
198 }
199 if(store->GetLatestVersion("ITS/Calib/RespSDD", runNo)<0){
200 HLTError("RespSDD is not found in ITS/Calib");
201 cdbOK = false;
202 }
203 if(store->GetLatestVersion("ITS/Calib/DriftSpeedSDD", runNo)<0){
204 HLTError("DriftSpeedSDD is not found in ITS/Calib");
205 cdbOK = false;
206 }
207 if(store->GetLatestVersion("ITS/Calib/DDLMapSDD", runNo)<0){
208 HLTError("DDLMapSDD is not found in ITS/Calib");
209 cdbOK = false;
210 }
211 if(store->GetLatestVersion("ITS/Calib/MapsTimeSDD", runNo)<0){
212 HLTError("MapsTimeSDD is not found in ITS/Calib");
213 cdbOK = false;
214 }
215
216 //OCDB for SSD
217 if(store->GetLatestVersion("ITS/Calib/NoiseSSD", runNo)<0){
218 HLTError("NoiseSSD is not found in ITS/Calib");
219 cdbOK = false;
220 }
221 if(store->GetLatestVersion("ITS/Calib/GainSSD", runNo)<0){
222 HLTError("GainSSD is not found in ITS/Calib");
223 cdbOK = false;
224 }
225 if(store->GetLatestVersion("ITS/Calib/BadChannelsSSD", runNo)<0){
226 HLTError("BadChannelsSSD is not found in ITS/Calib");
227 cdbOK = false;
228 }
229
230 //General reconstruction
231 if(store->GetLatestVersion("GRP/CTP/Scalers", runNo)<0){
232 HLTError("Scalers is not found in GRP/CTP/");
233 cdbOK = false;
234 }
235 if(!cdbOK){return NULL;}
236
6b7742a2 237 if(fModeSwitch==kClusterFinderSPD) {
238 HLTDebug("using ClusterFinder for SPD");
d293cef8 239 //fNModules=AliITSgeomTGeo::GetNDetectors(1)*AliITSgeomTGeo::GetNLadders(1) + AliITSgeomTGeo::GetNDetectors(2)*AliITSgeomTGeo::GetNLadders(2);
6b7742a2 240 fId=AliHLTDAQ::DdlIDOffset("ITSSPD");
241 fNddl=AliHLTDAQ::NumberOfDdls("ITSSPD");
242 }
243 else if(fModeSwitch==kClusterFinderSDD) {
244 HLTDebug("using ClusterFinder for SDD");
d293cef8 245 //fNModules=AliITSgeomTGeo::GetNDetectors(3)*AliITSgeomTGeo::GetNLadders(3) + AliITSgeomTGeo::GetNDetectors(4)*AliITSgeomTGeo::GetNLadders(4);
6b7742a2 246 fId=AliHLTDAQ::DdlIDOffset("ITSSDD");
247 fNddl=AliHLTDAQ::NumberOfDdls("ITSSDD");
248 }
249 else if(fModeSwitch==kClusterFinderSSD) {
250 HLTDebug("using ClusterFinder for SSD");
d293cef8 251 //fNModules=AliITSgeomTGeo::GetNDetectors(5)*AliITSgeomTGeo::GetNLadders(5) + AliITSgeomTGeo::GetNDetectors(6)*AliITSgeomTGeo::GetNLadders(6);
6b7742a2 252 fId=AliHLTDAQ::DdlIDOffset("ITSSSD");
253 fNddl=AliHLTDAQ::NumberOfDdls("ITSSSD");
254 }
ec0e5f0f 255 else if(fModeSwitch==kClusterFinderDigits) {
618f422f 256 //tR = new TTree();
257 }
6b7742a2 258 else{
259 HLTFatal("No mode set for clusterfindercomponent");
260 }
261
060f29ad 262 //Removed the warning for loading default RecoParam in HLT
263 AliITSRecoParam *par = AliITSRecoParam::GetLowFluxParam();
264 AliITSReconstructor *rec = new AliITSReconstructor();
265 rec->SetRecoParam(par);
266
6b7742a2 267 AliCDBManager* man = AliCDBManager::Instance();
268 if (!man->IsDefaultStorageSet()){
269 HLTError("Default CDB storage has not been set !");
270 return -ENOENT;
271 }
272
273 if(AliGeomManager::GetGeometry()==NULL){
274 AliGeomManager::LoadGeometry();
275 }
3f61e9ce 276
277 //fgeomInit = new AliITSInitGeometry(kvSPD02,2);
6b7742a2 278 fgeomInit = new AliITSInitGeometry(kvPPRasymmFMD,2);
279 //fgeomInit->InitAliITSgeom(fgeom);
280 fgeom = fgeomInit->CreateAliITSgeom();
3f61e9ce 281
d293cef8 282 fNModules = fgeom->GetIndexMax();
283
284 fClusters = new TClonesArray*[fNModules];
285 for (Int_t iModule = 0; iModule < fNModules; iModule++) {
286 fClusters[iModule] = NULL;
287 }
288
6b7742a2 289 //set dettype
290 fDettype = new AliITSDetTypeRec();
3f61e9ce 291 fDettype->SetITSgeom(fgeom);
6b7742a2 292 fDettype->SetDefaults();
86e746ed 293 fDettype->SetDefaultClusterFindersV2(kTRUE);
294
6b7742a2 295 if ( fRawReader )
296 return -EINPROGRESS;
297
298 fRawReader = new AliRawReaderMemory();
3f61e9ce 299 fSPD = new AliHLTITSClusterFinderSPD( fDettype );
a2a2a7ce 300 fSSD = new AliHLTITSClusterFinderSSD( fDettype, fRawReader );
6b7742a2 301
1ea949fd 302 TString arguments = "";
303 for ( int i = 0; i < argc; i++ ) {
304 if ( !arguments.IsNull() ) arguments += " ";
305 arguments += argv[i];
306 }
307
618f422f 308 tD = NULL;
309 tR = NULL;
310
1ea949fd 311 return Configure( arguments.Data() );
6b7742a2 312}
313
314Int_t AliHLTITSClusterFinderComponent::DoDeinit() {
315 // see header file for class documentation
316
317 if ( fRawReader )
318 delete fRawReader;
319 fRawReader = NULL;
320
6b7742a2 321 if ( fDettype )
322 delete fDettype;
323 fDettype = NULL;
324
325 if ( fgeomInit )
326 delete fgeomInit;
327 fgeomInit = NULL;
3f61e9ce 328
329 delete fSPD;
330 fSPD = 0;
6b7742a2 331
a2a2a7ce 332 delete fSSD;
333 fSSD = 0;
334
d293cef8 335 for (Int_t iModule = 0; iModule < fNModules; iModule++) {
336 if(fClusters[iModule] != NULL){
337 fClusters[iModule]->Delete();
338 delete fClusters[iModule];
339 }
340 fClusters[iModule] = NULL;
341 }
342
a2a2a7ce 343 fUseOfflineFinder = 0;
344
6b7742a2 345 return 0;
346}
347
a2a2a7ce 348int AliHLTITSClusterFinderComponent::DoEvent
349(
350 const AliHLTComponentEventData& evtData,
5ae74c42 351 const AliHLTComponentBlockData* /*blocks*/,
a2a2a7ce 352 AliHLTComponentTriggerData& /*trigData*/,
353 AliHLTUInt8_t* outputPtr,
354 AliHLTUInt32_t& size,
355 vector<AliHLTComponentBlockData>& outputBlocks )
356{
357 // see header file for class documentation
358
359 AliHLTUInt32_t maxBufferSize = size;
360 size = 0; // output size
6b7742a2 361
a2a2a7ce 362 if (!IsDataEvent()) return 0;
363
6b7742a2 364 if ( evtData.fBlockCnt<=0 )
a2a2a7ce 365 {
366 HLTDebug("no blocks in event" );
367 return 0;
368 }
57a4102f 369
370 fBenchmark.StartNewEvent();
371 fBenchmark.Start(0);
372 for( const AliHLTComponentBlockData *i= GetFirstInputBlock(fInputDataType); i!=NULL; i=GetNextInputBlock() ){
373 fBenchmark.AddInput(i->fSize);
374 }
375
a2a2a7ce 376 Int_t ret = 0;
57a4102f 377
618f422f 378 if(fModeSwitch==kClusterFinderDigits) {
57a4102f 379
618f422f 380 for ( const TObject *iter = GetFirstInputObject(fInputDataType); iter != NULL; iter = GetNextInputObject() ) {
381 tD = dynamic_cast<TTree*>(const_cast<TObject*>( iter ) );
382 if(!tD){
383 HLTFatal("No Digit Tree found");
384 return -1;
385 }
386 tR = new TTree();
387 fDettype->SetTreeAddressD(tD);
388 fDettype->MakeBranch(tR,"R");
389 fDettype->SetTreeAddressR(tR);
390 Option_t *opt="All";
57a4102f 391 fBenchmark.Start(1);
618f422f 392 fDettype->DigitsToRecPoints(tD,tR,0,opt,kTRUE);
57a4102f 393 fBenchmark.Stop(1);
618f422f 394 TClonesArray * fRecPoints;
395 tR->SetBranchAddress("ITSRecPoints",&fRecPoints);
396 for(Int_t treeEntry=0;treeEntry<tR->GetEntries();treeEntry++){
397 tR->GetEntry(treeEntry);
398 for(Int_t tCloneEntry=0;tCloneEntry<fRecPoints->GetEntries();tCloneEntry++){
399 AliITSRecPoint *recpoint=(AliITSRecPoint*)fRecPoints->At(tCloneEntry);
400 fclusters.push_back(*recpoint);
401 }
402 }
403
404 if(tR){
405 tR->Delete();
406 }
407 UInt_t nClusters=fclusters.size();
408
409 UInt_t bufferSize = nClusters * sizeof(AliHLTITSSpacePointData) + sizeof(AliHLTITSClusterData);
410 if( size + bufferSize > maxBufferSize ){
411 HLTWarning( "Output buffer size exceed (buffer size %d, current size %d)", maxBufferSize, size+bufferSize);
412 ret = -ENOSPC;
413 break;
414 }
415 if( nClusters>0 ){
57a4102f 416 fBenchmark.Start(1);
618f422f 417 RecPointToSpacePoint(outputPtr,size);
57a4102f 418 fBenchmark.Stop(1);
618f422f 419 AliHLTComponentBlockData bd;
420 FillBlockData( bd );
421 bd.fOffset = size;
422 bd.fSize = bufferSize;
423 bd.fSpecification = 0x00000000;
424 bd.fDataType = GetOutputDataType();
425 outputBlocks.push_back( bd );
426 size += bufferSize;
57a4102f 427 fBenchmark.AddOutput(bd.fSize);
618f422f 428 fclusters.clear();
429 }
430 }
431 }
432 else{
433
434 // -- Loop over blocks
435 for( const AliHLTComponentBlockData* iter = GetFirstInputBlock(fInputDataType); iter != NULL; iter = GetNextInputBlock() ) {
436
437 // -- Debug output of datatype --
438 HLTDebug("Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s",
6b7742a2 439 evtData.fEventID, evtData.fEventID,
440 DataType2Text(iter->fDataType).c_str(),
df7307a2 441 DataType2Text(fInputDataType).c_str());
618f422f 442
443 // -- Check for the correct data type
444 if ( iter->fDataType != (fInputDataType) )
445 continue;
446
447 // -- Get equipment ID out of specification
448 AliHLTUInt32_t spec = iter->fSpecification;
449
450 Int_t id = fId;
451 for ( Int_t ii = 0; ii < fNddl ; ii++ ) { //number of ddl's
452 if ( spec & 0x00000001 ) {
453 id += ii;
454 break;
455 }
456 spec = spec >> 1 ;
6b7742a2 457 }
618f422f 458
459 // -- Set equipment ID to the raw reader
460
544538fb 461 if(!fRawReader){
462 HLTWarning("The fRawReader pointer is NULL");
463 continue;
464 }
465
618f422f 466 if(!fRawReader->AddBuffer((UChar_t*) iter->fPtr, iter->fSize, id)){
467 HLTWarning("Could not add buffer");
468 }
57a4102f 469
470 fBenchmark.Start(1);
471
618f422f 472 if(fModeSwitch==kClusterFinderSPD && !fUseOfflineFinder){ fSPD->RawdataToClusters( fRawReader, fclusters ); }
473 else if(fModeSwitch==kClusterFinderSSD && !fUseOfflineFinder){ fSSD->RawdataToClusters( fclusters ); }
474 else{
475 if(fModeSwitch==kClusterFinderSPD && fUseOfflineFinder) {fDettype->DigitsToRecPoints(fRawReader,fClusters,"SPD");}
476 if(fModeSwitch==kClusterFinderSSD && fUseOfflineFinder) {fDettype->DigitsToRecPoints(fRawReader,fClusters,"SSD");}
477 if(fModeSwitch==kClusterFinderSDD) {fDettype->DigitsToRecPoints(fRawReader,fClusters,"SDD");}
478 for(int i=0;i<fNModules;i++){
479 if(fClusters[i] != NULL){
480 for(int j=0;j<fClusters[i]->GetEntriesFast();j++){
481 AliITSRecPoint *recpoint = (AliITSRecPoint*) (fClusters[i]->At(j));
482 fclusters.push_back(*recpoint);
483 }
484 fClusters[i]->Delete();
485 delete fClusters[i];
3f61e9ce 486 }
618f422f 487 fClusters[i] = NULL;
488 }
a2a2a7ce 489 }
57a4102f 490 fBenchmark.Stop(1);
618f422f 491
492 fRawReader->ClearBuffers();
493
494 UInt_t nClusters=fclusters.size();
495
496 UInt_t bufferSize = nClusters * sizeof(AliHLTITSSpacePointData) + sizeof(AliHLTITSClusterData);
497 if( size + bufferSize > maxBufferSize ){
498 HLTWarning( "Output buffer size exceed (buffer size %d, current size %d)", maxBufferSize, size+bufferSize);
499 ret = -ENOSPC;
500 break;
501 }
502 if( nClusters>0 ){
503
504 RecPointToSpacePoint(outputPtr,size);
505
506 AliHLTComponentBlockData bd;
507 FillBlockData( bd );
508 bd.fOffset = size;
509 bd.fSize = bufferSize;
510 bd.fSpecification = iter->fSpecification;
511 bd.fDataType = GetOutputDataType();
512 outputBlocks.push_back( bd );
513 size += bufferSize;
57a4102f 514 fBenchmark.AddOutput(bd.fSize);
618f422f 515 fclusters.clear();
516 }
517
518 } // input blocks
519 }
3f61e9ce 520
57a4102f 521 fBenchmark.Stop(0);
522 HLTInfo(fBenchmark.GetStatistics());
a2a2a7ce 523 return ret;
6b7742a2 524}
525
526int AliHLTITSClusterFinderComponent::Configure(const char* arguments)
527{
528
529 int iResult=0;
530
531 if (!arguments) return iResult;
532
533 TString allArgs=arguments;
534 TString argument;
535
536 TObjArray* pTokens=allArgs.Tokenize(" ");
537
538 if (pTokens) {
539 for (int i=0; i<pTokens->GetEntries() && iResult>=0; i++) {
540 argument=((TObjString*)pTokens->At(i))->GetString();
a2a2a7ce 541 if (argument.IsNull()) continue;
542 if (argument.CompareTo("-use-offline-finder")==0) {
543 fUseOfflineFinder = 1;
544 HLTInfo("Off-line ClusterFinder will be used");
6b7742a2 545 continue;
546 }
a2a2a7ce 547 /*
6b7742a2 548 else if (argument.CompareTo("")==0) {
549 HLTInfo("");
550 continue;
551 }
552 */
553 else {
554 HLTError("unknown argument %s", argument.Data());
555 iResult=-EINVAL;
556 break;
557 }
558 }
559 delete pTokens;
560 }
561
562 return iResult;
563}
564
565int AliHLTITSClusterFinderComponent::Reconfigure(const char* cdbEntry, const char* chainId)
566{
567 // see header file for class documentation
568 int iResult=0;
569
570 const char* path="HLT/ConfigITS/ClusterFinderComponent";
571 const char* defaultNotify="";
572 if (cdbEntry) {
573 path=cdbEntry;
574 defaultNotify=" (default)";
575 }
576 if (path) {
577 HLTInfo("reconfigure from entry %s%s, chain id %s", path, defaultNotify,(chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
578 AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path);
579 if (pEntry) {
580 TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
581 if (pString) {
582 HLTInfo("received configuration object string: \'%s\'", pString->GetString().Data());
583 iResult=Configure(pString->GetString().Data());
584 } else {
585 HLTError("configuration object \"%s\" has wrong type, required TObjString", path);
586 }
587 } else {
588 HLTError("can not fetch object \"%s\" from CDB", path);
589 }
590 }
591
592 return iResult;
593}
618f422f 594void AliHLTITSClusterFinderComponent::RecPointToSpacePoint(AliHLTUInt8_t* outputPtr,AliHLTUInt32_t& size){
595 AliHLTITSClusterData *outputClusters = reinterpret_cast<AliHLTITSClusterData*>(outputPtr + size);
596 outputClusters->fSpacePointCnt=fclusters.size();
597 int clustIdx=0;
565c81f8 598 for(UInt_t i=0;i<fclusters.size();i++){
618f422f 599 AliITSRecPoint *recpoint = (AliITSRecPoint*) &(fclusters[i]);
600 outputClusters->fSpacePoints[clustIdx].fY=recpoint->GetY();
601 outputClusters->fSpacePoints[clustIdx].fZ=recpoint->GetZ();
602 outputClusters->fSpacePoints[clustIdx].fSigmaY2=recpoint->GetSigmaY2();
603 outputClusters->fSpacePoints[clustIdx].fSigmaZ2=recpoint->GetSigmaZ2();
604 outputClusters->fSpacePoints[clustIdx].fSigmaYZ=recpoint->GetSigmaYZ();
605 outputClusters->fSpacePoints[clustIdx].fQ=recpoint->GetQ();
606 outputClusters->fSpacePoints[clustIdx].fNy=recpoint->GetNy();
607 outputClusters->fSpacePoints[clustIdx].fNz=recpoint->GetNz();
608 outputClusters->fSpacePoints[clustIdx].fLayer=recpoint->GetLayer();
609 outputClusters->fSpacePoints[clustIdx].fIndex=recpoint->GetDetectorIndex() | recpoint->GetPindex() | recpoint->GetNindex();
610 outputClusters->fSpacePoints[clustIdx].fTracks[0]=recpoint->GetLabel(0);
611 outputClusters->fSpacePoints[clustIdx].fTracks[1]=recpoint->GetLabel(1);
612 outputClusters->fSpacePoints[clustIdx].fTracks[2]=recpoint->GetLabel(2);
613 clustIdx++;
614 }
615}