]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONCheck.cxx
Getting the trigger descriptors from CDB
[u/mrichter/AliRoot.git] / MUON / AliMUONCheck.cxx
index baba9508e99977fefa73b194db1aa062eab59321..b8f481fd784f8ae9dcc2a1def0651ff7397c4c1f 100644 (file)
@@ -15,6 +15,7 @@
 
 // $Id$
 
+//-----------------------------------------------------------------------------
 /// \class AliMUONCheck
 ///
 /// This class check the ESD tree, providing the matching with the trigger
@@ -27,6 +28,7 @@
 /// DumpDigit() as a replacement of the function from MUONCheck.C macro.
 ///
 /// \author Frederic Yermia, INFN Torino
+//-----------------------------------------------------------------------------
 
 #include "AliMUONCheck.h"
 #include "AliMUONConstants.h"
@@ -38,6 +40,7 @@
 #include "AliMpSegmentation.h"
 #include "AliMpVSegmentation.h"
 #include "AliMpDEManager.h"
+#include "AliMpCDB.h"
 #include "AliMUONVDigitStore.h"
 
 #include "AliRunLoader.h"
@@ -45,8 +48,9 @@
 #include "AliStack.h"
 #include "AliTrackReference.h"
 #include "AliTracker.h"
-#include "AliESD.h"
+#include "AliESDEvent.h"
 #include "AliESDMuonTrack.h"
+#include "AliESDVertex.h"
 #include "AliMagFMaps.h"
 #include "AliLog.h"
 
@@ -149,7 +153,7 @@ AliMUONCheck::CheckESD(Bool_t pdc06TriggerResponse)
   Double_t fPxRec1, fPyRec1, fPzRec1, fE1;
   Int_t fZ1;
   
-  AliESD* fESD = new AliESD();
+  AliESDEvent* fESD = new AliESDEvent();
   TTree* tree = (TTree*) esdFile->Get("esdTree");
   if (!tree) 
   {
@@ -653,8 +657,6 @@ AliMUONCheck::CheckTrackRef()
         
       }//hits de tTR
       
-      delete trackRefs;
-      
     }//entree de tTR 
     
   }//evt loop
@@ -714,6 +716,9 @@ AliMUONCheck::CheckOccupancy(Bool_t perDetEle) const
   
   AliMUONVDigitStore* digitStore = di.DigitStore(fFirstEvent);
   
+  if ( ! AliMpCDB::LoadMpSegmentation()  ) 
+    AliFatal("Could not access mapping from OCDB !");
+  
   // Compute values
   for (Int_t ichamber=0; ichamber<nchambers; ++ichamber) 
   {
@@ -811,7 +816,6 @@ AliMUONCheck::CheckOccupancy(Bool_t perDetEle) const
        100.*((Float_t) totaloccupancyBending)/((Float_t) totalchannelsBending),
        100.*((Float_t) totaloccupancyNonBending)/((Float_t) totalchannelsNonBending)            );
 
-  delete digitStore;
 }
 
 //_____________________________________________________________________________