-AliHLTTPCKryptonClusterFinder::~AliHLTTPCKryptonClusterFinder()
-{
- //destructor
- if(fVectorInitialized){
- DeInitializePadArray();
- }
- if(fNumberOfPadsInRow){
- delete [] fNumberOfPadsInRow;
- fNumberOfPadsInRow=NULL;
- }
-}
-
-void AliHLTTPCKryptonClusterFinder::InitializePadArray(){
- // see header file for class documentation
-
- if(fCurrentPatch>5||fCurrentPatch<0){
- HLTFatal("Patch is not set");
- return;
- }
-
- HLTDebug("Patch number=%d",fCurrentPatch);
-
- fFirstRow = AliHLTTPCTransform::GetFirstRow(fCurrentPatch);
- fLastRow = AliHLTTPCTransform::GetLastRow(fCurrentPatch);
-
- fNumberOfRows=fLastRow-fFirstRow+1;
- fNumberOfPadsInRow= new UInt_t[fNumberOfRows];
-
- memset( fNumberOfPadsInRow, 0, sizeof(Int_t)*(fNumberOfRows));
-
- for(UInt_t i=0;i<fNumberOfRows;i++){
- fNumberOfPadsInRow[i]=AliHLTTPCTransform::GetNPads(i+fFirstRow);
- AliHLTTPCPadVector tmpRow;
- for(UInt_t j=0;j<fNumberOfPadsInRow[i];j++){
- AliHLTTPCPad *tmpPad = new AliHLTTPCPad(2);
- tmpPad->SetID(i,j);
- tmpRow.push_back(tmpPad);
- }
- fRowPadVector.push_back(tmpRow);
- }
- fVectorInitialized=kTRUE;
-}
-
-Int_t AliHLTTPCKryptonClusterFinder::DeInitializePadArray()
-{
- // see header file for class documentation
- for(UInt_t i=0;i<fNumberOfRows;i++){
- for(UInt_t j=0;j<fNumberOfPadsInRow[i];j++){
- delete fRowPadVector[i][j];
- fRowPadVector[i][j]=NULL;
- }
- fRowPadVector[i].clear();
- }
- fRowPadVector.clear();
- return 1;
-}
-
-void AliHLTTPCKryptonClusterFinder::InitSlice(Int_t slice,Int_t patch,Int_t firstrow, Int_t lastrow,Int_t nmaxpoints)
-{
- //init slice
- fNClusters = 0;
- fMaxNClusters = nmaxpoints;
- fCurrentSlice = slice;
- fCurrentPatch = patch;
- fFirstRow = firstrow;
- fLastRow = lastrow;
-}
-