Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4RunManager.h
Go to the documentation of this file.
1#ifndef TG4_RUN_MANAGER_H
2#define TG4_RUN_MANAGER_H
3
4//------------------------------------------------
5// The Geant4 Virtual Monte Carlo package
6// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
17
18#include "TG4RunMessenger.h"
19#include "TG4Verbose.h"
20
21#include <globals.hh>
22
23#include <Rtypes.h>
24
28
29class G4RunManager;
30class G4UIExecutive;
31
32class TApplication;
33class TMCManager;
34
43
45{
46 public:
48 TG4RunConfiguration* configuration, int argc = 0, char** argv = 0);
49 virtual ~TG4RunManager();
50
51 // static access method
52 static TG4RunManager* Instance();
53
54 // methods
55 void Initialize();
56 void LateInitialize();
57 void CacheMCStack();
58 void ProcessEvent();
59 void ProcessEvent(G4int eventId, G4bool isInterruptible);
60 Bool_t ProcessRun(G4int nofEvents);
61 Bool_t FinishRun();
62
63 // get methods
64 Int_t CurrentEvent() const;
65 Bool_t SecondariesAreOrdered() const;
66
67 //
68 // methods for Geant4 only
69 //
70 void CreateGeantUI();
71 void StartGeantUI();
72 void StartRootUI();
73 void ProcessGeantMacro(G4String macroName);
74 void ProcessRootMacro(G4String macroName);
75 void ProcessGeantCommand(G4String command);
76 void ProcessRootCommand(G4String command);
77 void UseG3Defaults();
78 void UseRootRandom(G4bool useRootRandom);
79
81 void SetRandomSeed();
82 private:
89
90 // methods
93 void FilterARGV(const G4String& option);
94 void CreateRootUI();
95
96 // static data members
97
100
102 static G4ThreadLocal TG4RunManager* fgInstance;
103
104 // data members
105 G4RunManager* fRunManager;
109 G4UIExecutive* fGeantUISession;
110 TApplication* fRootUISession;
112 G4int fARGC;
113 char** fARGV;
117 G4int
120};
121
122// inline methods
123
125{
127 return fgInstance;
128}
129
130inline void TG4RunManager::UseRootRandom(G4bool useRootRandom)
131{
133 fUseRootRandom = useRootRandom;
134}
135
136#endif // TG4_RUN_MANAGER_H
Definition of the TG4RunMessenger class.
Definition of the TG4Verbose class.
Takes care of creating Geant4 user action classes using VMC.
Geant4 implementation of the TVirtualMC interface methods for access to Geant4 at run level.
void ProcessGeantCommand(G4String command)
void ConfigureRunManager()
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.
void SetRandomSeed()
picks up random seed from ROOT gRandom and propagates to Geant4
char ** fARGV
argv
Bool_t SecondariesAreOrdered() const
static TG4RunManager * Instance()
TG4VRegionsManager * fRegionsManager
regions manager
static TG4RunManager * fgMasterInstance
master instance
TApplication * fRootUISession
Root UI.
Int_t CurrentEvent() const
void UseRootRandom(G4bool useRootRandom)
void ProcessRootCommand(G4String command)
static G4ThreadLocal TG4RunManager * fgInstance
thread local instance
G4bool fRootUIOwner
ownership of Root UI
G4RunManager * fRunManager
G4RunManager.
TG4RunManager()
Not implemented.
G4UIExecutive * fGeantUISession
G4 UI.
G4bool fUseRootRandom
the option to use Root random number seed
TG4RunManager & operator=(const TG4RunManager &right)
Not implemented.
G4int fARGC
argc
void CloneRootNavigatorForWorker()
TG4RunConfiguration * fRunConfiguration
TG4RunConfiguration.
void ProcessRootMacro(G4String macroName)
void ProcessGeantMacro(G4String macroName)
Bool_t ProcessRun(G4int nofEvents)
TG4RunMessenger fMessenger
messenger
TG4RunManager(const TG4RunManager &right)
Not implemented.
void FilterARGV(const G4String &option)
G4bool fInProcessRun
flag while being in BeamOn
virtual ~TG4RunManager()
Messenger class that defines commands for TG4RunManager.
The manager class for G3 process controls.
Base class for mangers for converting VMC cuts in energy in G4 regions.
Base class for defining the verbose level and a common messenger.
Definition TG4Verbose.h:36