X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=HLT%2FITS%2FAliHLTITSClusterFinderSPDComponent.cxx;h=798a22de3812f9354e5bc0af0083a3c876e622b3;hp=4e550f7f50c2b1948f5b2abcbac33e97d23e0784;hb=c0b68f8e06d6f22649570d756ba9d0225019781d;hpb=0a7afbf07c154d2712a71706e932aa518b5899f8 diff --git a/HLT/ITS/AliHLTITSClusterFinderSPDComponent.cxx b/HLT/ITS/AliHLTITSClusterFinderSPDComponent.cxx index 4e550f7f50c..798a22de381 100644 --- a/HLT/ITS/AliHLTITSClusterFinderSPDComponent.cxx +++ b/HLT/ITS/AliHLTITSClusterFinderSPDComponent.cxx @@ -32,6 +32,8 @@ using namespace std; #include "AliHLTDataTypes.h" #include "AliITSgeomTGeo.h" #include "AliITSRecPoint.h" +#include "AliHLTITSSpacePointData.h" +#include "AliHLTITSClusterDataFormat.h" #include #include @@ -88,14 +90,14 @@ void AliHLTITSClusterFinderSPDComponent::GetInputDataTypes( vectorRawdataToClusters(fRawReader,fClusters); - - /* - Float_t xyz[3]; - filebuf fb; - fb.open ("test.txt",ios::out | ios::app); - ostream os(&fb); + + UInt_t nClusters=0; for(int i=0;iGetEntries();j++){ - AliITSRecPoint *recpoint = (AliITSRecPoint*) fClusters[i]->At(j); - recpoint->GetGlobalXYZ(xyz); - os<GetEntries(); } } - */ - - PushBack(*fClusters,kAliHLTDataTypeTObjArray|kAliHLTDataOriginITSSPD,iter->fSpecification); + + UInt_t bufferSize = nClusters * sizeof(AliHLTITSSpacePointData) + sizeof(AliHLTITSClusterData); + AliHLTUInt8_t *buffer = new AliHLTUInt8_t[bufferSize]; + AliHLTITSClusterData *outputClusters = reinterpret_cast(buffer); + outputClusters->fSpacePointCnt=nClusters; - /* - TClonesArray *clustersOut = new TClonesArray(); - + int clustIdx=0; for(int i=0;iGetEntriesFast();j++) { - clustersOut->Add(&fClusters[i][j]); - //PushBack(fClusters[i],kAliHLTDataTypeTObjArray|kAliHLTDataOriginITSSPD,iter->fSpecification); + for(int j=0;jGetEntries();j++){ + AliITSRecPoint *recpoint = (AliITSRecPoint*) fClusters[i]->At(j); + outputClusters->fSpacePoints[clustIdx].fY=recpoint->GetY(); + outputClusters->fSpacePoints[clustIdx].fZ=recpoint->GetZ(); + outputClusters->fSpacePoints[clustIdx].fSigmaY2=recpoint->GetSigmaY2(); + outputClusters->fSpacePoints[clustIdx].fSigmaZ2=recpoint->GetSigmaZ2(); + outputClusters->fSpacePoints[clustIdx].fSigmaYZ=recpoint->GetSigmaYZ(); + outputClusters->fSpacePoints[clustIdx].fQ=recpoint->GetQ(); + outputClusters->fSpacePoints[clustIdx].fNy=recpoint->GetNy(); + outputClusters->fSpacePoints[clustIdx].fNz=recpoint->GetNz(); + outputClusters->fSpacePoints[clustIdx].fLayer=recpoint->GetLayer(); + outputClusters->fSpacePoints[clustIdx].fIndex=recpoint->GetDetectorIndex();// | recpoint->GetPindex() | recpoint->GetNindex(); + outputClusters->fSpacePoints[clustIdx].fTracks[0]=recpoint->GetLabel(0); + outputClusters->fSpacePoints[clustIdx].fTracks[1]=recpoint->GetLabel(1); + outputClusters->fSpacePoints[clustIdx].fTracks[2]=recpoint->GetLabel(2); + + clustIdx++; } } } - - PushBack(clustersOut,kAliHLTDataTypeTObjArray|kAliHLTDataOriginITSSPD,iter->fSpecification); - - Float_t xyz2[3]; - filebuf fb2; - fb2.open ("test2.txt",ios::out | ios::app); - ostream os2(&fb2); - for(int j=0;jGetEntriesFast();j++){ - AliITSRecPoint *recpoint = (AliITSRecPoint*) clustersOut->At(j); - recpoint->GetGlobalXYZ(xyz2); - os2<Clear(); - delete clustersOut; - */ + PushBack(buffer,bufferSize,kAliHLTDataTypeClusters|kAliHLTDataOriginITSSSD,iter->fSpecification); + for (Int_t iModule = 0; iModule < fNModules; iModule++) { if(fClusters[iModule]){delete fClusters[iModule];} fClusters[iModule] = NULL; @@ -274,9 +269,6 @@ Int_t AliHLTITSClusterFinderSPDComponent::DoEvent( const AliHLTComponentEventDat } // for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ ) { - //fClusterFinder->RawdataToClusters(fRawReader,&fClusters); - - //PushBack( (TObject**) fClusters,kAliHLTDataTypeTObjArray,0x00000000); - return 0; } +