Geant4-11
|
#include <G4MTcoutDestination.hh>
Public Types | |
using | Transformer = std::function< G4bool(G4String &)> |
Public Member Functions | |
void | AddCerrFileName (const G4String &fileN="G4cerr.txt", G4bool ifAppend=true) |
void | AddCerrTransformer (const Transformer &t) |
void | AddCerrTransformer (Transformer &&t) |
void | AddCoutFileName (const G4String &fileN="G4cout.txt", G4bool ifAppend=true) |
void | AddCoutTransformer (const Transformer &t) |
void | AddCoutTransformer (Transformer &&t) |
void | EnableBuffering (G4bool flag=true) |
G4MTcoutDestination (const G4int &threadId) | |
G4String | GetFullPrefixString () const |
G4String | GetPrefixString () const |
virtual G4int | ReceiveG4cerr (const G4String &msg) override |
G4int | ReceiveG4cerr_ (const G4String &msg) |
virtual G4int | ReceiveG4cout (const G4String &msg) override |
G4int | ReceiveG4cout_ (const G4String &msg) |
virtual void | Reset () |
virtual void | ResetTransformers () |
void | SetCerrFileName (const G4String &fileN="G4cerr.txt", G4bool ifAppend=true) |
void | SetCoutFileName (const G4String &fileN="G4cout.txt", G4bool ifAppend=true) |
void | SetDefaultOutput (G4bool addMasterDestination=true, G4bool formatAlsoMaster=true) |
void | SetIgnoreCout (G4int tid=0) |
void | SetIgnoreInit (G4bool val=true) |
void | SetPrefixString (const G4String &wd="G4WT") |
virtual | ~G4MTcoutDestination () |
Protected Member Functions | |
void | AddMasterOutput (G4bool formatAlsoMaster) |
void | HandleFileCerr (G4String fileN, G4bool appendFlag, G4bool suppressDefault) |
void | HandleFileCout (G4String fileN, G4bool appendFlag, G4bool suppressDefault) |
Protected Attributes | |
std::vector< Transformer > | transformersCerr |
std::vector< Transformer > | transformersCout |
Static Protected Attributes | |
static G4MTGLOB_DLL G4coutDestination * | masterG4coutDestination = nullptr |
Private Member Functions | |
void | DumpBuffer () |
Private Attributes | |
const G4int | id |
G4bool | ignoreCout = false |
G4bool | ignoreInit = true |
G4bool | masterDestinationFlag = true |
G4bool | masterDestinationFmtFlag = true |
G4String | prefix = "G4WT" |
G4coutDestination * | ref_defaultOut = nullptr |
G4coutDestination * | ref_masterOut = nullptr |
G4StateManager * | stateMgr = nullptr |
G4bool | useBuffer = false |
Definition at line 45 of file G4MTcoutDestination.hh.
|
inherited |
Definition at line 61 of file G4coutDestination.hh.
|
explicit |
Definition at line 48 of file G4MTcoutDestination.cc.
References G4cerrbuf, G4coutbuf, G4StateManager::GetStateManager(), masterDestinationFlag, masterDestinationFmtFlag, SetDefaultOutput(), G4strstreambuf::SetDestination(), and stateMgr.
|
virtual |
Definition at line 132 of file G4MTcoutDestination.cc.
References DumpBuffer(), and useBuffer.
void G4MTcoutDestination::AddCerrFileName | ( | const G4String & | fileN = "G4cerr.txt" , |
G4bool | ifAppend = true |
||
) |
Definition at line 254 of file G4MTcoutDestination.cc.
References HandleFileCerr().
|
inlineinherited |
Definition at line 67 of file G4coutDestination.hh.
References G4coutDestination::transformersCerr.
Referenced by HandleFileCerr().
|
inlineinherited |
Definition at line 71 of file G4coutDestination.hh.
References G4coutDestination::transformersCerr.
void G4MTcoutDestination::AddCoutFileName | ( | const G4String & | fileN = "G4cout.txt" , |
G4bool | ifAppend = true |
||
) |
Definition at line 233 of file G4MTcoutDestination.cc.
References HandleFileCout().
|
inlineinherited |
Definition at line 62 of file G4coutDestination.hh.
References G4coutDestination::transformersCout.
Referenced by AddMasterOutput(), HandleFileCout(), and SetDefaultOutput().
|
inlineinherited |
Definition at line 66 of file G4coutDestination.hh.
References G4coutDestination::transformersCout.
|
protected |
Definition at line 99 of file G4MTcoutDestination.cc.
References G4coutDestination::AddCoutTransformer(), G4State_Idle, G4Threading::GENERICTHREAD_ID, G4StateManager::GetCurrentState(), id, ignoreCout, ignoreInit, prefix, ref_masterOut, and stateMgr.
Referenced by SetDefaultOutput().
|
private |
Definition at line 279 of file G4MTcoutDestination.cc.
References anonymous_namespace{G4MTcoutDestination.cc}::coutm, G4BuffercoutDestination::FlushG4cerr(), G4BuffercoutDestination::FlushG4cout(), and G4coutDestination::ReceiveG4cout().
Referenced by EnableBuffering(), and ~G4MTcoutDestination().
void G4MTcoutDestination::EnableBuffering | ( | G4bool | flag = true | ) |
Definition at line 202 of file G4MTcoutDestination.cc.
References DumpBuffer(), Reset(), and useBuffer.
Referenced by G4UImanager::SetThreadUseBuffer().
|
inline |
Definition at line 73 of file G4MTcoutDestination.hh.
References id.
Referenced by G4UIQt::GetThreadPrefix().
|
inline |
Definition at line 72 of file G4MTcoutDestination.hh.
References prefix.
Referenced by G4UIQt::GetThreadPrefix().
|
protected |
Definition at line 171 of file G4MTcoutDestination.cc.
References G4coutDestination::AddCerrTransformer(), demo::app, ref_defaultOut, and ref_masterOut.
Referenced by AddCerrFileName(), and SetCerrFileName().
|
protected |
Definition at line 146 of file G4MTcoutDestination.cc.
References G4coutDestination::AddCoutTransformer(), demo::app, ref_defaultOut, and ref_masterOut.
Referenced by AddCoutFileName(), and SetCoutFileName().
|
inlineoverridevirtualinherited |
Reimplemented from G4coutDestination.
Definition at line 79 of file G4MulticoutDestination.hh.
Definition at line 84 of file G4coutDestination.cc.
References m, G4coutDestination::ReceiveG4cerr(), G4coutDestination::transformersCerr, and G4coutDestination::transformersCout.
Referenced by G4MasterForwardcoutDestination::ReceiveG4cerr().
|
inlineoverridevirtualinherited |
Reimplemented from G4coutDestination.
Definition at line 70 of file G4MulticoutDestination.hh.
Definition at line 62 of file G4coutDestination.cc.
References m, G4coutDestination::ReceiveG4cout(), and G4coutDestination::transformersCout.
Referenced by G4MasterForwardcoutDestination::ReceiveG4cout().
|
virtual |
Definition at line 139 of file G4MTcoutDestination.cc.
References masterDestinationFlag, masterDestinationFmtFlag, and SetDefaultOutput().
Referenced by EnableBuffering(), SetCerrFileName(), and SetCoutFileName().
|
virtualinherited |
Definition at line 41 of file G4coutDestination.cc.
References G4coutDestination::transformersCerr, and G4coutDestination::transformersCout.
void G4MTcoutDestination::SetCerrFileName | ( | const G4String & | fileN = "G4cerr.txt" , |
G4bool | ifAppend = true |
||
) |
Definition at line 242 of file G4MTcoutDestination.cc.
References HandleFileCerr(), and Reset().
Referenced by G4UImanager::SetCerrFileName().
void G4MTcoutDestination::SetCoutFileName | ( | const G4String & | fileN = "G4cout.txt" , |
G4bool | ifAppend = true |
||
) |
Definition at line 190 of file G4MTcoutDestination.cc.
References HandleFileCout(), and Reset().
Referenced by G4UImanager::SetCoutFileName().
void G4MTcoutDestination::SetDefaultOutput | ( | G4bool | addMasterDestination = true , |
G4bool | formatAlsoMaster = true |
||
) |
Definition at line 60 of file G4MTcoutDestination.cc.
References G4coutDestination::AddCoutTransformer(), AddMasterOutput(), G4State_Init, G4Threading::GENERICTHREAD_ID, G4StateManager::GetCurrentState(), id, ignoreCout, ignoreInit, masterDestinationFlag, masterDestinationFmtFlag, prefix, ref_defaultOut, and stateMgr.
Referenced by G4MTcoutDestination(), and Reset().
void G4MTcoutDestination::SetIgnoreCout | ( | G4int | tid = 0 | ) |
Definition at line 261 of file G4MTcoutDestination.cc.
References id, and ignoreCout.
Referenced by G4UImanager::SetThreadIgnore(), G4UImanager::SetUpForAThread(), and G4UImanager::SetUpForSpecialThread().
|
inline |
Definition at line 70 of file G4MTcoutDestination.hh.
References ignoreInit.
Referenced by G4UImanager::SetThreadIgnoreInit().
|
inline |
Definition at line 67 of file G4MTcoutDestination.hh.
Referenced by G4UImanager::SetThreadPrefixString(), and G4UImanager::SetUpForSpecialThread().
|
private |
Definition at line 99 of file G4MTcoutDestination.hh.
Referenced by AddMasterOutput(), GetFullPrefixString(), SetDefaultOutput(), and SetIgnoreCout().
|
private |
Definition at line 101 of file G4MTcoutDestination.hh.
Referenced by AddMasterOutput(), SetDefaultOutput(), and SetIgnoreCout().
|
private |
Definition at line 102 of file G4MTcoutDestination.hh.
Referenced by AddMasterOutput(), SetDefaultOutput(), and SetIgnoreInit().
|
private |
Definition at line 96 of file G4MTcoutDestination.hh.
Referenced by G4MTcoutDestination(), Reset(), and SetDefaultOutput().
|
private |
Definition at line 97 of file G4MTcoutDestination.hh.
Referenced by G4MTcoutDestination(), Reset(), and SetDefaultOutput().
|
staticprotectedinherited |
Definition at line 88 of file G4coutDestination.hh.
Referenced by G4UIQt::G4UIQt(), G4MasterForwardcoutDestination::ReceiveG4cerr(), G4MasterForwardcoutDestination::ReceiveG4cout(), and G4UIQt::~G4UIQt().
|
private |
Definition at line 104 of file G4MTcoutDestination.hh.
Referenced by AddMasterOutput(), GetPrefixString(), and SetDefaultOutput().
|
private |
Definition at line 92 of file G4MTcoutDestination.hh.
Referenced by HandleFileCerr(), HandleFileCout(), and SetDefaultOutput().
|
private |
Definition at line 95 of file G4MTcoutDestination.hh.
Referenced by AddMasterOutput(), HandleFileCerr(), and HandleFileCout().
|
private |
Definition at line 105 of file G4MTcoutDestination.hh.
Referenced by AddMasterOutput(), G4MTcoutDestination(), and SetDefaultOutput().
|
protectedinherited |
Definition at line 94 of file G4coutDestination.hh.
Referenced by G4coutDestination::AddCerrTransformer(), G4coutDestination::ReceiveG4cerr_(), and G4coutDestination::ResetTransformers().
|
protectedinherited |
Definition at line 93 of file G4coutDestination.hh.
Referenced by G4coutDestination::AddCoutTransformer(), G4coutDestination::ReceiveG4cerr_(), G4coutDestination::ReceiveG4cout_(), and G4coutDestination::ResetTransformers().
|
private |
Definition at line 100 of file G4MTcoutDestination.hh.
Referenced by EnableBuffering(), and ~G4MTcoutDestination().