Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MasterForwardcoutDestination Class Reference

#include <G4MasterForwardcoutDestination.hh>

+ Inheritance diagram for G4MasterForwardcoutDestination:

Public Member Functions

 G4MasterForwardcoutDestination ()=default
 
 ~G4MasterForwardcoutDestination () override=default
 
G4int ReceiveG4debug (const G4String &msg) override
 
G4int ReceiveG4cout (const G4String &msg) override
 
G4int ReceiveG4cerr (const G4String &msg) override
 
- Public Member Functions inherited from G4coutDestination
 G4coutDestination ()=default
 
virtual ~G4coutDestination ()=default
 
void AddDebugTransformer (const Transformer &t)
 
void AddDebugTransformer (Transformer &&t)
 
void AddCoutTransformer (const Transformer &t)
 
void AddCoutTransformer (Transformer &&t)
 
void AddCerrTransformer (const Transformer &t)
 
void AddCerrTransformer (Transformer &&t)
 
virtual void ResetTransformers ()
 
G4int ReceiveG4debug_ (const G4String &msg)
 
G4int ReceiveG4cout_ (const G4String &msg)
 
G4int ReceiveG4cerr_ (const G4String &msg)
 

Additional Inherited Members

- Public Types inherited from G4coutDestination
using Transformer = std::function<G4bool(G4String&)>
 
- Protected Attributes inherited from G4coutDestination
std::vector< TransformertransformersDebug
 
std::vector< TransformertransformersCout
 
std::vector< TransformertransformersCerr
 
- Static Protected Attributes inherited from G4coutDestination
static G4MTGLOB_DLL G4coutDestinationmasterG4coutDestination = nullptr
 

Detailed Description

Definition at line 44 of file G4MasterForwardcoutDestination.hh.

Constructor & Destructor Documentation

◆ G4MasterForwardcoutDestination()

G4MasterForwardcoutDestination::G4MasterForwardcoutDestination ( )
default

◆ ~G4MasterForwardcoutDestination()

G4MasterForwardcoutDestination::~G4MasterForwardcoutDestination ( )
overridedefault

Member Function Documentation

◆ ReceiveG4cerr()

G4int G4MasterForwardcoutDestination::ReceiveG4cerr ( const G4String & msg)
overridevirtual

Reimplemented from G4coutDestination.

Definition at line 70 of file G4MasterForwardcoutDestination.cc.

71{
72 if((masterG4coutDestination != nullptr) && this != masterG4coutDestination)
73 {
74 G4AutoLock l(&out_mutex);
76 }
77 return 0;
78}
static G4MTGLOB_DLL G4coutDestination * masterG4coutDestination
G4int ReceiveG4cerr_(const G4String &msg)

◆ ReceiveG4cout()

G4int G4MasterForwardcoutDestination::ReceiveG4cout ( const G4String & msg)
overridevirtual

Reimplemented from G4coutDestination.

Definition at line 55 of file G4MasterForwardcoutDestination.cc.

56{
57 // If a master destination is set check that we are not in a recursive
58 // situation, send the message to the master, using a lock to serialize calls
59 // Master is probably a (G)UI that is not thread-safe
60
61 if((masterG4coutDestination != nullptr) && this != masterG4coutDestination)
62 {
63 G4AutoLock l(&out_mutex);
65 }
66 return 0;
67}
G4int ReceiveG4cout_(const G4String &msg)

◆ ReceiveG4debug()

G4int G4MasterForwardcoutDestination::ReceiveG4debug ( const G4String & msg)
overridevirtual

Reimplemented from G4coutDestination.

Definition at line 40 of file G4MasterForwardcoutDestination.cc.

41{
42 // If a master destination is set check that we are not in a recursive
43 // situation, send the message to the master, using a lock to serialize calls
44 // Master is probably a (G)UI that is not thread-safe
45
46 if((masterG4coutDestination != nullptr) && this != masterG4coutDestination)
47 {
48 G4AutoLock l(&out_mutex);
50 }
51 return 0;
52}
G4int ReceiveG4debug_(const G4String &msg)

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