16 _cmdsDirName(
"/GGS/scoring/"), _cmdBaseName(
"/GGS/scoring/") {
18 _cmdBaseName.append(
"add");
19 _cmdsDir =
new G4UIdirectory(_cmdsDirName);
27 for (
unsigned int iCmd = 0; iCmd < _commands.size(); iCmd++)
28 delete _commands[iCmd];
37 G4String cmdName(_cmdBaseName);
38 cmdName.append(sdClassName);
39 for (
unsigned int iCmd = 0; iCmd < _commands.size(); iCmd++) {
40 if (_commands[iCmd]->GetCommandName() == cmdName)
45 G4UIcmdWithAString *newCmd =
new G4UIcmdWithAString(cmdName,
this);
47 G4String(
"Add a sensitive detector of type ").append(sdClassName).append(
" to the specified logical volume"));
48 newCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
49 _commands.push_back(newCmd);
57 for (
unsigned int iCmd = 0; iCmd < _commands.size(); iCmd++) {
58 if (command == _commands[iCmd]) {
59 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).