]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFComparison.C
Fix to provide correct EMCAL mapping info (David)
[u/mrichter/AliRoot.git] / TOF / AliTOFComparison.C
index 3d6aa70cdf454686ecfc1f5e066b1bcbfa60fe76..65c0583fe6001639202c6415bbe42ab1045b7f9b 100644 (file)
@@ -123,7 +123,7 @@ Int_t AliTOFComparison(const Char_t *dir=".") {
 
 
    if (gAlice) { 
-     delete AliRunLoader::GetRunLoader();
+     delete AliRunLoader::Instance();
      delete gAlice;//if everything was OK here it is already NULL
      gAlice = 0x0;
    }
@@ -219,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<<"   ";
@@ -315,7 +317,7 @@ Int_t AliTOFComparison(const Char_t *dir=".") {
 
 Int_t GoodTracksTOF(const Char_t *dir) {
    if (gAlice) { 
-       delete AliRunLoader::GetRunLoader();
+       delete AliRunLoader::Instance();
        delete gAlice;//if everything was OK here it is already NULL
        gAlice = 0x0;
    }