175{
179
181
182 if( command == listCmd ){
183
184 type = -1;
185 if (newValue == "all") {
186 currentProcessTypeName = newValue;
187 } else {
188 type = GetProcessType(newValue);
189 if (type <0) {
191 } else {
192 currentProcessTypeName = newValue;
193 }
194 }
196 idx =0;
197 G4ProcessTable::G4ProcNameVector::iterator itr;
198 for (itr=procNameVector->begin(); itr!=procNameVector->end(); ++itr) {
199 idx +=1;
201 if ( (type <0) || ( ((*tmpVector)(0)->GetProcessType()) == type) ) {
202 if ( counter%4 != 0)
G4cout <<
",";
203 G4cout << std::setw(19) <<*itr;
204 if ((counter++)%4 == 3) {
206 }
207 }
208 delete tmpVector;
209 }
211
212
213 } else if( command==procVerboseCmd ) {
214
216
217
219
220 const char* temp = (const char*)(tmpS);
221 std::istringstream is((char*)temp);
223 is >>level;
224
225
226 currentProcessTypeName =
G4String(next());
227 if (currentProcessTypeName.
isNull()) currentProcessTypeName =
"all";
228 G4bool isProcName =
false;
230 type = -1;
231
232 if (currentProcessTypeName == "all") {
233 isAll = true;
234 } else {
235 type = GetProcessType(currentProcessTypeName);
236 if (type<0) {
237 isProcName = true;
238 currentProcessName = currentProcessTypeName;
239 currentProcessTypeName = "";
240 }
241 }
242 idx =0;
243 G4ProcessTable::G4ProcNameVector::iterator itr;
244 for (itr=procNameVector->begin(); itr!=procNameVector->end(); ++itr) {
245 idx +=1;
248 if ( isAll ||
252 }
253 delete tmpVector;
254 }
255
256
257 } else if( command==verboseCmd ) {
258
260
261
262 } else {
264
265
266 currentProcessName =
G4String(next());
267 G4bool isProcName =
false;
268 G4ProcessTable::G4ProcNameVector::iterator itr;
269 for (itr=procNameVector->begin(); itr!=procNameVector->end(); ++itr) {
270 if ( (*itr) == currentProcessName ) {
271 isProcName = true;
272 break;
273 }
274 }
275 if (!isProcName) {
276 type = GetProcessType(currentProcessName);
277 if (type <0 ) {
278
280 currentProcessName = "";
281 return;
282 }
283 }
284
285
286 currentParticleName =
G4String(next());
287 G4bool isParticleFound =
false;
289 if ( currentParticleName == "all" ) {
290 isParticleFound = true;
291
292 } else {
294 if (isParticleFound) {
296 }
297
298 }
299
300 if ( !isParticleFound ) {
301
303 currentParticleName = "";
304 return;
305 }
306
307 if( command==dumpCmd ) {
308
310 if (isProcName) {
311 tmpVector = theProcessTable->
FindProcesses(currentProcessName);
312 } else {
314 }
316 theProcessTable->
DumpInfo( (*tmpVector)(i), currentParticle );
317 }
318 delete tmpVector;
319
320
321 } else if ( (command==activateCmd) || (command==inactivateCmd)) {
322
323 G4bool fActive = (command==activateCmd);
324 if (isProcName) {
325 if ( currentParticle == 0 ) {
327 fActive);
328 } else {
330 currentParticle,
331 fActive);
332 }
333 } else {
334 if ( currentParticle == 0 ) {
336 fActive);
337 } else {
339 currentParticle,
340 fActive);
341 }
342 }
344
345 }
346 }
347}
G4DLLIMPORT std::ostream G4cout
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4bool contains(const G4ParticleDefinition *particle)
void DumpInfo(G4VProcess *process, G4ParticleDefinition *particle=0)
void SetProcessActivation(const G4String &processName, G4bool fActive)
G4ProcessVector * FindProcesses()
void SetVerboseLevel(G4int value)
static G4int GetNewIntValue(const char *paramString)
G4int ApplyCommand(const char *aCommand)
static G4UImanager * GetUIpointer()
void SetVerboseLevel(G4int value)
G4ProcessType GetProcessType() const
const G4String & GetProcessName() const