Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
SimG4Core
Application
src
CustomUIsession.cc
Go to the documentation of this file.
1
#include "
SimG4Core/Application/interface/CustomUIsession.h
"
2
3
CustomUIsession::CustomUIsession
()
4
{
5
6
G4UImanager *UI = G4UImanager::GetUIpointer();
7
UI->SetCoutDestination(
this
);
8
9
}
10
11
CustomUIsession::~CustomUIsession
()
12
{
13
14
G4UImanager *UI = G4UImanager::GetUIpointer();
15
UI->SetCoutDestination(
NULL
);
16
17
}
18
19
G4int
CustomUIsession::ReceiveG4cout
(
const
G4String& coutString)
20
{
21
//std::cout << coutString << std::flush;
22
edm::LogVerbatim
(
"G4cout"
) <<
trim
(coutString);
23
return
0;
24
}
25
26
G4int
CustomUIsession::ReceiveG4cerr
(
const
G4String& cerrString)
27
{
28
//std::cerr << cerrString << std::flush;
29
edm::LogWarning
(
"G4cerr"
) <<
trim
(cerrString);
30
return
0;
31
}
32
33
std::string
CustomUIsession::trim
(
const
std::string
& str) {
34
if
(!str.empty() && str.back() ==
'\n'
)
35
return
str.substr(0, str.length()-1);
36
return
str;
37
}
CustomUIsession::CustomUIsession
CustomUIsession()
Definition:
CustomUIsession.cc:3
edm::LogWarning
Definition:
MessageLogger.h:140
NULL
#define NULL
Definition:
scimark2.h:8
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
CustomUIsession::trim
std::string trim(const std::string &str)
Definition:
CustomUIsession.cc:33
edm::LogVerbatim
Definition:
MessageLogger.h:240
CustomUIsession::~CustomUIsession
~CustomUIsession()
Definition:
CustomUIsession.cc:11
CustomUIsession::ReceiveG4cerr
G4int ReceiveG4cerr(const G4String &cerrString) override
Definition:
CustomUIsession.cc:26
CustomUIsession.h
CustomUIsession::ReceiveG4cout
G4int ReceiveG4cout(const G4String &coutString) override
Definition:
CustomUIsession.cc:19
Generated for CMSSW Reference Manual by
1.8.5