00001 //! \file 00002 //! 00003 //! Header file for Gem_Tracker messenger class. 00004 //! 00005 //! Declares the singleton messenger class and its member routines which 00006 //! control the parameters of Gem_Tracker detector within the OLYMPUS 00007 //! Monte Carlo. This allow the user to control the parameters and/or 00008 //! running from command files or interactively. 00009 //! 00010 //! \author D.K. Hasell 00011 //! \version 1.0 00012 //! \date 2010-10-17 00013 //! 00014 //! \ingroup control 00015 00016 // Ensure header file is included only once. 00017 00018 #ifndef GT_MESSENGER_H 00019 #define GT_MESSENGER_H 00020 00021 // Include the GEANT4 header files referenced in this file. 00022 00023 #include "G4UImessenger.hh" 00024 #include "G4UIcommand.hh" 00025 #include "G4UIdirectory.hh" 00026 #include "G4UIcmdWithADoubleAndUnit.hh" 00027 #include "G4UIcmdWithoutParameter.hh" 00028 00029 // Declare the classes referenced here. 00030 00031 class GT_SD; 00032 00033 //! Declare the Messenger class based on G4UImessenger. 00034 00035 class GT_Messenger : public G4UImessenger { 00036 00037 public: 00038 00039 //! Routine to return a pointer to the single instance of GT_Messenger. 00040 00041 static GT_Messenger * Instance(); 00042 00043 //! Routine to set a pointer to the GT_SD class and define the user 00044 //! functions available. 00045 00046 void setGT_SDptr( GT_SD * ); 00047 00048 //! Routines to set new values and get current values. 00049 00050 void SetNewValue( G4UIcommand * command, G4String newValues ); 00051 00052 //! Routine to get current value (not used). 00053 00054 G4String GetCurrentValue( G4UIcommand * command ); 00055 00056 //! These routines are kept private to preserve singleton class. 00057 00058 private: 00059 00060 //! Constructor. 00061 00062 GT_Messenger(); 00063 00064 //! Copy constructor. 00065 00066 GT_Messenger( GT_Messenger const & ) {} 00067 00068 //! Assignment operator. 00069 00070 GT_Messenger & operator = ( GT_Messenger const & ); 00071 00072 //! Data members of GT_Messenger class. 00073 00074 private: 00075 00076 static GT_Messenger * m_pInstance; //!< Instance of GT_Messenger class. 00077 00078 G4UIdirectory * GTdir; //!< Pointer to GT UI structure. 00079 00080 GT_SD * pGT_SD; //!< Pointer to GT_SD class. 00081 G4UIdirectory * GT_SDdir; //!< Pointer to GT_SD UI structure. 00082 00083 G4UIcmdWithADoubleAndUnit * GT_SDsetThreshold; //!< Set threshold. 00084 G4UIcmdWithoutParameter * GT_SDgetThreshold; //!< Get threshold. 00085 G4UIcmdWithADoubleAndUnit * GT_SDsetXresol; //!< Set X resolution. 00086 G4UIcmdWithoutParameter * GT_SDgetXresol; //!< Get X resolution. 00087 G4UIcmdWithADoubleAndUnit * GT_SDsetYresol; //!< Set Y resolution. 00088 G4UIcmdWithoutParameter * GT_SDgetYresol; //!< Get Y resolution. 00089 00090 }; 00091 00092 #endif