3 #include "AliRunConfiguration.h"
8 #include "TG4RunManager.h"
13 extern void InitGui();
17 int main(int argc, char** argv)
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");
24 VoidFuncPtr_t initfuncs[] = { InitGui, 0 };
25 TROOT aTROOT("Alice","Alice G4 prototype Root I/O",initfuncs);
28 // ALICE ======================
32 = new AliRun("gAlice","The Alice run manager");
33 G4cout << "AliRun has been created." << G4endl;
35 // AliRunConfiguration for Geant4
36 AliRunConfiguration* runConfiguration
37 = new AliRunConfiguration();
38 G4cout << "AliRunConfiguration has been created." << G4endl;
40 // Geant4 ======================
44 = new TGeant4("TGeant4", "The Geant4 Monte Carlo",
45 runConfiguration, argc, argv );
46 G4cout << "TGeant4 has been created." << G4endl;
48 // start UI ===================
50 TG4RunManager* runManager = TG4RunManager::Instance();
52 // Root interactive session
53 //runManager->StartRootUI();
55 // Geant4 interactive session
56 runManager->StartGeantUI();
59 //runConfiguration is deleted in TG4RunManager
60 //geant4 is deleted in AliRun destructor
62 G4cout << "Everything has been deleted." << G4endl;