32 #include <Riostream.h>
97 if (
this == &digits)
return (*
this);
130 ::Error(where,
"row %d col %d out of bounds (size: %d x %d, this: 0x%08lx)",
159 Error(
"Allocate",
"no of rows has to be positive");
163 Error(
"Allocate",
"no of columns has to be positive");
215 for ( cont=
First(); cont==kTRUE;cont=
Next()) {
240 Error(
"ExpandBuffer",
"buffer doesn't exist");
256 Error(
"CompressBuffer",
"buffer doesn't exist");
263 Error(
"CompressBuffer",
"buffer doesn't exist");
294 Int_t idim =his->GetNbinsX();
295 Int_t jdim =his->GetNbinsY();
296 if ( (idim<1)|| (jdim<1)) {
302 for (Int_t i = 0; i<idim;i++)
303 for (Int_t j = 0; j<jdim;j++)
305 Int_t index = his->GetBin(i+1,j+1);
315 snprintf(ch,30,
"Segment_%d ",
GetID());
322 for (Int_t i = 0; i<
fNrows;i++)
323 for (Int_t j = 0; j<
fNcols;j++)
338 if (h2f==0)
return 0;
339 if (option!=0) h2f->Draw(option);
350 Short_t * buf =
new Short_t[
fNelems];
351 memset(buf,0,
fNelems*
sizeof(Short_t));
361 buf[(*fIndex)[col]+row]=
fElements->At(i);
389 for (Int_t col = 0; col<
fNcols; col++){
390 index[col]=icurrent+1;
392 for (Int_t row = 0; row<
fNrows;row++){
401 if (icurrent>=buf.fN) buf.Set(icurrent*2);
402 buf[icurrent]= -izero;
406 if (icurrent>=buf.fN) buf.Set(icurrent*2);
408 buf[icurrent] = *cbuff;
414 if (icurrent>=buf.fN) buf.Set(icurrent*2);
415 buf[icurrent]= -izero;
437 if (i ==
fNelems)
return kFALSE;
503 if ( (i>=0) && (i<
fNelems) )
return kTRUE;
517 n2 =
fIndex->At(column+1);
520 for (i=
fIndex->At(column); ( (i<n2) && (irow<row) );i++){
525 if ( irow == row )
return fElements->At(i);
virtual void ExpandBuffer()
Int_t fCurrentRow
! current row iteration
Int_t fNelems
total number of elements
Bool_t OutOfBoundsError(const char *where, Int_t row, Int_t column)
Int_t GetOverTh(Float_t threshold, Float_t x1=-1, Float_t x2=-1, Float_t y1=-1, Float_t y2=-1)
Int_t fCurrentIndex
! current index in field
Int_t fCurrentCol
! current column iteration
Short_t GetDigitFast(Int_t row, Int_t column)
virtual Short_t GetDigit(Int_t row, Int_t column)
virtual void Allocate(Int_t rows, Int_t columns)
virtual void Invalidate()
void AcceptHisto(AliH2F *his)
void SetDigitFast(Short_t value, Int_t row, Int_t column)
Int_t fThreshold
treshold for zero suppresion
TArrayS * fElements
buffer of 2 bytes integers for digits
Int_t fBufType
type of the buffer - define compression algorithm
AliH2F * GetSubrange2d(Float_t xmin, Float_t xmax, Float_t ymin, Float_t ymax)
Int_t fNrows
number of rows in Segment
Int_t fNcols
number of collumns in Segment
AliDigits & operator=(const AliDigits &digits)
Short_t GetDigit1(Int_t row, Int_t column)
TArrayI * fIndex
index position of column
virtual void CompresBuffer(Int_t bufferType, Int_t threshold)
AliH2F * DrawDigits(const char *option=0, Float_t x1=-1, Float_t x2=-1, Float_t y1=-1, Float_t y2=-1)