]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ALIROOT/aliroot.cxx
CMake: removing qpythia from the depedencies
[u/mrichter/AliRoot.git] / ALIROOT / aliroot.cxx
index f92e3400ef5db2d874806b202a12cb45e235d5c9..f33931ac17a7550b734429f4c350539b821e333f 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.10  2002/02/18 14:26:14  hristov
-#include <AliConfig.h> removed
-
-Revision 1.9  2002/01/09 17:05:03  morsch
-Increase memory allocated for ZEBRA.
-
-Revision 1.8  2001/10/04 15:32:36  hristov
-Instantiation of AliConfig removed
-
-Revision 1.7  2001/05/22 11:39:48  buncic
-Restored proper name for top level AliRoot folder.
-
-Revision 1.6  2001/05/21 17:22:50  buncic
-Fixed problem with missing AliConfig while reading galice.root
-
-Revision 1.5  2001/05/16 14:57:07  alibrary
-New files for folders and Stack
-
-Revision 1.4  2000/12/20 08:39:37  fca
-Support for Cerenkov and process list in Virtual MC
-
-Revision 1.3  1999/09/29 09:24:07  fca
-Introduction of the Copyright and cvs Log
-
-*/
+/* $Id$ */
 
 //////////////////////////////////////////////////////////////////////////
 //                                                                      //
@@ -63,6 +37,16 @@ Introduction of the Copyright and cvs Log
 #include <TRint.h>
 #include <TFile.h>
 #include <AliRun.h>
+#include "Riostream.h"
+#include "ARVersion.h"
+// STD
+#include <iostream>
+#include <algorithm>
+#include <sstream>
+#include <stdexcept>
+#include <functional>
+#include <AliLog.h>
+
 
 #if defined __linux
 //On linux Fortran wants this, so we give to it!
@@ -70,13 +54,20 @@ 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_[4000000];
+using std::cout;
+using std::endl;
+using std::exception;
+using std::cerr;
 
 //_____________________________________________________________________________
 int main(int argc, char **argv)
@@ -94,18 +85,37 @@ int main(int argc, char **argv)
   // run and event number, the number of vertices, tracks and primary tracks
   // in the event.
   
+  for ( int i = 1; i < argc; ++i ) 
+  {
+    TString argument(argv[i]);
+    
+    if (argument=="--version")
+    {      
+      cout << "aliroot " << ALIROOT_REVISION << " " << ALIROOT_BRANCH << endl;
+      return 0;
+    }    
+  }
+  
   // Create new configuration 
   
   new AliRun("gAlice","The ALICE Off-line Simulation Framework");
-    
+  AliLog::GetRootLogger();  // force AliLog to initialize at start time
   // 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
   
   // --- Start the event loop ---
-  theApp->Run();
+  //  run.Info("Start AliRoot");
+  try{
+    theApp->Run();  
+  } catch(const exception &e){
+    cerr << "Excception catched" << e.what() << endl;
+    AliLog::Message(0, "Exception catched", "ROOT", NULL, "Exception catched", NULL, 0);
+  }
   
   return(0);
 }
 
-