File indexing completed on 2026-09-17 08:32:09
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 #include "LXeEventMessenger.hh"
0030
0031 #include "LXeEventAction.hh"
0032
0033 #include "G4UIcmdWithABool.hh"
0034 #include "G4UIcmdWithAnInteger.hh"
0035
0036
0037
0038 LXeEventMessenger::LXeEventMessenger(LXeEventAction* event) : fLXeEvent(event)
0039 {
0040 fVerboseCmd = new G4UIcmdWithAnInteger("/LXe/eventVerbose", this);
0041 fVerboseCmd->SetGuidance("Set the verbosity of event data.");
0042 fVerboseCmd->SetParameterName("verbose", true);
0043 fVerboseCmd->SetDefaultValue(1);
0044
0045 fPmtThresholdCmd = new G4UIcmdWithAnInteger("/LXe/pmtThreshold", this);
0046 fPmtThresholdCmd->SetGuidance("Set the pmtThreshold (in # of photons)");
0047
0048 fForceDrawPhotonsCmd = new G4UIcmdWithABool("/LXe/forceDrawPhotons", this);
0049 fForceDrawPhotonsCmd->SetGuidance("Force drawing of photons.");
0050 fForceDrawPhotonsCmd->SetGuidance("(Higher priority than /LXe/forceDrawNoPhotons)");
0051
0052 fForceDrawNoPhotonsCmd = new G4UIcmdWithABool("/LXe/forceDrawNoPhotons", this);
0053 fForceDrawNoPhotonsCmd->SetGuidance("Force no drawing of photons.");
0054 fForceDrawNoPhotonsCmd->SetGuidance("(Lower priority than /LXe/forceDrawPhotons)");
0055 }
0056
0057
0058
0059 LXeEventMessenger::~LXeEventMessenger()
0060 {
0061 delete fVerboseCmd;
0062 delete fPmtThresholdCmd;
0063 delete fForceDrawPhotonsCmd;
0064 delete fForceDrawNoPhotonsCmd;
0065 }
0066
0067
0068
0069 void LXeEventMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
0070 {
0071 if (command == fVerboseCmd) {
0072 fLXeEvent->SetEventVerbose(fVerboseCmd->GetNewIntValue(newValue));
0073 }
0074 else if (command == fPmtThresholdCmd) {
0075 fLXeEvent->SetPMTThreshold(fPmtThresholdCmd->GetNewIntValue(newValue));
0076 }
0077 else if (command == fForceDrawPhotonsCmd) {
0078 fLXeEvent->SetForceDrawPhotons(fForceDrawPhotonsCmd->GetNewBoolValue(newValue));
0079 }
0080 else if (command == fForceDrawNoPhotonsCmd) {
0081 fLXeEvent->SetForceDrawNoPhotons(fForceDrawNoPhotonsCmd->GetNewBoolValue(newValue));
0082 }
0083 }