]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSDigit.cxx
Limiting the number of primaries to 3 in the integer array
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDigit.cxx
index 89d7c1a9b52b5a209ebfebd369842dee7673bb10..aa492a98cc83ff464319ee82eb0ecd2fa5683107 100644 (file)
@@ -160,9 +160,11 @@ AliPHOSDigit& AliPHOSDigit::operator+(AliPHOSDigit const & digit)
   // Here comes something crummy ... but I do not know how to stream pointers
   // because AliPHOSDigit is in a TCLonesArray
 
-    if ( fNprimary > 3 )
+  if ( fNprimary > 3 ) {
       cout << "AliPHOSDigit + operator  ERROR > too many primaries, modify AliPHOSDigit" << endl ; 
-    else {
+      fNprimary = 3 ;
+  }    
+  else {
       switch (fNprimary) {  
       case 1 :
        SetPrimary(1, fPrimary[0]) ;