Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
@@ -23,20 +23,9 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4StateManager
//
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
//
// ---------------- G4StateManager ----------------
//
// Authors: G.Cosmo, M.Asai - November 1996
//
// -------------------------------------------------------------
//
// Class Description:
// Class description:
//
// Class responsible for handling and updating the running state
// of the Geant4 application during its different phases.
@@ -45,84 +34,81 @@
//
// States of Geant4 are defined in G4ApplicationState.
// -------------------------------------------------------------
// Authors: G.Cosmo, M.Asai - November 1996
// --------------------------------------------------------------------
#ifndef G4StateManager_hh
#define G4StateManager_hh 1
#ifndef G4StateManager_h
#define G4StateManager_h 1
#include <vector>
#include "G4Types.hh"
#include "G4String.hh"
#include "G4ApplicationState.hh"
#include "G4VStateDependent.hh"
#include "G4String.hh"
#include "G4Types.hh"
#include "G4VExceptionHandler.hh"
#include "G4VStateDependent.hh"
#include <vector>
class G4StateManager
{
public:
static G4StateManager* GetStateManager();
// The G4StateManager class is a singleton class and the pointer
// to the only one existing object can be obtained by this static
// method.
public: // with description
~G4StateManager();
static G4StateManager* GetStateManager();
// The G4StateManager class is a singleton class and the pointer
// to the only one existing object can be obtained by this static
// method.
G4StateManager(const G4StateManager&) = delete;
G4StateManager& operator=(const G4StateManager&) = delete;
G4bool operator==(const G4StateManager&) const = delete;
G4bool operator!=(const G4StateManager&) const = delete;
~G4StateManager();
const G4ApplicationState& GetCurrentState() const;
// Returns the current state
const G4ApplicationState& GetPreviousState() const;
// Returns the previous state
G4bool SetNewState(const G4ApplicationState& requestedState);
// Set Geant4 to a new state.
// In case the request is illegal, false will be returned
// and the state of Geant4 will not be changed
G4bool SetNewState(const G4ApplicationState& requestedState, const char* msg);
// Set Geant4 to a new state.
// In case the request is illegal, false will be returned
// and the state of Geant4 will not be changed.
// "msg" is the information associated to the state change
G4bool RegisterDependent(G4VStateDependent* aDependent,
G4bool bottom = false);
// Register a concrete class of G4VStateDependent.
// Registered concrete classes will be notified via
// G4VStateDependent::Notify() method when the state of Geant4 changes.
// False will be returned if registration fails
G4bool DeregisterDependent(G4VStateDependent* aDependent);
// Remove the registration.
// False will be returned if aDependent has not been registered
G4VStateDependent* RemoveDependent(const G4VStateDependent* aDependent);
// Remove the registration.
// Removed pointer is returned
G4String GetStateString(const G4ApplicationState& aState) const;
// Utility method which returns a string of the state name
const G4ApplicationState& GetCurrentState() const;
// Returns the current state
const G4ApplicationState& GetPreviousState() const;
// Returns the previous state
G4bool SetNewState(const G4ApplicationState& requestedState);
// Set Geant4 to a new state.
// In case the request is irregal, false will be returned
// and the state of Geant4 will not be changed.
G4bool SetNewState(const G4ApplicationState& requestedState,
const char* msg);
// Set Geant4 to a new state.
// In case the request is irregal, false will be returned
// and the state of Geant4 will not be changed.
// "msg" is information associating to this state change
G4bool RegisterDependent(G4VStateDependent* aDependent,G4bool bottom=false);
// Register a concrete class of G4VStateDependent.
// Registered concrete classes will be notified via
// G4VStateDependent::Notify() method when the state of Geant4 changes.
// False will be returned if registration fails.
G4bool DeregisterDependent(G4VStateDependent* aDependent);
// Remove the registration.
// False will be returned if aDependent has not been registered.
G4VStateDependent* RemoveDependent(const G4VStateDependent* aDependent);
// Remove the registration.
// Removed pointer is returned.
G4String GetStateString(const G4ApplicationState& aState) const;
// Utility method which returns a string of the state name.
inline void SetSuppressAbortion(G4int i);
inline G4int GetSuppressAbortion() const;
inline const char* GetMessage() const;
inline void SetExceptionHandler(G4VExceptionHandler* eh);
inline G4VExceptionHandler* GetExceptionHandler() const;
static void SetVerboseLevel(G4int val);
inline void SetSuppressAbortion(G4int i);
inline G4int GetSuppressAbortion() const;
inline const char* GetMessage() const;
inline void SetExceptionHandler(G4VExceptionHandler* eh);
inline G4VExceptionHandler* GetExceptionHandler() const;
static void SetVerboseLevel(G4int val);
private:
G4StateManager();
private:
G4StateManager();
G4StateManager(const G4StateManager &right);
G4StateManager& operator=(const G4StateManager &right);
G4bool operator==(const G4StateManager &right) const;
G4bool operator!=(const G4StateManager &right) const;
private:
static G4ThreadLocal G4StateManager* theStateManager;
G4ApplicationState theCurrentState;
G4ApplicationState thePreviousState;
std::vector<G4VStateDependent*> theDependentsList;
G4VStateDependent* theBottomDependent;
G4int suppressAbortion;
const char* msgptr;
G4VExceptionHandler* exceptionHandler;
static G4int verboseLevel;
private:
static G4ThreadLocal G4StateManager* theStateManager;
G4ApplicationState theCurrentState = G4State_PreInit;
G4ApplicationState thePreviousState = G4State_PreInit;
std::vector<G4VStateDependent*> theDependentsList;
G4VStateDependent* theBottomDependent = nullptr;
G4int suppressAbortion = 0;
const char* msgptr = nullptr;
G4VExceptionHandler* exceptionHandler = nullptr;
static G4int verboseLevel;
};
#include "G4StateManager.icc"