]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCSensorTemp.cxx
Removing obsolete macro
[u/mrichter/AliRoot.git] / TPC / AliTPCSensorTemp.cxx
index 7f52bf0d44ad12c49609dfe85e8bcc8b418efa1c..167daca2f70b142417c1d7b5b78314087ef01717 100644 (file)
@@ -185,7 +185,7 @@ TClonesArray * AliTPCSensorTemp::ReadTree(TTree *tree,
   Int_t sector=0;
   char  type[100];
   char  side[100];
-  Int_t num=0;
+  UInt_t num=0;
   Int_t echa=0;
   //Double_t x=0;
   //Double_t y=0;
@@ -329,13 +329,14 @@ TClonesArray * AliTPCSensorTemp::ReadTree(TTree *tree,
       temp->SetZ(-240);
       }
 
-    if(temp->GetType()==5 && temp->GetSide()==0) {
+    if ( num < (sizeof(kTSz)/sizeof(kTSz[0]))) {
+      if(temp->GetType()==5 && temp->GetSide()==0) {
          temp->SetZ(kTSz[num]);
       }
-    if(temp->GetType()==5 && temp->GetSide()==1) {
+      if(temp->GetType()==5 && temp->GetSide()==1) {
          temp->SetZ(-kTSz[num]);
       }
-
+    }
 
   }
   return array;