]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliRun.cxx
Backup the current Root directory and not the current file
[u/mrichter/AliRoot.git] / STEER / AliRun.cxx
index 481580699d046288aca6a01d1cec846505421f5f..d185070f9d7c1d3fb62947007bef364d7f46744b 100644 (file)
@@ -64,9 +64,7 @@
 #include "AliPDG.h"
 #include "AliRun.h"
 #include "AliStack.h"
-#ifdef __APPLE__
-//#include "AliTPCTrackHitsInterfaces.h"
-#endif
+#include "AliAlignObj.h"
 
 AliRun *gAlice;
 
@@ -83,14 +81,16 @@ AliRun::AliRun():
   fMCApp(0),
   fDisplay(0),
   fField(0),
-  fMC(0),
   fNdets(0),
   fInitDone(kFALSE),
   fLego(0),
   fPDGDB(0),  //Particle factory object
-  fConfigFunction("\0"),
+  fConfigFunction(""),
   fRandom(0),
+  fBaseFileName(""),
   fIsRootGeometry(kFALSE),
+  fGeometryFileName(""),
+  fTriggerDescriptor(""),
   fRunLoader(0x0)
 {
   //
@@ -112,14 +112,16 @@ AliRun::AliRun(const AliRun& arun):
   fMCApp(0),
   fDisplay(0),
   fField(0),
-  fMC(0),
   fNdets(0),
   fInitDone(kFALSE),
   fLego(0),
   fPDGDB(0),  //Particle factory object
   fConfigFunction("\0"),
   fRandom(0),
+  fBaseFileName(""),
   fIsRootGeometry(kFALSE),
+  fGeometryFileName(""),
+  fTriggerDescriptor(""),
   fRunLoader(0x0)
 {
   //
@@ -140,14 +142,16 @@ AliRun::AliRun(const char *name, const char *title):
   fMCApp(0),
   fDisplay(0),
   fField(0),
-  fMC(gMC),
   fNdets(0),
   fInitDone(kFALSE),
   fLego(0),
   fPDGDB(TDatabasePDG::Instance()),        //Particle factory object!
   fConfigFunction("Config();"),
   fRandom(new TRandom3()),
+  fBaseFileName(""),
   fIsRootGeometry(kFALSE),
+  fGeometryFileName(""),
+  fTriggerDescriptor(""),
   fRunLoader(0x0)
 {
   //
@@ -168,8 +172,6 @@ AliRun::AliRun(const char *name, const char *title):
 
   // Add to list of browsable  
   gROOT->GetListOfBrowsables()->Add(this,name);
-  // Create the TNode geometry for the event display
-  BuildSimpleGeometry();
   
   // Create default mag field
   SetField();
@@ -177,14 +179,6 @@ AliRun::AliRun(const char *name, const char *title):
   // Add particle list to configuration
   AliConfig::Instance()->Add(fPDGDB); 
 
-#ifdef __APPLE__
-  // Terrible hack to avoid problem with the initialisation of 
-  // static and globals on Mac OS X 
-  //  AliClassAliTrackHitsInfo p1=galiclass____AliClassAliTrackHitsInfo;
-  // AliClassAliTrackHitsParam p2=galiclass____AliTrackHitsParam;
-  //AliClassAliHitInfo p3=galiclass____AliHitInfo;
-#endif
-
 }
 
 
@@ -474,27 +468,27 @@ Int_t AliRun::GetEvent(Int_t event)
 //_______________________________________________________________________
 TGeometry *AliRun::GetGeometry()
 {
-  //
-  // Import Alice geometry from current file
-  // Return pointer to geometry object
-  //
-  if (!fGeometry) fGeometry = dynamic_cast<TGeometry*>(gDirectory->Get("AliceGeom"));
-  //
-  // Unlink and relink nodes in detectors
-  // This is bad and there must be a better way...
-  //
+  // Create the TNode geometry for the event display
+  if (!fGeometry) { 
+    BuildSimpleGeometry();
+    //
+    // Unlink and relink nodes in detectors
+    // This is bad and there must be a better way...
+    //
   
-  TIter next(fModules);
-  AliModule *detector;
-  while((detector = dynamic_cast<AliModule*>(next()))) {
-    TList *dnodes=detector->Nodes();
-    Int_t j;
-    TNode *node, *node1;
-    for ( j=0; j<dnodes->GetSize(); j++) {
-      node = dynamic_cast<TNode*>(dnodes->At(j));
-      node1 = fGeometry->GetNode(node->GetName());
-      dnodes->Remove(node);
-      dnodes->AddAt(node1,j);
+    TIter next(fModules);
+    AliModule *detector;
+    while((detector = dynamic_cast<AliModule*>(next()))) {
+      detector->BuildGeometry();
+      TList *dnodes=detector->Nodes();
+      Int_t j;
+      TNode *node, *node1;
+      for ( j=0; j<dnodes->GetSize(); j++) {
+       node = dynamic_cast<TNode*>(dnodes->At(j));
+       node1 = fGeometry->GetNode(node->GetName());
+       dnodes->Remove(node);
+       dnodes->AddAt(node1,j);
+      }
     }
   }
   return fGeometry;
@@ -971,5 +965,3 @@ void AliRun::AddModule(AliModule* mod)
   TString str = name; gSystem->ExpandPathName(str);
   return !gSystem->AccessPathName(str.Data(),mode);
 }
-
-