* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-
-$Log$
-Revision 1.4 2000/10/05 16:01:49 kowal2
-Corrected for memory leaks.
-
-Revision 1.3 2000/06/30 12:07:49 kowal2
-Updated from the TPC-PreRelease branch
-
-Revision 1.2.4.3 2000/06/26 07:39:42 kowal2
-Changes to obey the coding rules
-
-Revision 1.2.4.2 2000/06/25 08:38:41 kowal2
-Splitted from AliTPCtracking
-
-Revision 1.2.4.1 2000/06/14 16:45:13 kowal2
-Improved algorithms. Compiler warnings removed.
-
-Revision 1.2 2000/04/17 09:37:33 kowal2
-removed obsolete AliTPCDigitsDisplay.C
-
-Revision 1.1.4.2 2000/04/10 11:37:42 kowal2
-
-Digits handling in a new data structure
-
-*/
+/* $Id$ */
/*MI change -- for Rule checker
-- added copy constructor and assignmet operator
#include "TClass.h"
-#include <iostream.h>
+#include <Riostream.h>
#include "TError.h"
#include "AliSegmentID.h"
#include "AliH2F.h"
Invalidate();
}
-AliDigits::AliDigits(const AliDigits& digits)
+AliDigits::AliDigits(const AliDigits& digits):
+ AliSegmentID(digits)
{
//
//copy constructor
Int_t i,k;
fNelems = fNrows*fNcols;
Short_t * buf = new Short_t[fNelems];
+ memset(buf,0,fNelems*sizeof(Short_t)); //MI change - 4.12.2000
fIndex->Set(fNcols);
for (i =0,k=0 ;i<fNcols;i++,k+=fNrows) (*fIndex)[i]=k;
Int_t col=0;
}
fElements->Adopt(fNelems,buf);
}
+
void AliDigits::CompresBuffer1()
{
//
index.Set(fNcols);
Int_t icurrent=-1;
Int_t izero;
+ Short_t * cbuff = fElements->GetArray(); //MI change
+
for (Int_t col = 0; col<fNcols; col++){
index[col]=icurrent+1;//set collumn pointer
izero = 0; //reset zer counter at the begining of the column
for (Int_t row = 0; row< fNrows;row++){
//if under threshold
- if (GetDigitFast(row,col)<=fThreshold) izero++;
+ //if (GetDigitFast(row,col)<=fThreshold) izero++;
+ if (*cbuff<=fThreshold) izero++;
+
else{
if (izero>0) {
//if we have currently izero count under threshold
} //end of reseting izero
icurrent++;
if (icurrent>=buf.fN) buf.Expand(icurrent*2);
- buf[icurrent] = GetDigitFast(row,col);
- }//if signal bigger then threshold
+ //buf[icurrent] = GetDigitFast(row,col);
+ buf[icurrent] = *cbuff;
+ }//if signal bigger then threshold
+ cbuff++;
} //end of loop over rows
if (izero>0) {
icurrent++;
fCurrentCol = -1;
fCurrentIndex = -1;
Int_t i;
- for (i=0; (( i<fNelems) && (fElements->At(i)<=fThreshold));i++)
+ for (i=0; (( i<fNelems) && (fElements->At(i)<=fThreshold));i++); //MI1211
if (i == fNelems) return kFALSE;
fCurrentCol =i/fNrows;
fCurrentRow =i%fNrows;
if (fElements->At(i)>fThreshold) break;
}
fCurrentIndex = i;
- if (fCurrentIndex>=0) return kTRUE;
+ if (fCurrentIndex>=0&&i<fNelems) return kTRUE;
fCurrentRow =-1;
fCurrentCol =-1;
return kFALSE;