]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ALIROOT/aliroot.cxx
extra tokens at end of #include directive
[u/mrichter/AliRoot.git] / ALIROOT / aliroot.cxx
CommitLineData
4c039060 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
803d1ab0 16/* $Id$ */
4c039060 17
fe4da5cc 18//////////////////////////////////////////////////////////////////////////
19// //
20// aliroot //
21// //
22// Main program used to create aliroot application. //
23// //
24// //
25// To be able to communicate between the FORTRAN code of GEANT and the //
26// ROOT data structure, a number of interface routines have been //
27// developed. //
28//Begin_Html
29/*
1439f98e 30<img src="picts/newg.gif">
fe4da5cc 31*/
32//End_Html
33//////////////////////////////////////////////////////////////////////////
34
35//Standard Root includes
36#include <TROOT.h>
37#include <TRint.h>
38#include <TFile.h>
39#include <AliRun.h>
bc5ed32d 40#include "Riostream.h"
41#include "ARVersion.h"
fe4da5cc 42
43#if defined __linux
44//On linux Fortran wants this, so we give to it!
45int xargv=0;
46int xargc=0;
47#endif
48
6a612904 49#ifdef FORTRAN_G95
50extern "C" void g95_runtime_start();
51#endif
52
fe4da5cc 53#if defined WIN32
54 extern "C" int __fastflag=0;
55 extern "C" int _pctype=0;
56 extern "C" int __mb_cur_max=0;
57#endif
58
fe4da5cc 59//_____________________________________________________________________________
60int main(int argc, char **argv)
61{
62 //
63 // gAlice main program.
64 // It creates the main Geant3 and AliRun objects.
65 //
66 // The Hits are written out after each track in a ROOT Tree structure TreeH,
67 // of the file galice.root. There is one such tree per event. The kinematics
68 // of all the particles that produce hits, together with their genealogy up
69 // to the primary tracks is stared in the galice.root file in an other tree
70 // TreeK of which exists one per event. Finally the information of the events
71 // in the run is stored in the same file in the tree TreeE, containing the
72 // run and event number, the number of vertices, tracks and primary tracks
73 // in the event.
fe4da5cc 74
bc5ed32d 75 for ( int i = 1; i < argc; ++i )
76 {
77 TString argument(argv[i]);
78
79 if (argument=="--version")
80 {
81 cout << "aliroot " << ALIROOT_SVN_REVISION << " " << ALIROOT_SVN_BRANCH << endl;
82 return 0;
83 }
84 }
85
9e1a0ddb 86 // Create new configuration
9e1a0ddb 87
88 new AliRun("gAlice","The ALICE Off-line Simulation Framework");
89
fe4da5cc 90 // Start interactive geant
91
4a87c8b6 92 TRint *theApp = new TRint("aliroot", &argc, argv);
6a612904 93#ifdef FORTRAN_G95
94 g95_runtime_start();
95#endif
fe4da5cc 96
27f3d82e 97 // --- Start the event loop ---
fe4da5cc 98 theApp->Run();
99
fe4da5cc 100 return(0);
101}
fe4da5cc 102