]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFComparison.C
warning fix
[u/mrichter/AliRoot.git] / TOF / AliTOFComparison.C
index 826d240d2db3a88dc72dbb10ffe1bfc26f6af0c2..65c0583fe6001639202c6415bbe42ab1045b7f9b 100644 (file)
@@ -28,6 +28,7 @@
   #include "AliRunLoader.h"
   #include "AliRun.h"
   #include "AliESDEvent.h"
+  #include "AliESDtrack.h"
 
   #include "AliTOFcluster.h"
   #include "AliLoader.h"
@@ -122,7 +123,7 @@ Int_t AliTOFComparison(const Char_t *dir=".") {
 
 
    if (gAlice) { 
-     delete gAlice->GetRunLoader();
+     delete AliRunLoader::Instance();
      delete gAlice;//if everything was OK here it is already NULL
      gAlice = 0x0;
    }
@@ -218,17 +219,19 @@ Int_t AliTOFComparison(const Char_t *dir=".") {
               cerr<<"Wrong cluster index ! "<<idx<<endl;
                return 5;
              }
-             AliTOFcluster *cls=(AliTOFcluster*)clusters->UncheckedAt(idx);
-             if (cls->GetLabel(0)!=lab)
-              if (cls->GetLabel(1)!=lab)
-                if (cls->GetLabel(2)!=lab) {
-                 mismatched++; 
-                 if (ptg>pmin) { hfake->Fill(ptg); hfak->Fill(tgl); } 
-                 break;
-               }
-             if (ptg>pmin) { hfound->Fill(ptg); hfoun->Fill(tgl); }
-             matched++;
-             break;
+             AliTOFcluster *cls=(AliTOFcluster*)clusters->At(idx);
+            if (cls) {
+              if (cls->GetLabel(0)!=lab)
+                if (cls->GetLabel(1)!=lab)
+                  if (cls->GetLabel(2)!=lab) {
+                    mismatched++; 
+                    if (ptg>pmin) { hfake->Fill(ptg); hfak->Fill(tgl); } 
+                    break;
+                  }
+              if (ptg>pmin) { hfound->Fill(ptg); hfoun->Fill(tgl); }
+              matched++;
+              break;
+            }
          }
          if (j==ntrk) {
            cerr<<"Not matched: "<<lab<<"   ";
@@ -314,7 +317,7 @@ Int_t AliTOFComparison(const Char_t *dir=".") {
 
 Int_t GoodTracksTOF(const Char_t *dir) {
    if (gAlice) { 
-       delete gAlice->GetRunLoader();
+       delete AliRunLoader::Instance();
        delete gAlice;//if everything was OK here it is already NULL
        gAlice = 0x0;
    }