]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliDigits.cxx
Add cell rejection based on energy in sorrounding cells, 4 cells in corners with...
[u/mrichter/AliRoot.git] / TPC / AliDigits.cxx
index 3b8a655a756e456c26aefe7b2bebc6ac760b626a..710097e7f5b615db2e99531d6783c0cda07192f8 100644 (file)
@@ -126,8 +126,8 @@ AliDigits::~AliDigits()
 Bool_t AliDigits::OutOfBoundsError(const char *where, Int_t row, Int_t column) 
 {
    // Generate an out-of-bounds error. Always returns false.
-   ::Error(where, "row %d  col %d out of bounds (size: %d x %d, this: 0x%08x)", 
-          row, column, fNrows, fNcols, this);
+   ::Error(where, "row %d  col %d out of bounds (size: %d x %d, this: 0x%08lx)", 
+          row, column, fNrows, fNcols, (ULong_t) this);
    return kFALSE;
 }
 
@@ -176,9 +176,11 @@ void AliDigits::Allocate(Int_t rows, Int_t columns)
 Int_t AliDigits::GetSize()
 {
   //
-  //return size of object
+  //return size of object as represented in the memory
   //
-  Int_t size = sizeof(this);
+  //  Int_t size = sizeof(this);
+  Int_t size = 0;   // COVERITY consider the previous statment as bug 
+                    // 
   if (fIndex!=0) size+= sizeof(fIndex)+fIndex->GetSize()*sizeof(Int_t);
   if (fElements!=0) size+= sizeof(fElements)+fElements->GetSize()*sizeof(Short_t);
   return size;
@@ -309,7 +311,7 @@ AliH2F *  AliDigits::GenerHisto()
   //
   //make digits histo 
   char ch[30];
-  sprintf(ch,"Segment_%d ",GetID());
+  snprintf(ch,30, "Segment_%d ",GetID());
   if ( (fNrows<1)|| (fNcols<1)) {
     return 0;
   }
@@ -365,6 +367,7 @@ void AliDigits::ExpandBuffer1()
     }else 
       if (row>fNrows){
        Invalidate();
+       delete [] buf;
        return;
       }      
   }