]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
ALIROOT-5492 Another fix to HighLow Gain
authorprsnko <Dmitri.Peressounko@cern.ch>
Wed, 9 Jul 2014 07:26:52 +0000 (11:26 +0400)
committerhristov <Peter.Hristov@cern.ch>
Thu, 10 Jul 2014 10:09:47 +0000 (12:09 +0200)
STEER/AOD/AliAODCaloCells.h
STEER/ESD/AliESDCaloCells.h

index 0b0cc42e2f0f163256a11009c7a3d0b491c0f4f6..9797f54aab31ceb56850845e6172fdac1d7a8e03 100644 (file)
@@ -125,10 +125,14 @@ Bool_t AliAODCaloCells::GetCellHighGain(Short_t cellNumber)
   if (pos>=0 && pos < fNCells && fCellNumber[pos] == cellNumber ) {
     if(fHGLG)
       return fHGLG[pos];
-    else //old version of AOD, 
-      return !(fMCLabel[pos]==-2) ;
+    else{
+      if(fMCLabel) //old version of AOD, 
+         return !(fMCLabel[pos]==-2) ;
+      else
+        return kTRUE ;
+    }
   } else {
-    return 0.;
+    return kFALSE;
   }
 }
 
@@ -162,10 +166,14 @@ Bool_t AliAODCaloCells::GetHighGain(Short_t pos) const
   if (pos>=0 && pos<fNCells) {
     if(fHGLG)
       return fHGLG[pos];
-    else //Old version of AOD store this flag in MCLabel
-      return !(fMCLabel[pos]==-2) ;
+    else{
+      if(fMCLabel)    //Old version of AOD store this flag in MCLabel
+        return !(fMCLabel[pos]==-2) ;
+      else
+       return kTRUE ;
+    }
   } else {
-    return 0.;
+    return kFALSE;
   }
 }
 
index 142b353049f0bfcd2041559c6e920b66cf3c51ac..faea00188cb5f34c46720df822c3943fd93d77f1 100644 (file)
@@ -129,10 +129,14 @@ Bool_t AliESDCaloCells::GetCellHighGain(Short_t cellNumber)
   if (pos>=0 && pos < fNCells && fCellNumber[pos] == cellNumber ) {
     if(fHGLG)
       return fHGLG[pos];
-    else //old version of ESD, for data HG flag stored in MCLabel 
-      return !(fMCLabel[pos]==-2) ;
+    else{
+      if(fMCLabel)//old version of ESD, for data HG flag stored in MCLabel 
+        return !(fMCLabel[pos]==-2) ;
+      else
+       return kTRUE ;
+    }
   } else {
-    return 0.;
+    return kFALSE;
   }
 }
 
@@ -164,10 +168,14 @@ Bool_t AliESDCaloCells::GetHighGain(Short_t pos) const
   if (pos>=0 && pos<fNCells) {
     if(fHGLG)
       return fHGLG[pos];
-    else //old version of ESD, for data HG flag stored in MCLabel 
-      return !(fMCLabel[pos]==-2) ;
+    else{
+      if(fMCLabel)//old version of ESD, for data HG flag stored in MCLabel 
+        return !(fMCLabel[pos]==-2) ;
+      else
+       return kTRUE ;
+    }
   } else {
-    return 0.;
+    return kFALSE;
   }
 }