GN_Messenger.h

Go to the documentation of this file.
00001 //! \file
00002 //!
00003 //! Header file for GN_Messenger class.
00004 //!
00005 //! Declares the singleton GN_Messenger class and its member routines which
00006 //! control the parameters of the Generator.  These routines 
00007 //! allow the user to control the parameters and/or running from command
00008 //! files or interactively.
00009 //!
00010 //! \author D.K. Hasell
00011 //! \version 1.0
00012 //! \date 2010-10-31
00013 //!
00014 //! \ingroup control
00015 
00016 // Ensure header file is included only once.
00017 
00018 #ifndef GN_MESSENGER_H
00019 #define GN_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 "G4UIcmdWithAnInteger.hh"
00027 #include "G4UIcmdWithADoubleAndUnit.hh"
00028 #include "G4UIcmdWithoutParameter.hh"
00029 
00030 // Declare the classes referenced here.
00031 
00032 class Generator;
00033 
00034 //! Declare the Messenger class.
00035 
00036 class GN_Messenger : public G4UImessenger {
00037 
00038 public:
00039 
00040      static GN_Messenger * Instance();
00041 
00042      void setGNptr( Generator * ptr );
00043 
00044      //! Set new value.
00045 
00046      void SetNewValue( G4UIcommand * command, G4String newValues );
00047 
00048      //! Get current value.
00049 
00050      G4String GetCurrentValue( G4UIcommand * command );
00051 
00052 private:
00053 
00054      //! Constructor.
00055 
00056      GN_Messenger();
00057 
00058      //! Copy constructor.
00059 
00060      GN_Messenger( GN_Messenger const & ) {}
00061 
00062      //! Assignment operator.
00063 
00064      GN_Messenger & operator = ( GN_Messenger const & );
00065 
00066      static GN_Messenger * m_pInstance;
00067 
00068      Generator * pGN;             //!< Pointer to Generator class.
00069      G4UIdirectory * GNdir;       //!< Pointer to Gen UI structure.
00070 
00071      G4UIcmdWithADoubleAndUnit * GNsetEbeam;      //!< Beam kinetic energy.
00072      G4UIcmdWithoutParameter   * GNgetEbeam;      //!< Beam kinetic energy.
00073      G4UIcmdWithAnInteger      * GNsetBeamCharge; //!< Beam charge.
00074      G4UIcmdWithoutParameter   * GNgetBeamCharge; //!< Beam charge.
00075      G4UIcmdWithADoubleAndUnit * GNsetepThetaMin; //!< epTheta_Min.
00076      G4UIcmdWithoutParameter   * GNgetepThetaMin; //!< epTheta_Min.
00077      G4UIcmdWithADoubleAndUnit * GNsetepThetaMax; //!< epTheta_Max.
00078      G4UIcmdWithoutParameter   * GNgetepThetaMax; //!< epTheta_Max.
00079      G4UIcmdWithADoubleAndUnit * GNsetepPhiMin;   //!< epPhi_Min.
00080      G4UIcmdWithoutParameter   * GNgetepPhiMin;   //!< epPhi_Min.
00081      G4UIcmdWithADoubleAndUnit * GNsetepPhiMax;   //!< epPhi_Max.
00082      G4UIcmdWithoutParameter   * GNgetepPhiMax;   //!< epPhi_Max.
00083 
00084 };
00085 
00086 #endif