]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliRun.cxx
Coding Conventions fix
[u/mrichter/AliRoot.git] / STEER / AliRun.cxx
index 71cbe168f2110fd64565904864d149e3e2b7de43..fd87811d87027fd68498789897e5c376684858f3 100644 (file)
@@ -51,9 +51,6 @@
 #include "AliDetector.h"
 #include "AliHeader.h"
 #include "AliMC.h"
-#include "AliMagFC.h"
-#include "AliMagFCM.h"
-#include "AliMagFDM.h"
 #include "AliPDG.h"
 #include "AliRun.h"
 #include "AliStack.h"
@@ -68,12 +65,10 @@ ClassImp(AliRun)
 
 //_______________________________________________________________________
 AliRun::AliRun():
-  fRun(-1),
-  fEvent(0),
+//  fRun(-1),
   fEventNrInRun(-1),
   fModules(0),
   fMCApp(0),
-  fField(0),
   fNdets(0),
   fConfigFunction(""),
   fRandom(0),
@@ -95,12 +90,9 @@ AliRun::AliRun():
 //_____________________________________________________________________________
 AliRun::AliRun(const char *name, const char *title):
   TNamed(name,title),
-  fRun(-1),
-  fEvent(0),
   fEventNrInRun(-1),
   fModules(new TObjArray(77)), // Support list for the Detectors
   fMCApp(new AliMC(GetName(),GetTitle())),
-  fField(0),
   fNdets(0),
   fConfigFunction("Config();"),
   fRandom(new TRandom3()),
@@ -130,9 +122,6 @@ AliRun::AliRun(const char *name, const char *title):
   // Add to list of browsable  
   gROOT->GetListOfBrowsables()->Add(this,name);
   
-  // Create default mag field
-  fField = new AliMagFC("Map1"," ",2.,1.,10.);
-
 }
 
 
@@ -156,7 +145,6 @@ AliRun::~AliRun()
      }
    }
     
-  delete fField;
   delete fMCApp;
   delete gMC; gMC=0;
   if (fModules) {
@@ -166,15 +154,6 @@ AliRun::~AliRun()
   
 }
 
-//_______________________________________________________________________
-void  AliRun::SetField(AliMagF* magField)
-{
-  //
-  // Set Magnetic Field Map
-  //
-  fField = magField;
-  fField->ReadField();
-}
 
 //_______________________________________________________________________
 void AliRun::SetRootGeometry(Bool_t flag)
@@ -297,7 +276,7 @@ Int_t AliRun::GetEvent(Int_t event)
 /****       R  E  L  O  A  D          ****/
 /*****************************************/
 
-  AliRunLoader::GetRunLoader()->GetEvent(event);
+  AliRunLoader::Instance()->GetEvent(event);
 
 /*****************************************/ 
 /****  P O S T    R E L O A D I N G   ****/
@@ -311,7 +290,7 @@ Int_t AliRun::GetEvent(Int_t event)
      detector->SetTreeAddress();
    }
  
-  return AliRunLoader::GetRunLoader()->GetHeader()->GetNtrack();
+  return AliRunLoader::Instance()->GetHeader()->GetNtrack();
 }
 
 //_______________________________________________________________________
@@ -327,7 +306,7 @@ void AliRun::Hits2Digits(const char *selected)
 
    // Convert Hits to sumable digits
    // 
-   for (Int_t nevent=0; nevent<AliRunLoader::GetRunLoader()->TreeE()->GetEntries(); nevent++) {
+   for (Int_t nevent=0; nevent<AliRunLoader::Instance()->TreeE()->GetEntries(); nevent++) {
      GetEvent(nevent);
      Hits2SDigits(selected);
      SDigits2Digits(selected);
@@ -408,30 +387,6 @@ void AliRun::Tree2Tree(Option_t *option, const char *selected)
    }
 }
 
-// 
-// MC Application
-// 
-
-//_______________________________________________________________________
-void AliRun::Field(const Double_t* x, Double_t *b) const
-{
-  //
-  // Return the value of the magnetic field
-  //
-    
-  if (Field()) Field()->Field(x,b);
-
-  else {
-    AliError("No mag field defined!");
-    b[0]=b[1]=b[2]=0.;
-  }
-
-  
-}      
-
-// 
-// End of MC Application
-// 
 
 //_______________________________________________________________________
 void AliRun::Streamer(TBuffer &R__b)
@@ -452,7 +407,7 @@ void AliRun::Streamer(TBuffer &R__b)
 
 void AliRun::SetGenEventHeader(AliGenEventHeader* header)
 {
-  AliRunLoader::GetRunLoader()->GetHeader()->SetGenEventHeader(header);
+  AliRunLoader::Instance()->GetHeader()->SetGenEventHeader(header);
 }