16 : _cmdsDirName(
"/GGS/scoring/"), _cmdBaseName(
"/GGS/scoring/") {
18 _cmdBaseName.append(
"add");
19 _cmdsDir =
new G4UIdirectory(_cmdsDirName);
26 for (
unsigned int iCmd = 0; iCmd < _commands.size(); iCmd++)
27 delete _commands[iCmd];
35 G4String cmdName(_cmdBaseName);
36 cmdName.append(sdClassName);
37 for (
unsigned int iCmd = 0; iCmd < _commands.size(); iCmd++) {
38 if (_commands[iCmd]->GetCommandName() == cmdName)
43 G4UIcmdWithAString *newCmd =
new G4UIcmdWithAString(cmdName,
this);
45 G4String(
"Add a sensitive detector of type ").append(sdClassName).append(
" to the specified logical volume"));
46 newCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
47 _commands.push_back(newCmd);
54 for (
unsigned int iCmd = 0; iCmd < _commands.size(); iCmd++) {
55 if (command == _commands[iCmd]) {
56 G4String sdClassName = command->GetCommandName().substr(3);
static GGSScoringManager & GetInstance()
Singleton getter.
GGSScoringManagerMessenger()
Constructor.
~GGSScoringManagerMessenger()
Destructor.
void SetNewValue(G4UIcommand *command, G4String logVolName)
Concrete implementation of the SetNewValue method of base class.
void CreateAddCommand(const G4String &sdClassName)
Creates the command to add the specified sensitive detector class to logical volumes.
void AddSDToLogVol(const G4String &sdClassName, const G4String &logVolNameAndParams)
Adds a sensitive detector to a logical volume (class factory approach).