The integrated hit SD messenger class.
More...
#include <GGSIntHitSDMessenger.h>
The integrated hit SD messenger class.
This class provides a messenger to set integrated hits parameters. Currently, it is only used to set the time bins.
Definition at line 26 of file GGSIntHitSDMessenger.h.
GGSIntHitSDMessenger::GGSIntHitSDMessenger |
( |
GGSIntHitSD * |
intHitSD | ) |
|
Constructor.
- Parameters
-
intHitSD | The GGSIntHitSD object which the messenger will control. |
Definition at line 14 of file GGSIntHitSDMessenger.cpp.
14 : _intHitSD(intHitSD) {
17 G4String dir(
"/GGS/scoring/");
18 dir.append(_intHitSD->GetName()).append(
"/");
19 _cmdDir =
new G4UIdirectory(dir);
21 _setTimeBinCmd =
new G4UIcmdWithADoubleAndUnit(G4String(dir).append(
"setTimeBin"),
this);
22 _setTimeBinCmd->SetGuidance(
"Set a time bin. Default unit: ns");
23 _setTimeBinCmd->SetUnitCategory(
"Time");
24 _setTimeBinCmd->SetDefaultUnit(
"ns");
25 _setTimeBinCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
27 _setPosHitStorage =
new G4UIcmdWithABool(G4String(dir).append(
"storePositionHits"),
this);
28 _setPosHitStorage->SetGuidance(
"Enables the storage of position hits");
29 _setPosHitStorage->SetParameterName(G4String(dir).append(
".storePositionHits"),
true);
30 _setPosHitStorage->SetDefaultValue(
true);
31 _setPosHitStorage->AvailableForStates(G4State_PreInit, G4State_Idle);
33 _setPartHitStorage =
new G4UIcmdWithABool(G4String(dir).append(
"storeParticleHits"),
this);
34 _setPartHitStorage->SetGuidance(
"Enables the storage of particle hits");
35 _setPartHitStorage->SetParameterName(G4String(dir).append(
".storeParticleHits"),
true);
36 _setPartHitStorage->SetDefaultValue(
true);
37 _setPartHitStorage->AvailableForStates(G4State_PreInit, G4State_Idle);
39 _setTouchableIDComputer =
new G4UIcmdWithAString(G4String(dir).append(
"setTouchableIDComputer"),
this);
40 _setTouchableIDComputer->SetGuidance(
"Sets the class that will compute the touchable IDs");
41 _setTouchableIDComputer->AvailableForStates(G4State_PreInit, G4State_Idle);
void GGSIntHitSDMessenger::SetNewValue |
( |
G4UIcommand * |
command, |
|
|
G4String |
newValue |
|
) |
| |
Concrete implementation of the SetNewValue methd of base class.
This method is called when a messenger command is called. It handles the command and its parameters (newValue), and calls the appropriate setter methods of primary generator.
- Parameters
-
command | The UI command. |
newValue | The command parameters. |
Definition at line 56 of file GGSIntHitSDMessenger.cpp.
58 if (command == _setTimeBinCmd) {
59 _intHitSD->
SetTimeBin(_setTimeBinCmd->GetNewDoubleValue(newValue));
62 if (command == _setPosHitStorage) {
66 if (command == _setPartHitStorage) {
70 if (command == _setTouchableIDComputer) {
void SetTimeBin(G4double time)
Time bins setter.
void SetPosHitsStorage(bool store)
Turn on or off the storage (i.e. persistence) of position hits.
void SetPartHitsStorage(bool store)
Turn on or off the storage (i.e. persistency) of particle hits.
void SetTouchableIDComputer(const std::string &tidcClassName)
Sets the touchable ID computer class.
The documentation for this class was generated from the following files: