CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CustomUIsession.h
Go to the documentation of this file.
1 #ifndef SimG4Core_CustomUIsession_H
2 #define SimG4Core_CustomUIsession_H
3 
4 #include "G4UIsession.hh"
6 
7 #include <fstream>
8 
9 class CustomUIsession : public G4UIsession {
10 public:
12  ~CustomUIsession() override;
13 
14  G4int ReceiveG4cout(const G4String& coutString) override;
15  G4int ReceiveG4cerr(const G4String& cerrString) override;
16 
17  void sendToFile(std::ofstream*);
18  inline void stopSendToFile() { fout = nullptr; }
19 
20 protected:
22 
23 private:
24  std::ofstream* fout;
25 };
26 
27 #endif
std::ofstream * fout
void sendToFile(std::ofstream *)
std::string trim(const std::string &str)
G4int ReceiveG4cerr(const G4String &cerrString) override
G4int ReceiveG4cout(const G4String &coutString) override
~CustomUIsession() override
#define str(s)