94 G4String searchString, activateString;
95 std::istringstream is (newValue);
96 is >> searchString >> activateString;
102 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
108 if (!pSceneHandler) {
110 G4cerr <<
"ERROR: No current sceneHandler. Please create one." <<
G4endl;
115 if (searchString ==
"all" && !activate) {
118 "WARNING: You are not allowed to de-activate all models."
119 "\n Command ignored."
127 std::vector<G4Scene::Model>& runDurationModelList =
129 for (
size_t i = 0; i < runDurationModelList.size(); i++) {
131 runDurationModelList[i].fpModel->GetGlobalDescription();
132 if (searchString ==
"all" || modelName.find(searchString)
133 != std::string::npos) {
135 runDurationModelList[i].fActive = activate;
137 G4cout <<
"Model \"" << modelName;
138 if (activate)
G4cout <<
"\" activated.";
139 else G4cout <<
"\" de-activated.";
145 std::vector<G4Scene::Model>& endOfEventModelList =
147 for (
size_t i = 0; i < endOfEventModelList.size(); i++) {
149 endOfEventModelList[i].fpModel->GetGlobalDescription();
150 if (searchString ==
"all" || modelName.find(searchString)
151 != std::string::npos) {
153 endOfEventModelList[i].fActive = activate;
155 G4cout <<
"Model \"" << modelName;
156 if (activate)
G4cout <<
"\" activated.";
157 else G4cout <<
"\" de-activated.";
163 std::vector<G4Scene::Model>& endOfRunModelList =
165 for (
size_t i = 0; i < endOfRunModelList.size(); i++) {
167 endOfRunModelList[i].fpModel->GetGlobalDescription();
168 if (searchString ==
"all" || modelName.find(searchString)
169 != std::string::npos) {
171 endOfRunModelList[i].fActive = activate;
173 G4cout <<
"Model \"" << modelName;
174 if (activate)
G4cout <<
"\" activated.";
175 else G4cout <<
"\" de-activated.";
188 const G4String& currentSceneName = pScene -> GetName ();
void UpdateVisManagerScene(const G4String &sceneName="")
std::vector< Model > & SetEndOfRunModelList()
G4GLOB_DLL std::ostream G4cout
static G4bool ConvertToBool(const char *st)
std::vector< Model > & SetRunDurationModelList()
std::vector< Model > & SetEndOfEventModelList()
G4VSceneHandler * GetCurrentSceneHandler() const
static Verbosity GetVerbosity()
G4Scene * GetCurrentScene() const
G4GLOB_DLL std::ostream G4cerr
static G4VisManager * fpVisManager