glogging
Loading...
Searching...
No Matches
gbatch_session.h
Go to the documentation of this file.
1
#pragma once
2
3
// geant4
4
#include "G4UIsession.hh"
5
6
// c++
7
#include <fstream>
8
16
class
GBatch_Session
:
public
G4UIsession {
17
public
:
18
GBatch_Session
() {
19
logFile.open(
"gemc.log"
);
20
errFile.open(
"gemc.err"
);
21
}
22
23
G4int
ReceiveG4cout
(
const
G4String &coutString)
override
{
24
logFile << coutString << std::flush;
25
std::cout << coutString << std::flush;
26
return
0;
27
}
28
29
G4int
ReceiveG4cerr
(
const
G4String &cerrString)
override
{
30
errFile << cerrString << std::flush;
31
std::cerr << cerrString << std::flush;
32
return
0;
33
}
34
35
private
:
36
std::ofstream logFile;
37
std::ofstream errFile;
38
};
39
GBatch_Session
The new G4UIsession passed to the G4UImanager.
Definition
gbatch_session.h:16
GBatch_Session::ReceiveG4cerr
G4int ReceiveG4cerr(const G4String &cerrString) override
Definition
gbatch_session.h:29
GBatch_Session::GBatch_Session
GBatch_Session()
Definition
gbatch_session.h:18
GBatch_Session::ReceiveG4cout
G4int ReceiveG4cout(const G4String &coutString) override
Definition
gbatch_session.h:23
gbatch_session.h
Generated by
1.10.0