File indexing completed on 2025-01-18 09:58:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 #ifndef G4ErrorPropagatorData_hh
0037 #define G4ErrorPropagatorData_hh
0038
0039 #include "globals.hh"
0040
0041 enum G4ErrorMode
0042 {
0043 G4ErrorMode_PropForwards = 1,
0044 G4ErrorMode_PropBackwards,
0045 G4ErrorMode_PropTest
0046 };
0047
0048 enum G4ErrorState
0049 {
0050 G4ErrorState_PreInit = 1,
0051 G4ErrorState_Init,
0052 G4ErrorState_Propagating,
0053 G4ErrorState_TargetCloserThanBoundary,
0054 G4ErrorState_StoppedAtTarget
0055 };
0056
0057 enum G4ErrorStage
0058 {
0059 G4ErrorStage_Inflation = 1,
0060 G4ErrorStage_Deflation
0061 };
0062
0063 class G4ErrorTarget;
0064
0065 class G4ErrorPropagatorData
0066 {
0067 public:
0068 static G4ErrorPropagatorData* GetErrorPropagatorData();
0069
0070
0071 inline G4ErrorMode GetMode() const;
0072 inline void SetMode(G4ErrorMode mode);
0073
0074 inline G4ErrorState GetState() const;
0075 inline void SetState(G4ErrorState sta);
0076
0077 inline G4ErrorStage GetStage() const;
0078 inline void SetStage(G4ErrorStage sta);
0079
0080 inline const G4ErrorTarget* GetTarget(G4bool mustExist = false) const;
0081 inline void SetTarget(const G4ErrorTarget* target);
0082
0083 static G4int verbose();
0084 static void SetVerbose(G4int ver);
0085
0086 private:
0087 G4ErrorPropagatorData() = default;
0088 ~G4ErrorPropagatorData();
0089
0090
0091 private:
0092 static G4ThreadLocal G4ErrorPropagatorData* fpInstance;
0093
0094 G4ErrorMode theMode{G4ErrorMode_PropTest};
0095
0096 G4ErrorState theState{G4ErrorState_PreInit};
0097
0098 G4ErrorStage theStage{G4ErrorStage_Inflation};
0099
0100 G4ErrorTarget* theTarget = nullptr;
0101
0102 static G4ThreadLocal G4int theVerbosity;
0103 };
0104
0105 #include "G4ErrorPropagatorData.icc"
0106
0107 #endif