Problem 1644

Summary: G4MTcoutDestination does not flush output streams
Product: Geant4 Reporter: Andrea Dotti <andrea.dotti>
Component: global/managementAssignee: Andrea Dotti <andrea.dotti>
Status: RESOLVED FIXED    
Severity: trivial    
Priority: P5    
Version: 10.0   
Hardware: All   
OS: All   

Description Andrea Dotti 2014-06-23 00:07:12 CEST
G4MTcoutDestination::ReceiveCout and ReceiveCerr do not add std::flush after adding to output. This may cause issues (apparent missing output) if the application is started with buffering of cout/cerr (for example if application is started in a python wrapper).
Methods should be modified adding:

       finalcout<<prefix<<id
     //         <<" "<<G4StateManager::GetStateManager()->GetStateString(sta)
-             <<" > "<<msg;
+	       <<" > "<<msg<<std::flush

I do realize this is quite a corner case. But we should fix that.

Andrea
Comment 1 Andrea Dotti 2014-06-23 00:08:00 CEST
I will take care of fixing this issue.
I report here for book-keeping.

Andrea
Comment 2 Andrea Dotti 2014-07-01 23:32:35 CEST
Tag global-V10-00-26 proposed for testing.
Comment 3 Andrea Dotti 2014-07-21 18:34:03 CEST
Fix implemented in tag global-V10-00-26.