49std::ostream*& _G4cout_p()
52 new std::ostream(_G4coutbuf_p());
56std::ostream*& _G4cerr_p()
59 new std::ostream(_G4cerrbuf_p());
63# define G4coutbuf (*_G4coutbuf_p())
64# define G4cerrbuf (*_G4cerrbuf_p())
65# define G4cout (*_G4cout_p())
66# define G4cerr (*_G4cerr_p())
70 if(_G4coutbuf_p() ==
nullptr)
72 if(_G4cerrbuf_p() ==
nullptr)
74 if(_G4cout_p() == &std::cout || _G4cout_p() ==
nullptr)
75 _G4cout_p() =
new std::ostream(_G4coutbuf_p());
76 if(_G4cerr_p() == &std::cerr || _G4cerr_p() ==
nullptr)
77 _G4cerr_p() =
new std::ostream(_G4cerrbuf_p());
83 _G4cout_p() = &std::cout;
85 _G4cerr_p() = &std::cerr;
86 delete _G4coutbuf_p();
87 _G4coutbuf_p() =
nullptr;
88 delete _G4cerrbuf_p();
89 _G4cerrbuf_p() =
nullptr;
97 void setupG4ioSystem(
void) __attribute__((constructor));
98 void cleanupG4ioSystem(
void) __attribute__((destructor));
void G4iosInitialization()
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
#define G4ThreadLocalStatic