]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
bugfixes as suggested by Sergey (#50845 and #50828), still to be
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 26 May 2009 14:33:30 +0000 (14:33 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 26 May 2009 14:33:30 +0000 (14:33 +0000)
confirmed by Kenneth
- proper cleanup of internal status variables of the DigitReaderUnpacked
  in order to find clusters not only for the first event
- cleanup of MC data at the beginning of event processing in the
  ClusterFinder

HLT/TPCLib/AliHLTTPCClusterFinder.cxx
HLT/TPCLib/AliHLTTPCDigitReaderUnpacked.cxx

index e171e52cea8f8bd05defe5e055636d81acd14e18..934cea9fd0868ef4f5f7b452186a821eb4bbaa5f 100644 (file)
@@ -109,6 +109,11 @@ void AliHLTTPCClusterFinder::InitSlice(Int_t slice,Int_t patch,Int_t nmaxpoints)
   fCurrentPatch = patch;
   fFirstRow=AliHLTTPCTransform::GetFirstRow(patch);
   fLastRow=AliHLTTPCTransform::GetLastRow(patch);
+
+  fClusters.clear();
+  fClustersMCInfo.clear();
+  fMCDigits.clear();
+  fClusterMCVector.clear();   
 }
 
 void AliHLTTPCClusterFinder::InitializePadArray(){
@@ -535,7 +540,7 @@ void AliHLTTPCClusterFinder::FindClusters(){
          fClusters.push_back(*tmpCandidate);
          if(fDoMC){
            //sort the vector (large->small) according to weight and remove elements above 2 (keep 0 1 and 2) 
-           //sort(fClusterMCVector,fClusterMCVector.size(), MCWeight::CompareWeights );
+           sort(fClusterMCVector.begin(),fClusterMCVector.end(), MCWeight::CompareWeights );
            ClusterMCInfo tmpClusterMCInfo;
 
            MCWeight zeroMC;
index 810a66b2323f885ec36476ccd78a2e70826c5741..7a7875e3a70aa45c5db81a39f2bb030961b61106 100644 (file)
@@ -73,6 +73,10 @@ AliHLTTPCDigitReaderUnpacked::AliHLTTPCDigitReaderUnpacked()
 
 AliHLTTPCDigitReaderUnpacked::~AliHLTTPCDigitReaderUnpacked(){
   // see header file for class documentation
+  if(fMapping){
+    delete fMapping;
+  }
+  fMapping=NULL;
 }
 
 int AliHLTTPCDigitReaderUnpacked::InitBlock(void* ptr,unsigned long size, Int_t patch, Int_t slice){
@@ -83,6 +87,15 @@ int AliHLTTPCDigitReaderUnpacked::InitBlock(void* ptr,unsigned long size, Int_t
   fSize = size;
 
   fPatch=patch;
+  fEndOfDataReached=kFALSE;
+  fEndOfChannelReached=kFALSE;
+  fPrevTime=0;
+  fEndTimeBinOfBunch=0;
+  fPrevSignal=0;
+  fPrevPad=0;
+  fPrevRow=-1;
+  fNextChannelIsAlreadyConfirmed=kFALSE;
+  fDigitsVector.clear();
 
   tmpptr = reinterpret_cast<AliHLTTPCUnpackedRawData*>(fPtr);
   fDigitRowData = (AliHLTTPCDigitRowData*) tmpptr->fDigits;