#include "AliTRDarrayDictionary.h"
#include "AliTRDfeeParam.h"
+#include "AliLog.h"
ClassImp(AliTRDarrayDictionary)
,fNDdim(0)
,fDictionary(0)
,fFlag(kFALSE)
-
{
//
// AliTRDarrayDictionary contructor
delete [] longArr;
longArr=0;
}
- fFlag=kTRUE; // flag to signal compression
}
// Expand the array
//
+ if(fNDdim==0)
+ {
+ AliError("Called expand with dimension zero");
+ return;
+ }
+
+
Int_t dimexp=0;
- if(!IsCompressed())
+
+ if(WasExpandCalled())
return;
if(fDictionary&&fNDdim==1)
fNDdim = dimexp;
// Re-initialize the array
memset(fDictionary,-1,sizeof(Int_t)*dimexp);
+ fFlag=kTRUE; // Not expand again
return;
}
{
delete [] longArr;
}
-
- fFlag=kFALSE; // flag to signal that is not compressed anymore
+ fFlag=kTRUE; // Not expand again
}
//________________________________________________________________________________
Int_t GetData(Int_t nrow, Int_t ncol, Int_t ntime) const;\r
void SetData(Int_t nrow, Int_t ncol, Int_t ntime, Int_t value);\r
static void CreateLut();\r
- Bool_t IsCompressed() const {return fFlag;}; \r
+ Bool_t WasExpandCalled() const {return fFlag;};\r
\r
protected:\r
\r
Int_t fNtime; //Number of time bins\r
Int_t fNDdim; //Dimension of the Dictionary array\r
Int_t* fDictionary; //[fNDdim] //Pointer to integers array\r
- Bool_t fFlag; //Flag in case of compressed array\r
+ Bool_t fFlag; // Has Expand() being called before?\r
static Short_t *fgLutPadNumbering; // [fNcol] Look Up Table\r
\r
- ClassDef(AliTRDarrayDictionary,5) //Dictionary container class\r
+ ClassDef(AliTRDarrayDictionary,6) //Dictionary container class\r
\r
};\r
#endif\r