ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4StateManager.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4StateManager.hh
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
//
27
//
28
//
29
// ------------------------------------------------------------
30
// GEANT 4 class header file
31
//
32
//
33
// ---------------- G4StateManager ----------------
34
//
35
// Authors: G.Cosmo, M.Asai - November 1996
36
//
37
// -------------------------------------------------------------
38
//
39
// Class Description:
40
//
41
// Class responsible for handling and updating the running state
42
// of the Geant4 application during its different phases.
43
// The class is a singleton, it can be accessed via the public
44
// method G4StateManager::GetStateManager().
45
//
46
// States of Geant4 are defined in G4ApplicationState.
47
48
// -------------------------------------------------------------
49
50
#ifndef G4StateManager_h
51
#define G4StateManager_h 1
52
53
#include <vector>
54
#include "
G4Types.hh
"
55
#include "
G4String.hh
"
56
#include "
G4ApplicationState.hh
"
57
#include "
G4VStateDependent.hh
"
58
#include "
G4VExceptionHandler.hh
"
59
60
class
G4StateManager
61
{
62
63
public
:
// with description
64
65
static
G4StateManager
*
GetStateManager
();
66
// The G4StateManager class is a singleton class and the pointer
67
// to the only one existing object can be obtained by this static
68
// method.
69
70
~G4StateManager
();
71
72
const
G4ApplicationState
&
GetCurrentState
()
const
;
73
// Returns the current state
74
const
G4ApplicationState
&
GetPreviousState
()
const
;
75
// Returns the previous state
76
G4bool
SetNewState
(
const
G4ApplicationState
& requestedState);
77
// Set Geant4 to a new state.
78
// In case the request is irregal, false will be returned
79
// and the state of Geant4 will not be changed.
80
G4bool
SetNewState
(
const
G4ApplicationState
& requestedState,
81
const
char
* msg);
82
// Set Geant4 to a new state.
83
// In case the request is irregal, false will be returned
84
// and the state of Geant4 will not be changed.
85
// "msg" is information associating to this state change
86
G4bool
RegisterDependent
(
G4VStateDependent
* aDependent,
G4bool
bottom=
false
);
87
// Register a concrete class of G4VStateDependent.
88
// Registered concrete classes will be notified via
89
// G4VStateDependent::Notify() method when the state of Geant4 changes.
90
// False will be returned if registration fails.
91
G4bool
DeregisterDependent
(
G4VStateDependent
* aDependent);
92
// Remove the registration.
93
// False will be returned if aDependent has not been registered.
94
G4VStateDependent
*
RemoveDependent
(
const
G4VStateDependent
* aDependent);
95
// Remove the registration.
96
// Removed pointer is returned.
97
G4String
GetStateString
(
const
G4ApplicationState
& aState)
const
;
98
// Utility method which returns a string of the state name.
99
100
inline
void
SetSuppressAbortion
(
G4int
i);
101
inline
G4int
GetSuppressAbortion
()
const
;
102
inline
const
char
*
GetMessage
()
const
;
103
inline
void
SetExceptionHandler
(
G4VExceptionHandler
* eh);
104
inline
G4VExceptionHandler
*
GetExceptionHandler
()
const
;
105
static
void
SetVerboseLevel
(
G4int
val);
106
107
private
:
108
109
G4StateManager
();
110
G4StateManager
(
const
G4StateManager
&
right
);
111
G4StateManager
&
operator=
(
const
G4StateManager
&right);
112
G4bool
operator==
(
const
G4StateManager
&right)
const
;
113
G4bool
operator!=
(
const
G4StateManager
&right)
const
;
114
115
private
:
116
117
static
G4ThreadLocal
G4StateManager
*
theStateManager
;
118
G4ApplicationState
theCurrentState
;
119
G4ApplicationState
thePreviousState
;
120
std::vector<G4VStateDependent*>
theDependentsList
;
121
G4VStateDependent
*
theBottomDependent
;
122
G4int
suppressAbortion
;
123
const
char
*
msgptr
;
124
G4VExceptionHandler
*
exceptionHandler
;
125
static
G4int
verboseLevel
;
126
};
127
128
#include "G4StateManager.icc"
129
130
#endif
geant4
tree
geant4-10.6-release
source
global
management
include
G4StateManager.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:21
using
1.8.2 with
ECCE GitHub integration