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 // File: G4PersistencyCenterMessenger.hh 00027 // 00028 // History: 00029 // 01.07.18 Youhei Morita Initial creation (with "fadsclass") 00030 00031 #ifndef PERSISTENCY_CENTER_MESSENGER_HH 00032 #define PERSISTENCY_CENTER_MESSENGER_HH 1 00033 00034 #include "G4UIcommand.hh" 00035 #include "G4UIdirectory.hh" 00036 #include "G4UIcmdWithAnInteger.hh" 00037 #include "G4UIcmdWithAString.hh" 00038 #include "G4UIcmdWithoutParameter.hh" 00039 #include "G4PersistencyCenter.hh" 00040 00041 // Class inherited: 00042 #include "G4UImessenger.hh" 00043 00044 // Class Description: 00045 // User interface messenger class to interface G4PersistencyCenter 00046 00047 class G4PersistencyCenterMessenger 00048 : public G4UImessenger 00049 { 00050 public: // With description 00051 G4PersistencyCenterMessenger(G4PersistencyCenter* p); 00052 // Constructor 00053 00054 ~G4PersistencyCenterMessenger(); 00055 // Destructor 00056 00057 public: // With description 00058 void SetNewValue(G4UIcommand* command, G4String newValues); 00059 // User interface for setting a new value 00060 00061 G4String GetCurrentValue(G4UIcommand* command); 00062 // User interface for getting a value 00063 00064 private: 00065 std::string PopWord(std::string text, int n, std::string delim); 00066 // Parse text and returns the n-th words separated by delim 00067 00068 private: 00069 G4PersistencyCenter* pc; 00070 G4UIdirectory* directory, *subdir1, *subdir2, 00071 *subdir3, *subdir4, *subdir5; 00072 G4UIcmdWithAnInteger* verboseCmd; 00073 G4UIcmdWithAString* select; 00074 G4UIcmdWithAString* regHitIO; 00075 std::vector<std::string> wrObj; 00076 std::vector<std::string> rdObj; 00077 std::vector<G4UIcmdWithAString*> storeObj; 00078 std::vector<G4UIcmdWithAString*> setWrFile; 00079 std::vector<G4UIcmdWithAString*> setRdFile; 00080 G4UIcmdWithoutParameter* printAll; 00081 00082 }; // End of class G4PersistencyCenterMessenger 00083 00084 #endif 00085