]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDRecpointRead.C
Fix coverity defect (Jochen)
[u/mrichter/AliRoot.git] / PMD / AliPMDRecpointRead.C
index 9d46e0936e43f1ba6923ceb6fdc95fda0d234cfe..f430e83a6c539e6ded91e9952eae0e30fa2904ca 100644 (file)
@@ -15,7 +15,7 @@ Int_t AliPMDRecpointRead(Int_t nevent = 1)
 {
   if (gAlice)
     { 
-      delete gAlice->GetRunLoader();
+      delete AliRunLoader::Instance();
       delete gAlice;//if everything was OK here it is already NULL
       gAlice = 0x0;
     }
@@ -37,8 +37,17 @@ Int_t AliPMDRecpointRead(Int_t nevent = 1)
     }
   
   pmdloader->LoadRecPoints("READ");
+
+
+  AliCDBManager *man = AliCDBManager::Instance();
+  man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+  man->SetRun(0);
+  
   TClonesArray *fRecpoints;
   AliPMDUtility *cc = new AliPMDUtility();
+
+  cc->ApplyAlignment();
+
   TH2F *h2 = new TH2F("h2"," ",100,-100.,100.,100,-100.,100.);
 
   FILE *fpw = fopen("junk_rec.dat","w");
@@ -102,10 +111,9 @@ Int_t AliPMDRecpointRead(Int_t nevent = 1)
              // Plot the cluster centroid to see the PMD geometry
              // using the PMD Utility class
              //
-             if (det == 0)
+             if (det == 1)
                {
                  // Draw only for PRE plane
-                 //cc->RectGeomCellPos(ism,xpad,ypad,xx,yy);
                  cc->RectGeomCellPos(smn,xpos,ypos,xx,yy);
                  h2->Fill(xx,yy);
                }