VMC Examples Version 6.6
Loading...
Searching...
No Matches
test_E03_pl.C File Reference

Macro for running Example03 with Geant4. More...

Go to the source code of this file.

Functions

void test_E03_pl (const TString &configMacro="g4ConfigEnv.C")
 

Detailed Description

Macro for running Example03 with Geant4.

Definition in file test_E03_pl.C.

Function Documentation

◆ test_E03_pl()

void test_E03_pl ( const TString & configMacro = "g4ConfigEnv.C")

Macro function for running Example03 with Geant4 from Root interactive session

Parameters
configMacroconfiguration macro name, default E03/g4Config.C

Definition at line 14 of file test_E03_pl.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}
Ex03bMCApplication Ex03MCApplication
Implementation of the TVirtualMCApplication.
void InitMC(const char *setup)
void RunMC(Int_t nofEvents)