[833] | 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 | // |
---|
[1193] | 27 | // $Id: G4ErrorPropagatorData.hh,v 1.5 2009/05/19 13:31:47 gcosmo Exp $ |
---|
[1228] | 28 | // GEANT4 tag $Name: geant4-09-03 $ |
---|
[833] | 29 | // |
---|
| 30 | // |
---|
| 31 | // -------------------------------------------------------------------- |
---|
| 32 | // GEANT 4 class header file |
---|
| 33 | // -------------------------------------------------------------------- |
---|
| 34 | // |
---|
| 35 | // Class Description: |
---|
| 36 | // |
---|
| 37 | // Utility class to provide access to mode, state, target |
---|
| 38 | // and manager verbosity for the error propagation classes. |
---|
| 39 | |
---|
| 40 | // - Created. P.Arce, 2004. |
---|
| 41 | // -------------------------------------------------------------------- |
---|
| 42 | |
---|
| 43 | #ifndef G4ErrorPropagatorData_HH |
---|
| 44 | #define G4ErrorPropagatorData_HH |
---|
| 45 | |
---|
| 46 | #include "globals.hh" |
---|
| 47 | |
---|
| 48 | enum G4ErrorMode { G4ErrorMode_PropForwards = 1, |
---|
| 49 | G4ErrorMode_PropBackwards, |
---|
| 50 | G4ErrorMode_PropTest }; |
---|
| 51 | |
---|
| 52 | enum G4ErrorState { G4ErrorState_PreInit = 1, |
---|
| 53 | G4ErrorState_Init, |
---|
| 54 | G4ErrorState_Propagating, |
---|
| 55 | G4ErrorState_TargetCloserThanBoundary, |
---|
| 56 | G4ErrorState_StoppedAtTarget }; |
---|
[1193] | 57 | |
---|
| 58 | enum G4ErrorStage { G4ErrorStage_Inflation = 1, |
---|
| 59 | G4ErrorStage_Deflation }; |
---|
| 60 | |
---|
[833] | 61 | class G4ErrorTarget; |
---|
| 62 | |
---|
| 63 | class G4ErrorPropagatorData |
---|
| 64 | { |
---|
| 65 | |
---|
| 66 | public: // with description |
---|
| 67 | |
---|
| 68 | static G4ErrorPropagatorData* GetErrorPropagatorData(); |
---|
| 69 | // Singleton instance |
---|
| 70 | |
---|
| 71 | // Get and Set methods |
---|
| 72 | G4ErrorMode GetMode() const; |
---|
| 73 | void SetMode( G4ErrorMode mode ); |
---|
| 74 | |
---|
| 75 | G4ErrorState GetState() const; |
---|
| 76 | void SetState( G4ErrorState sta ); |
---|
| 77 | |
---|
[1193] | 78 | G4ErrorStage GetStage() const; |
---|
| 79 | void SetStage( G4ErrorStage sta ); |
---|
| 80 | |
---|
[833] | 81 | const G4ErrorTarget* GetTarget( G4bool mustExist = 0) const; |
---|
| 82 | void SetTarget( const G4ErrorTarget* target ); |
---|
| 83 | |
---|
| 84 | static G4int verbose(); |
---|
| 85 | static void SetVerbose( G4int ver ); |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | private: |
---|
| 89 | |
---|
| 90 | G4ErrorPropagatorData(); |
---|
| 91 | ~G4ErrorPropagatorData(); |
---|
| 92 | // constructor and destructor are private |
---|
| 93 | |
---|
| 94 | private: |
---|
| 95 | |
---|
| 96 | static G4ErrorPropagatorData* theErrorPropagatorData; |
---|
| 97 | |
---|
| 98 | G4ErrorMode theMode; |
---|
| 99 | |
---|
| 100 | G4ErrorState theState; |
---|
| 101 | |
---|
[1193] | 102 | G4ErrorStage theStage; |
---|
| 103 | |
---|
[833] | 104 | G4ErrorTarget* theTarget; |
---|
| 105 | |
---|
| 106 | static G4int theVerbosity; |
---|
| 107 | |
---|
| 108 | }; |
---|
| 109 | |
---|
| 110 | #include "G4ErrorPropagatorData.icc" |
---|
| 111 | |
---|
| 112 | #endif |
---|