49std::ostream*& _G4cout_p()
55std::ostream*& _G4cerr_p()
61# define G4coutbuf (*_G4coutbuf_p())
62# define G4cerrbuf (*_G4cerrbuf_p())
63# define G4cout (*_G4cout_p())
64# define G4cerr (*_G4cerr_p())
68 if(_G4coutbuf_p() ==
nullptr)
72 if(_G4cerrbuf_p() ==
nullptr)
76 if(_G4cout_p() == &std::cout || _G4cout_p() ==
nullptr)
78 _G4cout_p() =
new std::ostream(_G4coutbuf_p());
80 if(_G4cerr_p() == &std::cerr || _G4cerr_p() ==
nullptr)
82 _G4cerr_p() =
new std::ostream(_G4cerrbuf_p());
89 _G4cout_p() = &std::cout;
91 _G4cerr_p() = &std::cerr;
92 delete _G4coutbuf_p();
93 _G4coutbuf_p() =
nullptr;
94 delete _G4cerrbuf_p();
95 _G4cerrbuf_p() =
nullptr;
103 void setupG4ioSystem() __attribute__((constructor));
104 void cleanupG4ioSystem() __attribute__((destructor));
void G4iosInitialization()
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
#define G4ThreadLocalStatic