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

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

+ Inheritance diagram for G4FilecoutDestination:
+ Collaboration diagram for G4FilecoutDestination:

Public Member Functions

 G4FilecoutDestination (const G4String &fname, std::ios_base::openmode mode=std::ios_base::app)
 
virtual ~G4FilecoutDestination ()
 
void SetFileName (const G4String &fname)
 
void Open (std::ios_base::openmode mode=std::ios_base::app)
 
void Close ()
 
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)
 

Private Attributes

G4String m_name
 
std::ios_base::openmode m_mode
 
std::unique_ptr< std::ofstream > m_output
 

Additional Inherited Members

- Public Types inherited from G4coutDestination
using Transformer = std::function< G4bool(G4String &)>
 
- 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 G4FilecoutDestination.hh.

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

Constructor & Destructor Documentation

G4FilecoutDestination::G4FilecoutDestination ( const G4String fname,
std::ios_base::openmode  mode = std::ios_base::app 
)
inlineexplicit

Definition at line 52 of file G4FilecoutDestination.hh.

View newest version in sPHENIX GitHub at line 52 of file G4FilecoutDestination.hh

G4FilecoutDestination::~G4FilecoutDestination ( )
virtual

Definition at line 38 of file G4FilecoutDestination.cc.

View newest version in sPHENIX GitHub at line 38 of file G4FilecoutDestination.cc

References Close(), and m_output.

+ Here is the call graph for this function:

Member Function Documentation

void G4FilecoutDestination::Close ( )

Definition at line 57 of file G4FilecoutDestination.cc.

View newest version in sPHENIX GitHub at line 57 of file G4FilecoutDestination.cc

References m_output.

Referenced by Open(), and ~G4FilecoutDestination().

+ Here is the caller graph for this function:

void G4FilecoutDestination::Open ( std::ios_base::openmode  mode = std::ios_base::app)

Definition at line 44 of file G4FilecoutDestination.cc.

View newest version in sPHENIX GitHub at line 44 of file G4FilecoutDestination.cc

References Close(), G4String::isNull(), m_name, and m_output.

Referenced by ReceiveG4cerr(), and ReceiveG4cout().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4int G4FilecoutDestination::ReceiveG4cerr ( const G4String msg)
overridevirtual

Reimplemented from G4coutDestination.

Definition at line 72 of file G4FilecoutDestination.cc.

View newest version in sPHENIX GitHub at line 72 of file G4FilecoutDestination.cc

References m_mode, m_output, and Open().

+ Here is the call graph for this function:

G4int G4FilecoutDestination::ReceiveG4cout ( const G4String msg)
overridevirtual

Reimplemented from G4coutDestination.

Definition at line 65 of file G4FilecoutDestination.cc.

View newest version in sPHENIX GitHub at line 65 of file G4FilecoutDestination.cc

References m_mode, m_output, and Open().

+ Here is the call graph for this function:

void G4FilecoutDestination::SetFileName ( const G4String fname)
inline

Definition at line 57 of file G4FilecoutDestination.hh.

View newest version in sPHENIX GitHub at line 57 of file G4FilecoutDestination.hh

References test::fname, and m_name.

Member Data Documentation

std::ios_base::openmode G4FilecoutDestination::m_mode
private

Definition at line 69 of file G4FilecoutDestination.hh.

View newest version in sPHENIX GitHub at line 69 of file G4FilecoutDestination.hh

Referenced by ReceiveG4cerr(), and ReceiveG4cout().

G4String G4FilecoutDestination::m_name
private

Definition at line 68 of file G4FilecoutDestination.hh.

View newest version in sPHENIX GitHub at line 68 of file G4FilecoutDestination.hh

Referenced by Open(), and SetFileName().

std::unique_ptr<std::ofstream> G4FilecoutDestination::m_output
private

Definition at line 70 of file G4FilecoutDestination.hh.

View newest version in sPHENIX GitHub at line 70 of file G4FilecoutDestination.hh

Referenced by Close(), Open(), ReceiveG4cerr(), ReceiveG4cout(), and ~G4FilecoutDestination().


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