TF_Messenger.h

Go to the documentation of this file.
00001 //! \file
00002 //!
00003 //! Header file for Time_of_Flight messenger class.
00004 //!
00005 //! Declares the singleton messenger class and its member routines which
00006 //! control the parameters of Time_of_Flight 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-30
00013 //!
00014 //! \ingroup control
00015 
00016 // Ensure header file is included only once.
00017 
00018 #ifndef TF_MESSENGER_H
00019 #define TFMESSENGER_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 "G4UIcmdWithADouble.hh"
00028 #include "G4UIcmdWithADoubleAndUnit.hh"
00029 #include "G4UIcmdWithoutParameter.hh"
00030 
00031 // Declare the classes referenced here.
00032 
00033 class TF_SD;
00034 
00035 //! Declare the Messenger class based on G4UImessenger.
00036 
00037 class TF_Messenger : public G4UImessenger {
00038 
00039 public:
00040 
00041      static TF_Messenger * Instance();
00042 
00043      void setTF_SDptr( TF_SD * );
00044 
00045      //! Set new value.
00046 
00047      void SetNewValue( G4UIcommand * command, G4String newValues );
00048 
00049      //! Get current value.
00050 
00051      G4String GetCurrentValue( G4UIcommand * command );
00052 
00053 //! These routines are kept private to preserve singleton class.
00054 
00055 private:
00056 
00057      //! Constructor.
00058 
00059      TF_Messenger();
00060 
00061      //! Copy constructor.
00062 
00063      TF_Messenger( TF_Messenger const & ) {}
00064 
00065      //! Assignment operator.
00066 
00067      TF_Messenger & operator = ( TF_Messenger const & );
00068 
00069 //! Data members of TF_Messenger class.
00070 
00071 private:
00072 
00073      static TF_Messenger * m_pInstance;
00074 
00075      G4UIdirectory * TFdir;        //!< Pointer to TF UI structure.
00076 
00077      TF_SD * pTF_SD;               //!< Pointer to TF_SD class.
00078      G4UIdirectory * TF_SDdir;     //!< Pointer to TF_SD UI structure.
00079 
00080      G4UIcmdWithADoubleAndUnit * TF_SDsetThreshold;    //!< Set threshold.
00081      G4UIcmdWithoutParameter * TF_SDgetThreshold;      //!< Get threshold.
00082      G4UIcmdWithADoubleAndUnit * TF_SDsetTresol;       //!< Set T resolution.
00083      G4UIcmdWithoutParameter * TF_SDgetTresol;         //!< Get T resolution.
00084      G4UIcmdWithADoubleAndUnit * TF_SDsetYresol;       //!< Set Y resolution.
00085      G4UIcmdWithoutParameter * TF_SDgetYresol;         //!< Get Y resolution.
00086 
00087 };
00088 
00089 #endif