Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4RunManager Class Reference

Geant4 implementation of the TVirtualMC interface methods for access to Geant4 at run level. More...

#include <TG4RunManager.h>

Inheritance diagram for TG4RunManager:

Public Member Functions

 TG4RunManager (TG4RunConfiguration *configuration, int argc=0, char **argv=0)
 
virtual ~TG4RunManager ()
 
void Initialize ()
 
void LateInitialize ()
 
void CacheMCStack ()
 
void ProcessEvent ()
 
void ProcessEvent (G4int eventId, G4bool isInterruptible)
 
Bool_t ProcessRun (G4int nofEvents)
 
Bool_t FinishRun ()
 
Int_t CurrentEvent () const
 
Bool_t SecondariesAreOrdered () const
 
void CreateGeantUI ()
 
void StartGeantUI ()
 
void StartRootUI ()
 
void ProcessGeantMacro (G4String macroName)
 
void ProcessRootMacro (G4String macroName)
 
void ProcessGeantCommand (G4String command)
 
void ProcessRootCommand (G4String command)
 
void UseG3Defaults ()
 
void UseRootRandom (G4bool useRootRandom)
 
void SetRandomSeed ()
 picks up random seed from ROOT gRandom and propagates to Geant4
 
- Public Member Functions inherited from TG4Verbose
 TG4Verbose (const G4String &cmdName)
 
 TG4Verbose (const G4String &cmdName, G4int verboseLevel)
 
virtual ~TG4Verbose ()
 
virtual void VerboseLevel (G4int level)
 
virtual G4int VerboseLevel () const
 

Static Public Member Functions

static TG4RunManagerInstance ()
 

Private Member Functions

 TG4RunManager ()
 Not implemented.
 
 TG4RunManager (const TG4RunManager &right)
 Not implemented.
 
TG4RunManageroperator= (const TG4RunManager &right)
 Not implemented.
 
void ConfigureRunManager ()
 
void CloneRootNavigatorForWorker ()
 
void FilterARGV (const G4String &option)
 
void CreateRootUI ()
 

Private Attributes

G4RunManager * fRunManager
 G4RunManager.
 
TG4RunMessenger fMessenger
 messenger
 
TG4RunConfigurationfRunConfiguration
 TG4RunConfiguration.
 
TG4VRegionsManagerfRegionsManager
 regions manager
 
G4UIExecutive * fGeantUISession
 G4 UI.
 
TApplication * fRootUISession
 Root UI.
 
G4bool fRootUIOwner
 ownership of Root UI
 
G4int fARGC
 argc
 
char ** fARGV
 argv
 
G4bool fUseRootRandom
 the option to use Root random number seed
 
G4bool fIsMCStackCached
 the flag to cache MC stack only once
 
G4bool fHasEventByEventInitialization
 Flag event-by-event processing.
 
G4int fNEventsProcessed
 Number of events processed in event-by-event mode.
 
G4bool fInProcessRun
 flag while being in BeamOn
 

Static Private Attributes

static TG4RunManagerfgMasterInstance = 0
 master instance
 
static G4ThreadLocal TG4RunManagerfgInstance = 0
 thread local instance
 

Detailed Description

Geant4 implementation of the TVirtualMC interface methods for access to Geant4 at run level.

It provides also methods for switching between Geant4 and Root UIs.

Author
I. Hrivnacova; IPN, Orsay

Definition at line 44 of file TG4RunManager.h.

Constructor & Destructor Documentation

◆ TG4RunManager() [1/3]

TG4RunManager::TG4RunManager ( TG4RunConfiguration * configuration,
int argc = 0,
char ** argv = 0 )

Standard constructor

Definition at line 84 of file TG4RunManager.cxx.

◆ ~TG4RunManager()

TG4RunManager::~TG4RunManager ( )
virtual

Destructor

Definition at line 153 of file TG4RunManager.cxx.

◆ TG4RunManager() [2/3]

TG4RunManager::TG4RunManager ( )
private

Not implemented.

◆ TG4RunManager() [3/3]

TG4RunManager::TG4RunManager ( const TG4RunManager & right)
private

Not implemented.

Member Function Documentation

◆ Instance()

TG4RunManager * TG4RunManager::Instance ( )
inlinestatic

Return this instance

Definition at line 124 of file TG4RunManager.h.

Referenced by TG4PrimaryGeneratorAction::GeneratePrimaries(), and TG4WorkerInitialization::WorkerRunStart().

◆ Initialize()

void TG4RunManager::Initialize ( )

Initialize G4.

Definition at line 407 of file TG4RunManager.cxx.

Referenced by TGeant4::Init().

◆ LateInitialize()

void TG4RunManager::LateInitialize ( )

Finish initialization of G4 after the G4Run initialization is finished.

Definition at line 436 of file TG4RunManager.cxx.

Referenced by TGeant4::BuildPhysics(), and TG4WorkerInitialization::WorkerRunStart().

◆ CacheMCStack()

void TG4RunManager::CacheMCStack ( )

Cache the pointer to thread-local VMC stack

Definition at line 497 of file TG4RunManager.cxx.

Referenced by TG4PrimaryGeneratorAction::GeneratePrimaries().

◆ ProcessEvent() [1/2]

void TG4RunManager::ProcessEvent ( )

Process one event using internal event counter

Definition at line 530 of file TG4RunManager.cxx.

Referenced by ProcessEvent(), TGeant4::ProcessEvent(), TGeant4::ProcessEvent(), and TGeant4::ProcessEvent().

◆ ProcessEvent() [2/2]

void TG4RunManager::ProcessEvent ( G4int eventId,
G4bool isInterruptible )

Process one event using event ID given as argument

Definition at line 538 of file TG4RunManager.cxx.

◆ ProcessRun()

Bool_t TG4RunManager::ProcessRun ( G4int nofEvents)

Process Geant4 run.

Definition at line 563 of file TG4RunManager.cxx.

Referenced by TGeant4::ProcessRun().

◆ FinishRun()

Bool_t TG4RunManager::FinishRun ( )

Definition at line 581 of file TG4RunManager.cxx.

Referenced by TGeant4::FinishRun(), and ProcessRun().

◆ CurrentEvent()

Int_t TG4RunManager::CurrentEvent ( ) const

Return the number of the current event.

Definition at line 718 of file TG4RunManager.cxx.

Referenced by TGeant4::CurrentEvent().

◆ SecondariesAreOrdered()

Bool_t TG4RunManager::SecondariesAreOrdered ( ) const

Since transition to G4SmartTrackStack in Geant4 9.6.x secondaries are not ordered even when the special stacking is activated.

Definition at line 727 of file TG4RunManager.cxx.

Referenced by TGeant4::SecondariesAreOrdered().

◆ CreateGeantUI()

void TG4RunManager::CreateGeantUI ( )

Create interactive Geant4.

Definition at line 608 of file TG4RunManager.cxx.

Referenced by TGeant4::Init(), and StartGeantUI().

◆ StartGeantUI()

void TG4RunManager::StartGeantUI ( )

Start interactive/batch Geant4.

Definition at line 619 of file TG4RunManager.cxx.

Referenced by TGeant4::StartGeantUI().

◆ StartRootUI()

void TG4RunManager::StartRootUI ( )

Start interactive Root.

Definition at line 637 of file TG4RunManager.cxx.

Referenced by TG4RunMessenger::SetNewValue(), and TGeant4::StartRootUI().

◆ ProcessGeantMacro()

void TG4RunManager::ProcessGeantMacro ( G4String macroName)

Process Geant4 macro.

Definition at line 650 of file TG4RunManager.cxx.

Referenced by TGeant4::ProcessGeantMacro().

◆ ProcessRootMacro()

void TG4RunManager::ProcessRootMacro ( G4String macroName)

Process Root macro.

Definition at line 659 of file TG4RunManager.cxx.

Referenced by TG4RunMessenger::SetNewValue().

◆ ProcessGeantCommand()

void TG4RunManager::ProcessGeantCommand ( G4String command)

Process Geant4 command.

Definition at line 675 of file TG4RunManager.cxx.

Referenced by TGeant4::ProcessGeantCommand(), and ProcessGeantMacro().

◆ ProcessRootCommand()

void TG4RunManager::ProcessRootCommand ( G4String command)

Process Root command.

Definition at line 701 of file TG4RunManager.cxx.

Referenced by TG4RunMessenger::SetNewValue().

◆ UseG3Defaults()

void TG4RunManager::UseG3Defaults ( )

Control G3 defaults usage.

Definition at line 709 of file TG4RunManager.cxx.

Referenced by TG4RunMessenger::SetNewValue().

◆ UseRootRandom()

void TG4RunManager::UseRootRandom ( G4bool useRootRandom)
inline

Set the option whether to use Root random number seed

Definition at line 130 of file TG4RunManager.h.

Referenced by TG4RunMessenger::SetNewValue().

◆ SetRandomSeed()

void TG4RunManager::SetRandomSeed ( )

picks up random seed from ROOT gRandom and propagates to Geant4

Pass the random number seed from gRandom to Geant4 random number generator

Definition at line 392 of file TG4RunManager.cxx.

Referenced by LateInitialize(), and TGeant4::SetRandomSeed().

◆ operator=()

TG4RunManager & TG4RunManager::operator= ( const TG4RunManager & right)
private

Not implemented.

◆ ConfigureRunManager()

void TG4RunManager::ConfigureRunManager ( )
private

Set the user action classes defined by TG4RunConfiguration to G4RunManager.

Definition at line 175 of file TG4RunManager.cxx.

Referenced by TG4RunManager().

◆ CloneRootNavigatorForWorker()

void TG4RunManager::CloneRootNavigatorForWorker ( )
private

Definition at line 311 of file TG4RunManager.cxx.

Referenced by TG4RunManager().

◆ FilterARGV()

void TG4RunManager::FilterARGV ( const G4String & option)
private

Filter out the option argument from the arguments list fARGV, if present.

Definition at line 375 of file TG4RunManager.cxx.

Referenced by CreateRootUI().

◆ CreateRootUI()

void TG4RunManager::CreateRootUI ( )
private

Get/Create Root interactive session

Definition at line 340 of file TG4RunManager.cxx.

Referenced by StartRootUI().

Member Data Documentation

◆ fgMasterInstance

TG4RunManager * TG4RunManager::fgMasterInstance = 0
staticprivate

master instance

Definition at line 99 of file TG4RunManager.h.

Referenced by TG4RunManager(), and ~TG4RunManager().

◆ fgInstance

G4ThreadLocal TG4RunManager * TG4RunManager::fgInstance = 0
staticprivate

thread local instance

this instance

Definition at line 102 of file TG4RunManager.h.

Referenced by Instance(), TG4RunManager(), and ~TG4RunManager().

◆ fRunManager

G4RunManager* TG4RunManager::fRunManager
private

◆ fMessenger

TG4RunMessenger TG4RunManager::fMessenger
private

messenger

Definition at line 106 of file TG4RunManager.h.

◆ fRunConfiguration

TG4RunConfiguration* TG4RunManager::fRunConfiguration
private

◆ fRegionsManager

TG4VRegionsManager* TG4RunManager::fRegionsManager
private

regions manager

Definition at line 108 of file TG4RunManager.h.

Referenced by ConfigureRunManager(), LateInitialize(), TG4RunManager(), and ~TG4RunManager().

◆ fGeantUISession

G4UIExecutive* TG4RunManager::fGeantUISession
private

G4 UI.

Definition at line 109 of file TG4RunManager.h.

Referenced by CreateGeantUI(), StartGeantUI(), TG4RunManager(), and ~TG4RunManager().

◆ fRootUISession

TApplication* TG4RunManager::fRootUISession
private

Root UI.

Definition at line 110 of file TG4RunManager.h.

Referenced by CreateRootUI(), StartRootUI(), TG4RunManager(), and ~TG4RunManager().

◆ fRootUIOwner

G4bool TG4RunManager::fRootUIOwner
private

ownership of Root UI

Definition at line 111 of file TG4RunManager.h.

Referenced by CreateRootUI(), and ~TG4RunManager().

◆ fARGC

G4int TG4RunManager::fARGC
private

argc

Definition at line 112 of file TG4RunManager.h.

Referenced by CreateGeantUI(), CreateRootUI(), FilterARGV(), and TG4RunManager().

◆ fARGV

char** TG4RunManager::fARGV
private

argv

Definition at line 113 of file TG4RunManager.h.

Referenced by CreateGeantUI(), CreateRootUI(), FilterARGV(), and TG4RunManager().

◆ fUseRootRandom

G4bool TG4RunManager::fUseRootRandom
private

the option to use Root random number seed

Definition at line 114 of file TG4RunManager.h.

Referenced by LateInitialize(), and UseRootRandom().

◆ fIsMCStackCached

G4bool TG4RunManager::fIsMCStackCached
private

the flag to cache MC stack only once

Definition at line 115 of file TG4RunManager.h.

Referenced by CacheMCStack().

◆ fHasEventByEventInitialization

G4bool TG4RunManager::fHasEventByEventInitialization
private

Flag event-by-event processing.

Definition at line 116 of file TG4RunManager.h.

Referenced by FinishRun(), ProcessEvent(), and ProcessRun().

◆ fNEventsProcessed

G4int TG4RunManager::fNEventsProcessed
private

Number of events processed in event-by-event mode.

Definition at line 118 of file TG4RunManager.h.

Referenced by FinishRun(), ProcessEvent(), and ProcessRun().

◆ fInProcessRun

G4bool TG4RunManager::fInProcessRun
private

flag while being in BeamOn

Definition at line 119 of file TG4RunManager.h.

Referenced by FinishRun(), and ProcessRun().


The documentation for this class was generated from the following files: