]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCAL.cxx
Digit header added
[u/mrichter/AliRoot.git] / EMCAL / AliEMCAL.cxx
index 3b436b26130c74c19423905aa26f266380669d89..b030d72638f9b7d3b837c07ef13c7873c1fa1ac2 100644 (file)
 /* History of cvs commits:
  *
  * $Log$
+
+ * Revision 1.54  2007/12/06 10:31:13  hristov
+ * Bug fix: using the mapping from CDB
+ *
  * Revision 1.53.10.1  2007/12/06 10:29:59  hristov
  * Bug fix: using the mapping from CDB
  *
 // --- ROOT system ---
 class TFile;
 #include <TFolder.h> 
-#include <TTree.h>
-#include <TVirtualMC.h> 
+#include <TGeoGlobalMagField.h>
+#include <TGraph.h> 
 #include <TH1F.h> 
 #include <TRandom.h> 
-#include <TGraph.h> 
+#include <TTree.h>
+#include <TVirtualMC.h> 
 
 // --- Standard library ---
 
@@ -76,7 +81,6 @@ class TFile;
 #include "AliCDBManager.h"
 #include "AliCDBEntry.h"
 
-
 ClassImp(AliEMCAL)
 
 //____________________________________________________________________________
@@ -90,6 +94,7 @@ AliEMCAL::AliEMCAL()
   // Default ctor 
   fName = "EMCAL" ;
   InitConstants();
+
   // Should call  AliEMCALGeometry::GetInstance(EMCAL->GetTitle(),"") for getting EMCAL geometry
 }
 
@@ -240,8 +245,8 @@ void AliEMCAL::CreateMaterials()
   // DEFINITION OF THE TRACKING MEDIA
 
   // for EMCAL: idtmed[1599->1698] equivalent to fIdtmed[0->100]
-  Int_t   isxfld = gAlice->Field()->Integ() ;
-  Float_t sxmgmx = gAlice->Field()->Max() ;
+  Int_t   isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ() ;
+  Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max() ;
 
   // Air                                                                         -> idtmed[1599]
  AliMedium(0, "Air$", 0, 0,
@@ -276,20 +281,10 @@ void AliEMCAL::CreateMaterials()
 }
 //____________________________________________________________________________
 void AliEMCAL::Digits2Raw() {
-  static AliEMCALRawUtils rawUtil;
-  //Get Mapping RCU files from the AliEMCALRecParam                                                          
-  AliCDBEntry* entry = AliCDBManager::Instance()->Get("EMCAL/Calib/Mapping");
-  const TObjArray* maps = 0x0;
-  if(entry)
-    maps = (TObjArray*)entry->GetObject();
-
-  if(!maps) AliFatal("Cannot retrieve ALTRO mappings!!");
-
-  AliAltroMapping * mapping[2] ; // For the moment only 2                                                    
-  for(Int_t i = 0; i < 2; i++) {
-    mapping[i] = (AliAltroMapping*)maps->At(i);
-  }
-  rawUtil.Digits2Raw(mapping);
+
+  static AliEMCALRawUtils rawUtils;
+  rawUtils.Digits2Raw();
+
 }
 //____________________________________________________________________________
 void AliEMCAL::Hits2SDigits()