40 #ifdef G4MULTITHREADED
54 std::ostream*& _G4cout_p()
60 std::ostream*& _G4cerr_p()
66 #define G4coutbuf (*_G4coutbuf_p())
67 #define G4cerrbuf (*_G4cerrbuf_p())
68 #define G4cout (*_G4cout_p())
69 #define G4cerr (*_G4cerr_p())
75 if (_G4cout_p() == &std::cout || _G4cout_p() == 0) _G4cout_p() =
new std::ostream(_G4coutbuf_p());
76 if (_G4cerr_p() == &std::cerr || _G4cerr_p() == 0) _G4cerr_p() =
new std::ostream(_G4cerrbuf_p());
81 delete _G4cout_p(); _G4cout_p() = &std::cout;
82 delete _G4cerr_p(); _G4cerr_p() = &std::cerr;
83 delete _G4coutbuf_p(); _G4coutbuf_p() =
nullptr;
84 delete _G4cerrbuf_p(); _G4cerrbuf_p() =
nullptr;