Geant4
10.02.p02
|
#include <G4MTcoutDestination.hh>
Public Member Functions | |
G4MTcoutDestination (const G4int &threadId, std::ostream &co=std::cout, std::ostream &ce=std::cerr) | |
virtual | ~G4MTcoutDestination () |
virtual G4int | ReceiveG4cout (const G4String &) |
virtual G4int | ReceiveG4cerr (const G4String &) |
void | SetCoutFileName (const G4String &fileN="G4cout.txt", G4bool ifAppend=true) |
void | SetCerrFileName (const G4String &fileN="G4cerr.txt", G4bool ifAppend=true) |
void | EnableBuffering (G4bool flag=true) |
void | SetPrefixString (const G4String &wd="G4WT") |
void | SetIgnoreCout (G4int tid=0) |
void | SetIgnoreInit (G4bool val=true) |
G4String | GetPrefixString () const |
G4String | GetFullPrefixString () const |
Public Member Functions inherited from G4coutDestination | |
G4coutDestination () | |
virtual | ~G4coutDestination () |
Private Member Functions | |
void | CloseCoutFile () |
void | CloseCerrFile () |
void | DumpBuffer () |
Private Attributes | |
std::ostream & | finalcout |
std::ostream & | finalcerr |
const G4int | id |
G4bool | useBuffer |
G4bool | threadCoutToFile |
G4bool | threadCerrToFile |
G4bool | ignoreCout |
G4bool | ignoreInit |
std::ostringstream | cout_buffer |
std::ostringstream | cerr_buffer |
std::ofstream | coutFile |
std::ofstream | cerrFile |
G4String | prefix |
Additional Inherited Members | |
Static Protected Attributes inherited from G4coutDestination | |
static G4coutDestination * | masterG4coutDestination = 0 |
Definition at line 45 of file G4MTcoutDestination.hh.
G4MTcoutDestination::G4MTcoutDestination | ( | const G4int & | threadId, |
std::ostream & | co = std::cout , |
||
std::ostream & | ce = std::cerr |
||
) |
Definition at line 38 of file G4MTcoutDestination.cc.
References G4cerrbuf, G4coutbuf, and G4strstreambuf::SetDestination().
|
virtual |
Definition at line 49 of file G4MTcoutDestination.cc.
References CloseCerrFile(), CloseCoutFile(), DumpBuffer(), threadCerrToFile, threadCoutToFile, and useBuffer.
|
private |
Definition at line 165 of file G4MTcoutDestination.cc.
References cerrFile, and threadCerrToFile.
Referenced by SetCerrFileName(), and ~G4MTcoutDestination().
|
private |
Definition at line 159 of file G4MTcoutDestination.cc.
References coutFile, and threadCoutToFile.
Referenced by SetCoutFileName(), and ~G4MTcoutDestination().
|
private |
Definition at line 171 of file G4MTcoutDestination.cc.
References cerr_buffer, cout_buffer, finalcerr, and finalcout.
Referenced by EnableBuffering(), and ~G4MTcoutDestination().
void G4MTcoutDestination::EnableBuffering | ( | G4bool | flag = true | ) |
Definition at line 142 of file G4MTcoutDestination.cc.
References DumpBuffer(), and useBuffer.
Referenced by G4UImanager::SetThreadUseBuffer().
|
inline |
Definition at line 63 of file G4MTcoutDestination.hh.
References id.
|
inline |
Definition at line 62 of file G4MTcoutDestination.hh.
References prefix.
Reimplemented from G4coutDestination.
Definition at line 90 of file G4MTcoutDestination.cc.
References cerr_buffer, cerrFile, finalcerr, G4State_Idle, G4Threading::GENERICTHREAD_ID, G4StateManager::GetStateManager(), id, ignoreCout, ignoreInit, G4coutDestination::masterG4coutDestination, prefix, G4coutDestination::ReceiveG4cerr(), threadCerrToFile, and useBuffer.
Reimplemented from G4coutDestination.
Definition at line 59 of file G4MTcoutDestination.cc.
References cout_buffer, coutFile, finalcout, G4State_Idle, G4Threading::GENERICTHREAD_ID, G4StateManager::GetStateManager(), id, ignoreCout, ignoreInit, G4coutDestination::masterG4coutDestination, prefix, G4coutDestination::ReceiveG4cout(), threadCoutToFile, and useBuffer.
void G4MTcoutDestination::SetCerrFileName | ( | const G4String & | fileN = "G4cerr.txt" , |
G4bool | ifAppend = true |
||
) |
Definition at line 129 of file G4MTcoutDestination.cc.
References cerrFile, CloseCerrFile(), and threadCerrToFile.
Referenced by G4UImanager::SetCerrFileName().
void G4MTcoutDestination::SetCoutFileName | ( | const G4String & | fileN = "G4cout.txt" , |
G4bool | ifAppend = true |
||
) |
Definition at line 116 of file G4MTcoutDestination.cc.
References CloseCoutFile(), coutFile, and threadCoutToFile.
Referenced by G4UImanager::SetCoutFileName().
void G4MTcoutDestination::SetIgnoreCout | ( | G4int | tid = 0 | ) |
Definition at line 151 of file G4MTcoutDestination.cc.
References id, and ignoreCout.
Referenced by G4UImanager::SetThreadIgnore(), G4UImanager::SetUpForAThread(), and G4UImanager::SetUpForSpecialThread().
|
inline |
Definition at line 61 of file G4MTcoutDestination.hh.
References ignoreInit.
Referenced by G4UImanager::SetThreadIgnoreInit().
void G4MTcoutDestination::SetPrefixString | ( | const G4String & | wd = "G4WT" | ) |
Definition at line 148 of file G4MTcoutDestination.cc.
Referenced by G4UImanager::SetThreadPrefixString(), and G4UImanager::SetUpForSpecialThread().
|
private |
Definition at line 87 of file G4MTcoutDestination.hh.
Referenced by DumpBuffer(), and ReceiveG4cerr().
|
private |
Definition at line 89 of file G4MTcoutDestination.hh.
Referenced by CloseCerrFile(), ReceiveG4cerr(), and SetCerrFileName().
|
private |
Definition at line 86 of file G4MTcoutDestination.hh.
Referenced by DumpBuffer(), and ReceiveG4cout().
|
private |
Definition at line 88 of file G4MTcoutDestination.hh.
Referenced by CloseCoutFile(), ReceiveG4cout(), and SetCoutFileName().
|
private |
Definition at line 78 of file G4MTcoutDestination.hh.
Referenced by DumpBuffer(), and ReceiveG4cerr().
|
private |
Definition at line 77 of file G4MTcoutDestination.hh.
Referenced by DumpBuffer(), and ReceiveG4cout().
|
private |
Definition at line 79 of file G4MTcoutDestination.hh.
Referenced by GetFullPrefixString(), ReceiveG4cerr(), ReceiveG4cout(), and SetIgnoreCout().
|
private |
Definition at line 83 of file G4MTcoutDestination.hh.
Referenced by ReceiveG4cerr(), ReceiveG4cout(), and SetIgnoreCout().
|
private |
Definition at line 84 of file G4MTcoutDestination.hh.
Referenced by ReceiveG4cerr(), ReceiveG4cout(), and SetIgnoreInit().
|
private |
Definition at line 90 of file G4MTcoutDestination.hh.
Referenced by GetPrefixString(), ReceiveG4cerr(), and ReceiveG4cout().
|
private |
Definition at line 82 of file G4MTcoutDestination.hh.
Referenced by CloseCerrFile(), ReceiveG4cerr(), SetCerrFileName(), and ~G4MTcoutDestination().
|
private |
Definition at line 81 of file G4MTcoutDestination.hh.
Referenced by CloseCoutFile(), ReceiveG4cout(), SetCoutFileName(), and ~G4MTcoutDestination().
|
private |
Definition at line 80 of file G4MTcoutDestination.hh.
Referenced by EnableBuffering(), ReceiveG4cerr(), ReceiveG4cout(), and ~G4MTcoutDestination().