]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ALIROOT/aliroot.cxx
Compatibility with ROOT trunk
[u/mrichter/AliRoot.git] / ALIROOT / aliroot.cxx
index 74fb05706ca44fbe92b796e1f73cd51858325396..5ec45deda556bc2055044c027d2f0dfe7ade01f0 100644 (file)
@@ -13,9 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-*/
+/* $Id$ */
 
 //////////////////////////////////////////////////////////////////////////
 //                                                                      //
@@ -39,6 +37,8 @@ $Log$
 #include <TRint.h>
 #include <TFile.h>
 #include <AliRun.h>
+#include "Riostream.h"
+#include "ARVersion.h"
 
 #if defined __linux
 //On linux Fortran wants this, so we give to it!
@@ -46,18 +46,18 @@ int xargv=0;
 int xargc=0;
 #endif
 
+#ifdef FORTRAN_G95
+extern "C" void g95_runtime_start();
+#endif
+
 #if defined WIN32 
   extern "C" int __fastflag=0; 
   extern "C" int _pctype=0; 
   extern "C" int __mb_cur_max=0; 
 #endif 
 
-int gcbank_[3000000];
-
-//Initialise the Root environment
- extern void InitGui();
- VoidFuncPtr_t initfuncs[] = { InitGui, 0 };
- TROOT root("galice","The Alice/ROOT Interface", initfuncs);
+using std::cout;
+using std::endl;
 
 //_____________________________________________________________________________
 int main(int argc, char **argv)
@@ -74,18 +74,32 @@ int main(int argc, char **argv)
   // in the run is stored in the same file in the tree TreeE, containing the
   // run and event number, the number of vertices, tracks and primary tracks
   // in the event.
-  //
-  new AliRun("gAlice"," The Alice Geant3-based MonteCarlo");
   
+  for ( int i = 1; i < argc; ++i ) 
+  {
+    TString argument(argv[i]);
+    
+    if (argument=="--version")
+    {      
+      cout << "aliroot " << ALIROOT_SVN_REVISION << " " << ALIROOT_SVN_BRANCH << endl;
+      return 0;
+    }    
+  }
+  
+  // Create new configuration 
+  
+  new AliRun("gAlice","The ALICE Off-line Simulation Framework");
+    
   // Start interactive geant
   
-  TRint *theApp = new TRint("aliroot", &argc, argv, 0, 0);
+  TRint *theApp = new TRint("aliroot", &argc, argv);
+#ifdef FORTRAN_G95
+  g95_runtime_start();
+#endif
   
-  // --- Initialisation of the GALICE package ---
+  // --- Start the event loop ---
   theApp->Run();
   
-  // --- Simulation of all events ---
   return(0);
 }
 
-