ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4MTcoutDestination Class Reference

#include <geant4/tree/geant4-10.6-release/source/global/management/include/G4MTcoutDestination.hh>

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

Public Member Functions

 G4MTcoutDestination (const G4int &threadId)
 
virtual ~G4MTcoutDestination ()
 
virtual void Reset ()
 
void SetDefaultOutput (G4bool addMasterDestination=true, G4bool formatAlsoMaster=true)
 
void SetCoutFileName (const G4String &fileN="G4cout.txt", G4bool ifAppend=true)
 
void AddCoutFileName (const G4String &fileN="G4cout.txt", G4bool ifAppend=true)
 
void SetCerrFileName (const G4String &fileN="G4cerr.txt", G4bool ifAppend=true)
 
void AddCerrFileName (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 G4MulticoutDestination
 G4MulticoutDestination ()=default
 
virtual ~G4MulticoutDestination ()
 
virtual G4int ReceiveG4cout (const G4String &msg) override
 
virtual G4int ReceiveG4cerr (const G4String &msg) override
 
- Public Member Functions inherited from G4coutDestination
 G4coutDestination ()=default
 
virtual ~G4coutDestination ()
 
void AddCoutTransformer (const Transformer &t)
 
void AddCoutTransformer (Transformer &&t)
 
void AddCerrTransformer (const Transformer &t)
 
void AddCerrTransformer (Transformer &&t)
 
virtual void ResetTransformers ()
 
G4int ReceiveG4cout_ (const G4String &msg)
 
G4int ReceiveG4cerr_ (const G4String &msg)
 

Protected Member Functions

void AddMasterOutput (G4bool formatAlsoMaster)
 
void HandleFileCout (G4String fileN, G4bool appendFlag, G4bool suppressDefault)
 
void HandleFileCerr (G4String fileN, G4bool appendFlag, G4bool suppressDefault)
 

Private Member Functions

void DumpBuffer ()
 

Private Attributes

G4coutDestinationref_defaultOut
 
G4coutDestinationref_masterOut
 
G4bool masterDestinationFlag
 
G4bool masterDestinationFmtFlag
 
const G4int id
 
G4bool useBuffer
 
G4bool ignoreCout
 
G4bool ignoreInit
 
G4String prefix
 
G4StateManagerstateMgr
 

Additional Inherited Members

- Public Types inherited from G4coutDestination
using Transformer = std::function< G4bool(G4String &)>
 
- Public Attributes inherited from std::vector< T >
T elements
 STL member.
 
- Protected Attributes inherited from G4coutDestination
std::vector< TransformertransformersCout
 
std::vector< TransformertransformersCerr
 
- Static Protected Attributes inherited from G4coutDestination
static G4MTGLOB_DLL
G4coutDestination
masterG4coutDestination = nullptr
 

Detailed Description

Definition at line 48 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 48 of file G4MTcoutDestination.hh

Constructor & Destructor Documentation

G4MTcoutDestination::G4MTcoutDestination ( const G4int threadId)
explicit

Definition at line 49 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 49 of file G4MTcoutDestination.cc

References G4cerrbuf, G4coutbuf, G4StateManager::GetStateManager(), masterDestinationFlag, masterDestinationFmtFlag, SetDefaultOutput(), G4strstreambuf::SetDestination(), and stateMgr.

+ Here is the call graph for this function:

G4MTcoutDestination::~G4MTcoutDestination ( )
virtual

Definition at line 130 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 130 of file G4MTcoutDestination.cc

References DumpBuffer(), and useBuffer.

+ Here is the call graph for this function:

Member Function Documentation

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

Definition at line 236 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 236 of file G4MTcoutDestination.cc

References HandleFileCerr().

+ Here is the call graph for this function:

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

Definition at line 217 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 217 of file G4MTcoutDestination.cc

References HandleFileCout().

+ Here is the call graph for this function:

void G4MTcoutDestination::AddMasterOutput ( G4bool  formatAlsoMaster)
protected

Definition at line 99 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 99 of file G4MTcoutDestination.cc

References G4coutDestination::AddCoutTransformer(), f, G4State_Idle, G4Threading::GENERICTHREAD_ID, G4StateManager::GetCurrentState(), id, ignoreCout, ignoreInit, prefix, ref_masterOut, and stateMgr.

Referenced by SetDefaultOutput().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4MTcoutDestination::DumpBuffer ( )
private

Definition at line 253 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 253 of file G4MTcoutDestination.cc

References G4BuffercoutDestination::FlushG4cerr(), G4BuffercoutDestination::FlushG4cout(), and G4coutDestination::ReceiveG4cout().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4MTcoutDestination::EnableBuffering ( G4bool  flag = true)

Definition at line 194 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 194 of file G4MTcoutDestination.cc

References clear(), DumpBuffer(), Reset(), and useBuffer.

Referenced by G4UImanager::SetThreadUseBuffer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4String G4MTcoutDestination::GetFullPrefixString ( ) const
inline

Definition at line 77 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 77 of file G4MTcoutDestination.hh

References id.

G4String G4MTcoutDestination::GetPrefixString ( ) const
inline

Definition at line 76 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 76 of file G4MTcoutDestination.hh

References prefix.

void G4MTcoutDestination::HandleFileCerr ( G4String  fileN,
G4bool  appendFlag,
G4bool  suppressDefault 
)
protected

Definition at line 165 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 165 of file G4MTcoutDestination.cc

References G4coutDestination::AddCerrTransformer(), demo::app, ref_defaultOut, and ref_masterOut.

Referenced by AddCerrFileName(), and SetCerrFileName().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4MTcoutDestination::HandleFileCout ( G4String  fileN,
G4bool  appendFlag,
G4bool  suppressDefault 
)
protected

Definition at line 141 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 141 of file G4MTcoutDestination.cc

References G4coutDestination::AddCoutTransformer(), demo::app, ref_defaultOut, and ref_masterOut.

Referenced by AddCoutFileName(), and SetCoutFileName().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4MTcoutDestination::Reset ( )
virtual

Definition at line 135 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 135 of file G4MTcoutDestination.cc

References clear(), masterDestinationFlag, masterDestinationFmtFlag, and SetDefaultOutput().

Referenced by EnableBuffering(), SetCerrFileName(), and SetCoutFileName().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 225 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 225 of file G4MTcoutDestination.cc

References HandleFileCerr(), and Reset().

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 183 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 183 of file G4MTcoutDestination.cc

References HandleFileCout(), and Reset().

Referenced by G4UImanager::SetCoutFileName().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4MTcoutDestination::SetDefaultOutput ( G4bool  addMasterDestination = true,
G4bool  formatAlsoMaster = true 
)

Definition at line 63 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 63 of file G4MTcoutDestination.cc

References G4coutDestination::AddCoutTransformer(), AddMasterOutput(), f, G4State_Init, G4Threading::GENERICTHREAD_ID, G4StateManager::GetCurrentState(), id, ignoreCout, ignoreInit, masterDestinationFlag, masterDestinationFmtFlag, prefix, ref_defaultOut, and stateMgr.

Referenced by G4MTcoutDestination(), and Reset().

+ 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 242 of file G4MTcoutDestination.cc.

View newest version in sPHENIX GitHub at line 242 of file G4MTcoutDestination.cc

References id, and ignoreCout.

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

+ Here is the caller graph for this function:

void G4MTcoutDestination::SetIgnoreInit ( G4bool  val = true)
inline

Definition at line 74 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 74 of file G4MTcoutDestination.hh

References ignoreInit.

Referenced by G4UImanager::SetThreadIgnoreInit().

+ Here is the caller graph for this function:

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

Definition at line 71 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 71 of file G4MTcoutDestination.hh

Referenced by G4UImanager::SetThreadPrefixString(), and G4UImanager::SetUpForSpecialThread().

+ Here is the caller graph for this function:

Member Data Documentation

const G4int G4MTcoutDestination::id
private

Definition at line 105 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 105 of file G4MTcoutDestination.hh

Referenced by AddMasterOutput(), GetFullPrefixString(), SetDefaultOutput(), and SetIgnoreCout().

G4bool G4MTcoutDestination::ignoreCout
private

Definition at line 107 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 107 of file G4MTcoutDestination.hh

Referenced by AddMasterOutput(), SetDefaultOutput(), and SetIgnoreCout().

G4bool G4MTcoutDestination::ignoreInit
private

Definition at line 108 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 108 of file G4MTcoutDestination.hh

Referenced by AddMasterOutput(), SetDefaultOutput(), and SetIgnoreInit().

G4bool G4MTcoutDestination::masterDestinationFlag
private

Definition at line 102 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 102 of file G4MTcoutDestination.hh

Referenced by G4MTcoutDestination(), Reset(), and SetDefaultOutput().

G4bool G4MTcoutDestination::masterDestinationFmtFlag
private

Definition at line 103 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 103 of file G4MTcoutDestination.hh

Referenced by G4MTcoutDestination(), Reset(), and SetDefaultOutput().

G4String G4MTcoutDestination::prefix
private

Definition at line 110 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 110 of file G4MTcoutDestination.hh

Referenced by AddMasterOutput(), GetPrefixString(), and SetDefaultOutput().

G4coutDestination* G4MTcoutDestination::ref_defaultOut
private

Definition at line 98 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 98 of file G4MTcoutDestination.hh

Referenced by HandleFileCerr(), HandleFileCout(), and SetDefaultOutput().

G4coutDestination* G4MTcoutDestination::ref_masterOut
private

Definition at line 101 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 101 of file G4MTcoutDestination.hh

Referenced by AddMasterOutput(), HandleFileCerr(), and HandleFileCout().

G4StateManager* G4MTcoutDestination::stateMgr
private

Definition at line 111 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 111 of file G4MTcoutDestination.hh

Referenced by AddMasterOutput(), G4MTcoutDestination(), and SetDefaultOutput().

G4bool G4MTcoutDestination::useBuffer
private

Definition at line 106 of file G4MTcoutDestination.hh.

View newest version in sPHENIX GitHub at line 106 of file G4MTcoutDestination.hh

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


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