File indexing completed on 2025-01-31 09:22:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 #ifndef GRRunActionMessenger_H
0045 #define GRRunActionMessenger_H 1
0046
0047 #include "G4UImessenger.hh"
0048 #include "globals.hh"
0049
0050 class GRRunAction;
0051 class G4UIdirectory;
0052 class G4UIcommand;
0053 class G4UIcmdWithAString;
0054 class G4UIcmdWithABool;
0055 class G4UIcmdWithAnInteger;
0056 class G4UIcmdWithoutParameter;
0057
0058 class GRRunActionMessenger: public G4UImessenger
0059 {
0060 public:
0061 GRRunActionMessenger(GRRunAction*);
0062 virtual ~GRRunActionMessenger();
0063 virtual void SetNewValue(G4UIcommand*,G4String);
0064 virtual G4String GetCurrentValue(G4UIcommand*);
0065
0066 private:
0067 void Define1D();
0068 void Define1P();
0069
0070 private:
0071 GRRunAction* pRA;
0072
0073 G4UIdirectory* anaDir;
0074 G4UIcmdWithAString* fileCmd;
0075 G4UIcmdWithAnInteger* verboseCmd;
0076 G4UIcmdWithoutParameter* listCmd;
0077 G4UIcmdWithAnInteger* openCmd;
0078 G4UIcmdWithAnInteger* plotCmd;
0079 G4UIcmdWithABool* carryCmd;
0080 G4UIcmdWithoutParameter* flushCmd;
0081 G4UIcmdWithoutParameter* resetCmd;
0082 G4UIcommand* idOffsetCmd;
0083
0084 G4UIdirectory* oneDDir;
0085 G4UIcommand* create1DCmd;
0086 G4UIcommand* create1DPrimPCmd;
0087 G4UIcommand* create1DPlotPCmd;
0088 G4UIcmdWithoutParameter* set1DCmd;
0089 G4UIcommand* config1DCmd;
0090 G4UIcommand* title1DCmd;
0091 G4UIcmdWithABool* set1DYaxisLogCmd;
0092
0093 G4UIdirectory* onePDir;
0094 G4UIcommand* create1PCmd;
0095 G4UIcommand* set1PCmd;
0096 G4UIcommand* title1PCmd;
0097
0098 G4UIdirectory* ntupleDir;
0099 G4UIcommand* addColumnCmd;
0100
0101 private:
0102 G4int currentID;
0103
0104 private:
0105 inline G4bool CheckID(G4UIcommand* cmd)
0106 {
0107 if(currentID<0)
0108 {
0109 G4ExceptionDescription ed;
0110 ed << "There is no currently opened histogram. Create or open one.";
0111 cmd->CommandFailed(ed);
0112 return false;
0113 }
0114 return true;
0115 }
0116 inline G4bool CheckOpenID(G4UIcommand* )
0117 {
0118 if(currentID>=0)
0119 {
0120 G4cout << "Previously opened histogram <" << currentID << "> is closed." << G4endl;
0121 currentID = -1;
0122 }
0123 return true;
0124 }
0125 };
0126
0127 #endif
0128