39 std::ostream& co, std::ostream& ce)
40 : finalcout(co), finalcerr(ce), id(threadId), useBuffer(false),
41 threadCoutToFile(false), threadCerrToFile(false),
42 ignoreCout(false), ignoreInit(true)
107 std::stringstream ss;
119 if( fileN ==
"**Screen**" )
return;
122 std::ios::openmode mode = std::ios::out;
123 if ( ifAppend ) mode |= std::ios::app;
132 if( fileN ==
"**Screen**" )
return;
135 std::ios::openmode mode = std::ios::out;
136 if ( ifAppend ) mode |= std::ios::app;
174 finalcout<<
"====================="<<std::endl;
175 finalcout<<
"cout buffer for worker with ID:"<<
id<<std::endl;
177 finalcerr<<
"====================="<<std::endl;
178 finalcerr<<
"cerr buffer for worker with ID:"<<
id<<std::endl;
180 finalcerr<<
"====================="<<std::endl;
void SetCerrFileName(const G4String &fileN="G4cerr.txt", G4bool ifAppend=true)
virtual G4int ReceiveG4cout(const G4String &)
static G4coutDestination * masterG4coutDestination
std::ostringstream cout_buffer
#define G4MUTEX_INITIALIZER
void SetPrefixString(const G4String &wd="G4WT")
void SetCoutFileName(const G4String &fileN="G4cout.txt", G4bool ifAppend=true)
static G4StateManager * GetStateManager()
G4MTcoutDestination(const G4int &threadId, std::ostream &co=std::cout, std::ostream &ce=std::cerr)
void EnableBuffering(G4bool flag=true)
virtual G4int ReceiveG4cerr(const G4String &)
void SetIgnoreCout(G4int tid=0)
void SetDestination(G4coutDestination *dest)
std::ostringstream cerr_buffer
virtual G4int ReceiveG4cerr(const G4String &)
virtual G4int ReceiveG4cout(const G4String &)
virtual ~G4MTcoutDestination()