- Float_t etCell[60000]; //! Cell Energy
- Float_t etaCell[60000]; //! Cell eta
- Float_t phiCell[60000]; //! Cell phi
- Int_t flagCell[60000]; //! Cell flag
+ const Int_t nBinsMax = 120000; // we use a fixed array not to fragment memory
+
+ const Int_t nBinEta = header->GetLegoNbinEta();
+ const Int_t nBinPhi = header->GetLegoNbinPhi();
+ if((nBinPhi*nBinEta)>nBinsMax){
+ AliError("Too many bins of the ETA-PHI histogram");
+ }
+
+ Float_t etCell[nBinsMax]; //! Cell Energy
+ Float_t etaCell[nBinsMax]; //! Cell eta
+ Float_t phiCell[nBinsMax]; //! Cell phi
+ Short_t flagCell[nBinsMax]; //! Cell flag