]>
Commit | Line | Data |
---|---|---|
676fb573 | 1 | // $Id$ |
2 | ||
3 | #include "AliRunConfiguration.h" | |
4 | #include "AliFiles.h" | |
5 | #include "AliRun.h" | |
6 | ||
7 | #include "TGeant4.h" | |
8 | #include "TG4RunManager.h" | |
9 | ||
10 | #include <TROOT.h> | |
11 | #include <TRint.h> | |
12 | ||
13 | extern void InitGui(); | |
14 | ||
5f1d09c5 | 15 | #include <globals.hh> |
676fb573 | 16 | |
17 | int main(int argc, char** argv) | |
18 | { | |
19 | // ROOT =================== | |
20 | #ifdef G4VIS_USE_OPACS | |
21 | // Root graphics does not work when OPACS graphics is build | |
22 | TROOT aTROOT("Alice","Alice G4 prototype Root I/O"); | |
23 | #else | |
24 | VoidFuncPtr_t initfuncs[] = { InitGui, 0 }; | |
25 | TROOT aTROOT("Alice","Alice G4 prototype Root I/O",initfuncs); | |
26 | #endif | |
27 | ||
28 | // ALICE ====================== | |
29 | ||
30 | // AliRun | |
31 | AliRun* run | |
32 | = new AliRun("gAlice","The Alice run manager"); | |
5f1d09c5 | 33 | G4cout << "AliRun has been created." << G4endl; |
676fb573 | 34 | |
35 | // AliRunConfiguration for Geant4 | |
36 | AliRunConfiguration* runConfiguration | |
37 | = new AliRunConfiguration(); | |
5f1d09c5 | 38 | G4cout << "AliRunConfiguration has been created." << G4endl; |
676fb573 | 39 | |
40 | // Geant4 ====================== | |
41 | ||
42 | // TGeant4 | |
43 | TGeant4* geant4 | |
44 | = new TGeant4("TGeant4", "The Geant4 Monte Carlo", | |
45 | runConfiguration, argc, argv ); | |
5f1d09c5 | 46 | G4cout << "TGeant4 has been created." << G4endl; |
676fb573 | 47 | |
48 | // start UI =================== | |
49 | ||
50 | TG4RunManager* runManager = TG4RunManager::Instance(); | |
51 | ||
52 | // Root interactive session | |
53 | //runManager->StartRootUI(); | |
54 | ||
55 | // Geant4 interactive session | |
56 | runManager->StartGeantUI(); | |
57 | ||
58 | delete run; | |
59 | //runConfiguration is deleted in TG4RunManager | |
60 | //geant4 is deleted in AliRun destructor | |
61 | ||
5f1d09c5 | 62 | G4cout << "Everything has been deleted." << G4endl; |
676fb573 | 63 | return 0; |
64 | } | |
65 |