VMC Examples Version 6.6
Loading...
Searching...
No Matches
run_g4.C
Go to the documentation of this file.
1//------------------------------------------------
2// The Virtual Monte Carlo examples
3// Copyright (C) 2007 - 2014 Ivana Hrivnacova
4// All rights reserved.
5//
6// For the licensing terms see geant4_vmc/LICENSE.
7// Contact: root-vmc@cern.ch
8//-------------------------------------------------
9
10/// \ingroup E01
11/// \file E01/run_g4.C
12/// \brief Macro for running Example01 with Geant4.
13
14void run_g4(const TString& configMacro = "g4Config.C")
15{
16/// Macro function for running Example01 with Geant4 from
17/// Root interactive session.
18/// Note that since Root 6 the libraries have to be loaded first
19/// via load_g4.C.
20/// \param configMacro configuration macro name, default \ref E01/g4Config.C
21
22 // MC application
24 = new Ex01MCApplication("Example01", "The example01 MC application");
25
26 // Initialize MC
27 appl->InitMC(configMacro);
28
29 // Run MC
30 appl->RunMC(1);
31
32 delete appl;
33}
34
void run_g4(const TString &configMacro="g4Config.C")
Definition run_g4.C:16
Implementation of the TVirtualMCApplication.
void InitMC(const char *setup)
void RunMC(Int_t nofEvents)