46 coutDir->
SetGuidance(
"Control cout/cerr for local thread.");
48 coutFileNameCmd =
new G4UIcommand(
"/control/cout/setCoutFile",
this);
49 coutFileNameCmd->
SetGuidance(
"Send G4cout stream to a file dedicated to a thread. ");
50 coutFileNameCmd->
SetGuidance(
"To have a display output, use special keyword \"**Screen**\".");
51 coutFileNameCmd->
SetGuidance(
"If append flag is true output is appended to file,");
52 coutFileNameCmd->
SetGuidance(
"otherwise file output is overwritten.");
55 pp->SetDefaultValue(
"**Screen**");
58 pp->SetDefaultValue(1);
61 cerrFileNameCmd =
new G4UIcommand(
"/control/cout/setCerrFile",
this);
62 cerrFileNameCmd->
SetGuidance(
"Send G4cerr stream to a file dedicated to a thread. ");
63 cerrFileNameCmd->
SetGuidance(
"To have a display output, use special keyword \"**Screen**\".");
64 cerrFileNameCmd->
SetGuidance(
"If append flag is true output is appended to file,");
65 cerrFileNameCmd->
SetGuidance(
"otherwise file output is overwritten.");
68 pp->SetDefaultValue(
"**Screen**");
71 pp->SetDefaultValue(1);
75 bufferCoutCmd->
SetGuidance(
"Send cout and/or cerr stream to a buffer.");
76 bufferCoutCmd->
SetGuidance(
"The buffered text will be printed at the end of the job");
78 "for each thread at a time, so that output of each thread is grouped.");
79 bufferCoutCmd->
SetGuidance(
"This command has no effect if output goes to a file.");
85 prefixCmd->
SetGuidance(
"Set the prefix string for each cout/cerr line from a thread.");
91 ignoreCmd->
SetGuidance(
"Omit cout from threads except the specified one.");
93 "This command takes effect only if cout destination "
94 "is screen without buffering.");
95 ignoreCmd->
SetGuidance(
"If specified thread ID is greater than the number of threads,");
96 ignoreCmd->
SetGuidance(
"no cout is displayed from worker threads. -1 to reset.");
97 ignoreCmd->
SetGuidance(
"This command does not affect to cerr.");
102 ignoreInitCmd =
new G4UIcmdWithABool(
"/control/cout/ignoreInitializationCout",
this);
104 "Omit cout from threads during initialization, as "
105 "they should be identical to the master thread.");
107 "This command takes effect only if cout "
108 "destination is screen without buffering.");
109 ignoreInitCmd->
SetGuidance(
"This command does not affect to cerr.");
118 delete coutFileNameCmd;
119 delete cerrFileNameCmd;
120 delete bufferCoutCmd;
123 delete ignoreInitCmd;
131 if (command == coutFileNameCmd) {
137 else if (command == cerrFileNameCmd) {
143 else if (command == bufferCoutCmd) {
146 else if (command == prefixCmd) {
149 else if (command == ignoreCmd) {
152 else if (command == ignoreInitCmd) {
G4LocalThreadCoutMessenger()
void SetNewValue(G4UIcommand *, G4String) override
~G4LocalThreadCoutMessenger() override
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4int defVal)
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
void AvailableForStates(G4ApplicationState s1)
void SetCerrFileName(const G4String &fileN="G4cerr.txt", G4bool ifAppend=true)
void SetThreadIgnoreInit(G4bool flg=true)
void SetThreadPrefixString(const G4String &prefix="W")
void SetCoutFileName(const G4String &fileN="G4cout.txt", G4bool ifAppend=true)
void SetThreadIgnore(G4int tid=0)
static G4UImanager * GetUIpointer()
void SetThreadUseBuffer(G4bool flg=true)
G4int StoI(const G4String &s)