SLIC  6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
EventMessenger.cc
Go to the documentation of this file.
1 #include "EventMessenger.hh"
2 
3 // SLIC
4 #include "EventAction.hh"
5 
6 // Geant4
7 #include "G4UIcmdWithABool.hh"
8 
9 namespace slic {
12 }
13 
15 }
16 
17 void EventMessenger::SetNewValue(G4UIcommand* cmd, G4String newVals) {
18  if (cmd == m_eventTimerCmd) {
19  bool et = true;
20 
21  if (newVals != G4String("")) {
22  et = G4UIcmdWithABool::GetNewBoolValue(newVals);
23  }
24 
26  } else {
27  G4Exception("", "", JustWarning, "Unknown command for this messenger.");
28  }
29 }
30 
32  m_eventTimerCmd = new G4UIcmdWithABool("/event/enableEventTimer", this);
33  m_eventTimerCmd->SetGuidance("Enable timing of individual events.");
34  m_eventTimerCmd->SetParameterName("enable", 'b', true);
35  m_eventTimerCmd->SetDefaultValue(true);
36 }
37 }
static EventAction * getEventAction()
Definition: EventAction.cc:70
void enableEventTimer(bool et=true)
Definition: EventAction.cc:93
G4UIcmdWithABool * m_eventTimerCmd
void SetNewValue(G4UIcommand *command, G4String newValues)