Geant4  10.00.p02
G4MTcoutDestination Class Reference

#include <G4MTcoutDestination.hh>

+ Inheritance diagram for G4MTcoutDestination:
+ Collaboration diagram for G4MTcoutDestination:

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)
 
- 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
 
std::ostringstream cout_buffer
 
std::ostringstream cerr_buffer
 
std::ofstream coutFile
 
std::ofstream cerrFile
 
G4String prefix
 

Detailed Description

Definition at line 45 of file G4MTcoutDestination.hh.

Constructor & Destructor Documentation

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().

+ Here is the call graph for this function:

G4MTcoutDestination::~G4MTcoutDestination ( )
virtual

Definition at line 48 of file G4MTcoutDestination.cc.

References CloseCerrFile(), CloseCoutFile(), DumpBuffer(), threadCerrToFile, threadCoutToFile, and useBuffer.

+ Here is the call graph for this function:

Member Function Documentation

void G4MTcoutDestination::CloseCerrFile ( )
private

Definition at line 128 of file G4MTcoutDestination.cc.

References cerrFile, and threadCerrToFile.

Referenced by SetCerrFileName(), and ~G4MTcoutDestination().

+ Here is the caller graph for this function:

void G4MTcoutDestination::CloseCoutFile ( )
private

Definition at line 122 of file G4MTcoutDestination.cc.

References coutFile, and threadCoutToFile.

Referenced by SetCoutFileName(), and ~G4MTcoutDestination().

+ Here is the caller graph for this function:

void G4MTcoutDestination::DumpBuffer ( )
private

Definition at line 134 of file G4MTcoutDestination.cc.

References cerr_buffer, cout_buffer, finalcerr, and finalcout.

Referenced by EnableBuffering(), and ~G4MTcoutDestination().

+ Here is the caller graph for this function:

void G4MTcoutDestination::EnableBuffering ( G4bool  flag = true)

Definition at line 105 of file G4MTcoutDestination.cc.

References DumpBuffer(), and useBuffer.

Referenced by G4UImanager::SetThreadUseBuffer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4int G4MTcoutDestination::ReceiveG4cerr ( const G4String msg)
virtual

Reimplemented from G4coutDestination.

Definition at line 68 of file G4MTcoutDestination.cc.

References cerr_buffer, cerrFile, finalcerr, threadCerrToFile, and useBuffer.

G4int G4MTcoutDestination::ReceiveG4cout ( const G4String msg)
virtual

Reimplemented from G4coutDestination.

Definition at line 57 of file G4MTcoutDestination.cc.

References cout_buffer, coutFile, finalcout, ignoreCout, threadCoutToFile, and useBuffer.

void G4MTcoutDestination::SetCerrFileName ( const G4String fileN = "G4cerr.txt",
G4bool  ifAppend = true 
)

Definition at line 92 of file G4MTcoutDestination.cc.

References cerrFile, CloseCerrFile(), and threadCerrToFile.

Referenced by G4UImanager::SetCerrFileName().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4MTcoutDestination::SetCoutFileName ( const G4String fileN = "G4cout.txt",
G4bool  ifAppend = true 
)

Definition at line 79 of file G4MTcoutDestination.cc.

References CloseCoutFile(), coutFile, and threadCoutToFile.

Referenced by G4UImanager::SetCoutFileName().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4MTcoutDestination::SetIgnoreCout ( G4int  tid = 0)

Definition at line 114 of file G4MTcoutDestination.cc.

References id, and ignoreCout.

Referenced by G4UImanager::SetThreadIgnore(), and G4UImanager::SetUpForAThread().

+ Here is the caller graph for this function:

void G4MTcoutDestination::SetPrefixString ( const G4String wd = "G4WT")

Definition at line 111 of file G4MTcoutDestination.cc.

Referenced by G4UImanager::SetThreadPrefixString().

+ Here is the caller graph for this function:

Member Data Documentation

std::ostringstream G4MTcoutDestination::cerr_buffer
private

Definition at line 79 of file G4MTcoutDestination.hh.

Referenced by DumpBuffer(), and ReceiveG4cerr().

std::ofstream G4MTcoutDestination::cerrFile
private

Definition at line 81 of file G4MTcoutDestination.hh.

Referenced by CloseCerrFile(), ReceiveG4cerr(), and SetCerrFileName().

std::ostringstream G4MTcoutDestination::cout_buffer
private

Definition at line 78 of file G4MTcoutDestination.hh.

Referenced by DumpBuffer(), and ReceiveG4cout().

std::ofstream G4MTcoutDestination::coutFile
private

Definition at line 80 of file G4MTcoutDestination.hh.

Referenced by CloseCoutFile(), ReceiveG4cout(), and SetCoutFileName().

std::ostream& G4MTcoutDestination::finalcerr
private

Definition at line 71 of file G4MTcoutDestination.hh.

Referenced by DumpBuffer(), and ReceiveG4cerr().

std::ostream& G4MTcoutDestination::finalcout
private

Definition at line 70 of file G4MTcoutDestination.hh.

Referenced by DumpBuffer(), and ReceiveG4cout().

const G4int G4MTcoutDestination::id
private

Definition at line 72 of file G4MTcoutDestination.hh.

Referenced by SetIgnoreCout().

G4bool G4MTcoutDestination::ignoreCout
private

Definition at line 76 of file G4MTcoutDestination.hh.

Referenced by ReceiveG4cout(), and SetIgnoreCout().

G4String G4MTcoutDestination::prefix
private

Definition at line 82 of file G4MTcoutDestination.hh.

G4bool G4MTcoutDestination::threadCerrToFile
private
G4bool G4MTcoutDestination::threadCoutToFile
private
G4bool G4MTcoutDestination::useBuffer
private

The documentation for this class was generated from the following files: