GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
Public Member Functions
GGSIntHitSDMessenger Class Reference

The integrated hit SD messenger class. More...

#include <GGSIntHitSDMessenger.h>

Inheritance diagram for GGSIntHitSDMessenger:
Inheritance graph
[legend]
Collaboration diagram for GGSIntHitSDMessenger:
Collaboration graph
[legend]

Public Member Functions

 GGSIntHitSDMessenger (GGSIntHitSD *intHitSD)
 Constructor. More...
 
 ~GGSIntHitSDMessenger ()
 Destructor.
 
void SetNewValue (G4UIcommand *command, G4String newValue)
 Concrete implementation of the SetNewValue methd of base class. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

GGSIntHitSDMessenger::GGSIntHitSDMessenger ( GGSIntHitSD intHitSD)

Constructor.

Parameters
intHitSDThe GGSIntHitSD object which the messenger will control.

Definition at line 14 of file GGSIntHitSDMessenger.cpp.

14  : _intHitSD(intHitSD) {
15 
16  // Create the directory for the commands: /GGS/scoring/<logvolname>.GGSIntHitSD.[optionstring]/
17  G4String dir("/GGS/scoring/");
18  dir.append(_intHitSD->GetName()).append("/");
19  _cmdDir = new G4UIdirectory(dir);
20 
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);
26 
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);
32 
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);
38 
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);
42 }

Member Function Documentation

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
commandThe UI command.
newValueThe command parameters.

Definition at line 56 of file GGSIntHitSDMessenger.cpp.

56  {
57 
58  if (command == _setTimeBinCmd) {
59  _intHitSD->SetTimeBin(_setTimeBinCmd->GetNewDoubleValue(newValue));
60  }
61 
62  if (command == _setPosHitStorage) {
63  _intHitSD->SetPosHitsStorage(_setPosHitStorage->GetNewBoolValue(newValue));
64  }
65 
66  if (command == _setPartHitStorage) {
67  _intHitSD->SetPartHitsStorage(_setPartHitStorage->GetNewBoolValue(newValue));
68  }
69 
70  if (command == _setTouchableIDComputer) {
71  _intHitSD->SetTouchableIDComputer(newValue);
72  }
73 }
void SetTimeBin(G4double time)
Time bins setter.
Definition: GGSIntHitSD.h:70
void SetPosHitsStorage(bool store)
Turn on or off the storage (i.e. persistence) of position hits.
Definition: GGSIntHitSD.h:131
void SetPartHitsStorage(bool store)
Turn on or off the storage (i.e. persistency) of particle hits.
Definition: GGSIntHitSD.h:97
void SetTouchableIDComputer(const std::string &tidcClassName)
Sets the touchable ID computer class.

The documentation for this class was generated from the following files: