LDMX Software
|
Log the output of Geant4 to files in current directory. More...
#include <G4Session.h>
Public Member Functions | |
LoggedSession (const std::string &coutFileName="G4cout.log", const std::string &cerrFileName="G4cerr.log") | |
Constructor. | |
~LoggedSession () | |
Destructor. | |
G4UIsession * | SessionStart () |
Required hook for Geant4. | |
G4int | ReceiveG4cout (const G4String &message) |
Redirects cout to file. | |
G4int | ReceiveG4cerr (const G4String &message) |
Redirects cerr to file. | |
Private Attributes | |
std::ofstream | coutFile_ |
cout log file | |
std::ofstream | cerrFile_ |
cerr log file | |
Log the output of Geant4 to files in current directory.
Definition at line 23 of file G4Session.h.
simcore::LoggedSession::LoggedSession | ( | const std::string & | coutFileName = "G4cout.log" , |
const std::string & | cerrFileName = "G4cerr.log" |
||
) |
Constructor.
Sets up output file streams for the cout and cerr paths.
Definition at line 13 of file G4Session.cxx.
simcore::LoggedSession::~LoggedSession | ( | ) |
G4int simcore::LoggedSession::ReceiveG4cerr | ( | const G4String & | message | ) |
G4int simcore::LoggedSession::ReceiveG4cout | ( | const G4String & | message | ) |
|
inline |
Required hook for Geant4.
Does nothing
Definition at line 45 of file G4Session.h.
|
private |
cerr log file
Definition at line 62 of file G4Session.h.
Referenced by LoggedSession(), ReceiveG4cerr(), and ~LoggedSession().
|
private |
cout log file
Definition at line 59 of file G4Session.h.
Referenced by LoggedSession(), ReceiveG4cout(), and ~LoggedSession().