67 std::ostringstream str;
89 output->AddCoutTransformer(f);
90 output->AddCerrTransformer(f);
91 push_back(std::move(output));
92 if(addmasterDestination)
117 std::ostringstream str;
125 forwarder->AddCoutTransformer(f);
126 forwarder->AddCerrTransformer(f);
128 push_back(std::move(forwarder));
153 std::ios_base::openmode mode =
159 output->AddCerrTransformer([](
G4String&) {
return false; });
160 push_back(std::move(output));
176 std::ios_base::openmode mode =
179 output->AddCoutTransformer([](
G4String&) {
return false; });
180 push_back(std::move(output));
195 if(fileN !=
"**Screen**")
222 const size_t infiniteSize = 0;
247 if(fileN !=
"**Screen**")
282 std::ostringstream msg;
283 msg <<
"=======================\n";
284 msg <<
"cout buffer(s) for worker with ID:" <<
id << std::endl;
305 msg <<
"=======================\n";
306 msg <<
"cerr buffer(s) for worker with ID:" <<
id <<
" (goes to std error)"
std::unique_ptr< G4coutDestination > G4coutDestinationUPtr
#define G4MUTEX_INITIALIZER
G4GLOB_DLL G4strstreambuf G4coutbuf
G4GLOB_DLL G4strstreambuf G4cerrbuf
virtual G4int FlushG4cerr()
virtual G4int FlushG4cout()
G4coutDestination * ref_masterOut
void AddCerrFileName(const G4String &fileN="G4cerr.txt", G4bool ifAppend=true)
void SetDefaultOutput(G4bool addMasterDestination=true, G4bool formatAlsoMaster=true)
void HandleFileCout(G4String fileN, G4bool appendFlag, G4bool suppressDefault)
void EnableBuffering(G4bool flag=true)
G4bool masterDestinationFlag
void HandleFileCerr(G4String fileN, G4bool appendFlag, G4bool suppressDefault)
void SetCoutFileName(const G4String &fileN="G4cout.txt", G4bool ifAppend=true)
G4bool masterDestinationFmtFlag
G4MTcoutDestination(const G4int &threadId)
G4coutDestination * ref_defaultOut
void AddCoutFileName(const G4String &fileN="G4cout.txt", G4bool ifAppend=true)
G4StateManager * stateMgr
void SetIgnoreCout(G4int tid=0)
virtual ~G4MTcoutDestination()
void SetCerrFileName(const G4String &fileN="G4cerr.txt", G4bool ifAppend=true)
void AddMasterOutput(G4bool formatAlsoMaster)
const G4ApplicationState & GetCurrentState() const
static G4StateManager * GetStateManager()
void AddCerrTransformer(const Transformer &t)
virtual G4int ReceiveG4cout(const G4String &msg)
void AddCoutTransformer(const Transformer &t)
void SetDestination(G4coutDestination *dest)