VMC Examples Version 6.6
Loading...
Searching...
No Matches
test_E03_pl.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 E03
11/// \file E03/test_E03_pl.C
12/// \brief Macro for running Example03 with Geant4.
13
14void test_E03_pl(const TString& configMacro = "g4ConfigEnv.C")
15{
16/// Macro function for running Example03 with Geant4 from
17/// Root interactive session
18/// \param configMacro configuration macro name, default \ref E03/g4Config.C
19
20 // Create application if it does not yet exist
21 Bool_t needDelete = kFALSE;
22 if ( ! TVirtualMCApplication::Instance() ) {
23 new Ex03MCApplication("Example03", "The example03 MC application");
24 needDelete = kTRUE;
25 }
26
27 // MC application
29 = (Ex03MCApplication*)TVirtualMCApplication::Instance();
30 appl->InitMC(configMacro);
31
32 appl->RunMC(1);
33
34 if ( needDelete ) delete appl;
35}
36
Ex03bMCApplication Ex03MCApplication
Implementation of the TVirtualMCApplication.
void InitMC(const char *setup)
void RunMC(Int_t nofEvents)
void test_E03_pl(const TString &configMacro="g4ConfigEnv.C")
Definition test_E03_pl.C:14