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 #ifndef G4APPLICATIONSTATE_H 00031 #define G4APPLICATIONSTATE_H 1 00032 00033 // Class Description: 00034 // 00035 // Specifies the state of the G4 application 00036 // 00037 // States: 00038 // G4State_PreInit 00039 // At the very begining of the Application. G4StateManager starts 00040 // with this state. G4Initializer changes this state to Init when 00041 // G4Initializer::Initialize() method starts. At the moment of 00042 // the state change of PreInit->Init, no material, geometrical, 00043 // particle or physics process has been initialized. 00044 // G4State_Init 00045 // During the G4Initializer::Initialize() method. G4Initializer 00046 // changes this state to Idle when all initialization procedures 00047 // are successfully Done. 00048 // G4State_Idle 00049 // Ready to start "BeamOn". G4RunManager changes this state to 00050 // GeomClosed when G4RunManager::BeamOn() method starts and 00051 // G4GeometryManager::CloseGeometry() is Done. At the end of 00052 // BeamOn() method, G4RunManager will reset the application state 00053 // to Idle after G4GeometryManager::OpenGeometry() is Done. 00054 // G4State_GeomClosed 00055 // G4 is in this state between G4GeometryManager::CloseGeometry() 00056 // and G4GeometryManager::OpenGeometry(), but no event is in 00057 // progress. At the begining of each event (construction of a 00058 // G4Event object and primary particle generation), G4RunManager 00059 // changes this state to EventProc and resets to GeomClosed state 00060 // when G4EventManager::ProcessOneEvent() is over. 00061 // G4State_EventProc 00062 // Processing an event. 00063 // G4State_Quit 00064 // G4 is in this state when the destructor of G4RunManager is invoked. 00065 // G4State_Abort 00066 // G4 is in this state when G4Exception is invoked. 00067 // 00068 // 00069 // PreInit 00070 // | 00071 // v 00072 // Init 00073 // | 00074 // v 00075 // Idle ------> Quit 00076 // |^ 00077 // v| 00078 // GeomClosed (at each run) 00079 // |^ 00080 // v| 00081 // EventProc (at each event) 00082 // 00083 00084 enum G4ApplicationState 00085 {G4State_PreInit, G4State_Init, G4State_Idle, G4State_GeomClosed, 00086 G4State_EventProc, G4State_Quit, G4State_Abort}; 00087 00088 #endif 00089