SLIC  6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
UserActionPluginMessenger.cc
Go to the documentation of this file.
2 
3 namespace slic {
4 
6  userPlugin_(userPlugin) {
7 
8  pluginDir_ = new G4UIdirectory(std::string("/slic/plugins/" + userPlugin->getName() + "/").c_str());
9  pluginDir_->SetGuidance(std::string("Commands for the sim plugin " + userPlugin->getName()).c_str());
10 
11  verboseCmd_ = new G4UIcommand(std::string(getPath() + "verbose").c_str(), this);
12  G4UIparameter* verbose = new G4UIparameter("verboseLevel", 'i', false);
13  verboseCmd_->SetParameter(verbose);
14  verboseCmd_->SetGuidance("Set the verbosity level of the sim plugin (1-4).");
15  verboseCmd_->AvailableForStates(G4ApplicationState::G4State_PreInit, G4ApplicationState::G4State_Idle);
16 }
17 
18 void UserActionPluginMessenger::SetNewValue(G4UIcommand *command, G4String newValue) {
19  if (command == verboseCmd_) {
20  userPlugin_->setVerboseLevel(std::atoi(newValue));
21  std::cout << userPlugin_->getName() << " verbose set to " << userPlugin_->getVerboseLevel() << std::endl;
22  }
23 }
24 }
void SetNewValue(G4UIcommand *command, G4String newValue)
UserActionPluginMessenger(UserActionPlugin *userPlugin)
User simulation plugin.
void setVerboseLevel(int verbose)
virtual std::string getName()=0
@ verbose
Definition: LogStream.hh:33
@ endl
Definition: LogStream.hh:26