LDMX Software
G4Session.h
Go to the documentation of this file.
1
8#ifndef SIMCORE_G4SESSION_H
9#define SIMCORE_G4SESSION_H
10
11#include <string>
12
13#include "Framework/Logger.h"
14#include "G4UIsession.hh"
15
16namespace simcore {
17
32class LoggedSession : public G4UIsession {
33 public:
37 LoggedSession(std::string logging_prefix = "Geant4");
38
42 ~LoggedSession() override = default;
43
49 G4int ReceiveG4cout(const G4String& message) override;
50
56 G4int ReceiveG4cerr(const G4String& message) override;
57
58 private:
60 mutable framework::logging::logger the_log_;
61};
62
63} // namespace simcore
64
65#endif // SIMCORE_G4SESSION_H
Session that routes G4cout and G4cerr through the Framework logger.
Definition G4Session.h:32
LoggedSession(std::string logging_prefix="Geant4")
Constructor - creates a logger named "Geant4".
Definition G4Session.cxx:7
~LoggedSession() override=default
Destructor.
G4int ReceiveG4cout(const G4String &message) override
Receive a message from G4cout.
Definition G4Session.cxx:10
G4int ReceiveG4cerr(const G4String &message) override
Receive a message from G4cerr.
Definition G4Session.cxx:25
framework::logging::logger the_log_
Framework logger for Geant4 messages.
Definition G4Session.h:60
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...