]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALDigit.cxx
EMCAL in
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALDigit.cxx
index 1e50ab7986cd5e23693a16e78064959f300f06d8..f070fdf641f0aa2b4c19f1cb1ad88733494bcf44 100644 (file)
@@ -46,13 +46,15 @@ ClassImp(AliEMCALDigit)
 {
   // default ctor 
 
-  fIndexInList = -1 ; 
+  fIndexInList = 0 ; 
   fNprimary    = 0 ;  
-  fNMaxPrimary = 20 ; 
+  fNMaxPrimary = 0 ; 
   fNiparent     = 0 ;
-  fNMaxiparent = 40; //fNMaxPrimary*10;
-  fPrimary = new Int_t[fNMaxPrimary] ;
-  fIparent = new Int_t[fNMaxiparent] ; 
+
+  fNMaxiparent = 0; 
+  fPrimary = 0 ;
+  fIparent = 0 ;
+  fMaxIter = 0;
 }
 
 //____________________________________________________________________________
@@ -60,14 +62,15 @@ AliEMCALDigit::AliEMCALDigit(Int_t primary, Int_t iparent, Int_t id, Int_t DigEn
 {  
   // ctor with all data 
 
-  fNMaxPrimary = 20 ; 
-  fNMaxiparent = 40 ; //fNMaxPrimary*10;
+  fNMaxPrimary = 25 ; 
+  fNMaxiparent = 50 ; 
   fPrimary = new Int_t[fNMaxPrimary] ;
   fIparent = new Int_t[fNMaxiparent] ; 
   fAmp         = DigEnergy ;
   fTime        = time ;
   fId          = id ;
   fIndexInList = index ; 
+  fMaxIter     = 5;
   if( primary != -1){
     fNprimary    = 1 ; 
     fPrimary[0]  = primary ;  
@@ -108,6 +111,7 @@ AliEMCALDigit::AliEMCALDigit(const AliEMCALDigit & digit)
   fAmp         = digit.fAmp ;
   fTime        = digit.fTime ;
   fId          = digit.fId;
+  fMaxIter     = digit.fMaxIter;
   fIndexInList = digit.fIndexInList ; 
   fNprimary    = digit.fNprimary ;
   fNiparent    = digit.fNiparent ;
@@ -245,12 +249,12 @@ AliEMCALDigit& AliEMCALDigit::operator+(AliEMCALDigit const & digit)
       fNprimary++ ;
       max1++;}
       if(fNprimary==fNMaxPrimary) {
-      Int_t printindex ;
-      for (printindex = 0 ; printindex < max1 ; printindex++)
-       cout << "printindex = " << printindex << "  primary = " << fPrimary[printindex];
-      cout <<endl;
-      cout << "AliEMCALDigit >> Increase NMaxPrimary "<< endl ;
-       return *this ;
+
+       TString mess = " NMaxPrimary  =  " ; 
+       mess += fNMaxPrimary ; 
+       mess += " is too small" ; 
+       Fatal("AliEMCALDigit::Operator+ -->" , mess.Data()) ; 
+
       }
     }
   }
@@ -267,12 +271,12 @@ AliEMCALDigit& AliEMCALDigit::operator+(AliEMCALDigit const & digit)
       fNiparent++ ;
       max2++;}
       if(fNiparent==fNMaxiparent) {
-       Int_t printindex ;
-       for (printindex = 0 ; printindex < max2 ; printindex++)
-         cout << "printindex = " << printindex << "  parent  = " << fIparent[printindex];
-       cout <<endl;
-       cout << "AliEMCALDigit >> Increase NMaxiparent "<< endl ;
-       return *this ;
+
+       TString mess = " NMaxiparent  =  " ; 
+       mess += fNMaxiparent ; 
+       mess += " is too small" ; 
+       Fatal("AliEMCALDigit::Operator+ -->", mess.Data()) ; 
+
       }
     }
   }