Updating g4menu.C macro for changes in STEER;
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Apr 2009 06:17:15 +0000 (06:17 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Apr 2009 06:17:15 +0000 (06:17 +0000)
calling gAlice->GetMCApp()->Init(); instead of
gAlice->Init(), which is no more available.
(I. Hrivnacova)

macros/g4menu.C

index 7a2e757..b7e27a4 100644 (file)
@@ -67,7 +67,12 @@ void MakeGeometry()
   AliCDBManager* man = AliCDBManager::Instance();
   man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
   man->SetRun(1);
-  gAlice->Init("$ALICE_ROOT/macros/g4ConfigGeometry.C");
+
+  // MC application initialization
+  TString configFileName = "$ALICE_ROOT/macros/g4ConfigGeometry.C";
+  gROOT->LoadMacro(configFileName.Data());
+  gInterpreter->ProcessLine(gAlice->GetConfigFunction());
+  gAlice->GetMCApp()->Init();
   
   // Generate geometry file
   //
@@ -86,7 +91,12 @@ void Init()
   AliCDBManager* man = AliCDBManager::Instance();
   man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
   man->SetRun(0);
-  gAlice->Init("$ALICE_ROOT/macros/g4Config.C");
+  // MC application initialization
+  TString configFileName = "$ALICE_ROOT/macros/g4Config.C";
+  gROOT->LoadMacro(configFileName.Data());
+  gInterpreter->ProcessLine(gAlice->GetConfigFunction());
+  gAlice->GetMCApp()->Init();
 
   cout << endl
        << "Only MonteCarlo initialization has been performed. " << endl