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

Example ExGarfield Test macro 1. More...

Go to the source code of this file.

Functions

void test_ExGarfield (const TString &configMacro)
 

Detailed Description

Example ExGarfield Test macro 1.

Running Example ExGarfield

Definition in file test_ExGarfield.C.

Function Documentation

◆ test_ExGarfield()

void test_ExGarfield ( const TString & configMacro)

Macro function for testing example ExGarfield

Parameters
configMacroconfiguration macro loaded in initialization

Run 10 events and print the calorimeter hits.

Definition at line 18 of file test_ExGarfield.C.

19{
20/// Macro function for testing example ExGarfield
21/// \param configMacro configuration macro loaded in initialization
22///
23/// Run 10 events and print the calorimeter hits.
24
25 // Create application if it does not yet exist
26 Bool_t needDelete = kFALSE;
27 if ( ! TVirtualMCApplication::Instance() ) {
28 new VMC::ExGarfield::MCApplication("ExampleExGarfield", "The example ExGarfield MC application");
29 needDelete = kTRUE;
30 }
31
32 // MC application
34 = (VMC::ExGarfield::MCApplication*)TVirtualMCApplication::Instance();
35 appl->InitMC(configMacro);
36
37 // visualization setting
38 // set_vis();
39
40 appl->RunMC(5);
41
42 if ( needDelete ) delete appl;
43}
Implementation of the TVirtualMCApplication.
void InitMC(const char *setup)