00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // $Id$ 00028 // 00029 // 00030 // -------------------------------------------------------------------- 00031 // GEANT 4 class header file 00032 // -------------------------------------------------------------------- 00033 // 00034 // Class Description: 00035 // 00036 // Utility class to provide access to mode, state, target 00037 // and manager verbosity for the error propagation classes. 00038 00039 // - Created. P.Arce, 2004. 00040 // -------------------------------------------------------------------- 00041 00042 #ifndef G4ErrorPropagatorData_HH 00043 #define G4ErrorPropagatorData_HH 00044 00045 #include "globals.hh" 00046 00047 enum G4ErrorMode { G4ErrorMode_PropForwards = 1, 00048 G4ErrorMode_PropBackwards, 00049 G4ErrorMode_PropTest }; 00050 00051 enum G4ErrorState { G4ErrorState_PreInit = 1, 00052 G4ErrorState_Init, 00053 G4ErrorState_Propagating, 00054 G4ErrorState_TargetCloserThanBoundary, 00055 G4ErrorState_StoppedAtTarget }; 00056 00057 enum G4ErrorStage { G4ErrorStage_Inflation = 1, 00058 G4ErrorStage_Deflation }; 00059 00060 class G4ErrorTarget; 00061 00062 class G4ErrorPropagatorData 00063 { 00064 00065 public: // with description 00066 00067 static G4ErrorPropagatorData* GetErrorPropagatorData(); 00068 // Singleton instance 00069 00070 // Get and Set methods 00071 G4ErrorMode GetMode() const; 00072 void SetMode( G4ErrorMode mode ); 00073 00074 G4ErrorState GetState() const; 00075 void SetState( G4ErrorState sta ); 00076 00077 G4ErrorStage GetStage() const; 00078 void SetStage( G4ErrorStage sta ); 00079 00080 const G4ErrorTarget* GetTarget( G4bool mustExist = 0) const; 00081 void SetTarget( const G4ErrorTarget* target ); 00082 00083 static G4int verbose(); 00084 static void SetVerbose( G4int ver ); 00085 00086 00087 private: 00088 00089 G4ErrorPropagatorData(); 00090 ~G4ErrorPropagatorData(); 00091 // constructor and destructor are private 00092 00093 private: 00094 00095 static G4ErrorPropagatorData* theErrorPropagatorData; 00096 00097 G4ErrorMode theMode; 00098 00099 G4ErrorState theState; 00100 00101 G4ErrorStage theStage; 00102 00103 G4ErrorTarget* theTarget; 00104 00105 static G4int theVerbosity; 00106 00107 }; 00108 00109 #include "G4ErrorPropagatorData.icc" 00110 00111 #endif