- if(!HasData()) //if the array has no data
- {
- if(fDictionary)
- {
- dimexp = -fDictionary[0];
- delete [] fDictionary;
- fDictionary=0;
- fDictionary = new Int_t[dimexp];
- fNDdim = dimexp;
- // Re-initialize the array
- for(Int_t i=0; i<dimexp; i++)
- fDictionary[i] = -1;
- }
+ if(fNDdim==fNrow*fNumberOfChannels*fNtime)
+ return;
+
+ if(fDictionary&&fNDdim==1)
+ {
+ dimexp = -fDictionary[0];
+ delete [] fDictionary;
+ fDictionary=0;
+ fDictionary = new Int_t[dimexp];
+ fNDdim = dimexp;
+ // Re-initialize the array
+ memset(fDictionary,-1,sizeof(Int_t)*dimexp);
+ fFlag=kTRUE; // Not expand again