Avoid direct instantiation of AliMagF.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 2 Oct 2009 17:06:00 +0000 (17:06 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 2 Oct 2009 17:06:00 +0000 (17:06 +0000)
EVE/alice-macros/MUON_displayData.C
EVE/alice-macros/MUON_displaySimu.C

index 185338fdf64ad31cfd86e2180b7ff480bd96ff0b..744cc2ea40a0094700b8a059ad190c021a39efa4 100644 (file)
@@ -25,12 +25,8 @@ void MUON_displayData(Bool_t fromRaw = kFALSE, Bool_t showTracks = kTRUE, Bool_t
   if (!AliMpSegmentation::Instance()) AliMpCDB::LoadMpSegmentation();
   if (!AliMpDDLStore::Instance())     AliMpCDB::LoadDDLStore();
 
-  if (!TGeoGlobalMagField::Instance()->GetField()) {
-    printf("Loading field map...\n");
-    AliMagF* field = new AliMagF("Maps","Maps",2,1.,1., 10.,AliMagF::k5kG);
-    TGeoGlobalMagField::Instance()->SetField(field);
-  }
   // set the magnetic field for track extrapolations
+  AliEveEventManager::AssertMagField();
   AliMUONTrackExtrap::SetField();
 
   TTree* dt = 0;
index 3c8e74ff8b5fb92f02971eecf800dfa674056da1..a6b0268e1ee6672c009ca057637732904ea6e86c 100644 (file)
@@ -26,12 +26,8 @@ void MUON_displaySimu(Bool_t fromRaw = kFALSE, Bool_t showTracks = kTRUE, Bool_t
   if (!AliMpSegmentation::Instance()) AliMpCDB::LoadMpSegmentation();
   if (!AliMpDDLStore::Instance())     AliMpCDB::LoadDDLStore();
 
-  if (!TGeoGlobalMagField::Instance()->GetField()) {
-    printf("Loading field map...\n");
-    AliMagF* field = new AliMagF("Maps","Maps",2,1.,1., 10.,AliMagF::k5kG);
-    TGeoGlobalMagField::Instance()->SetField(field);
-  }
   // set the magnetic field for track extrapolations
+  AliEveEventManager::AssertMagField();
   AliMUONTrackExtrap::SetField();
 
   TTree* dt = 0;