source: trunk/source/interfaces/test/G4cout_test01/README @ 1228

Last change on this file since 1228 was 989, checked in by garnier, 15 years ago

fichiers manquants

File size: 1.1 KB
Line 
1                README G4cout_test01:
2
3                                        Nov. 09 2002
4                                        H. Yoshida
5                                                update for Geant4.4.1
6
7 This example program illustrates how to use "setCoutDestination" of G4cout
8in order to redirect the stream between two sessions. Usually the constructor
9of a UI class, f.e., G4UIterminal, does setCoutDestination(this) and
10the destructor does setCoutDestination(NULL).
11By explicitly using setCoutDestination, user can redirect G4cout/cerr to one of
12the sessions opened.
13
14 This example is created after examples/novice/exampleN01 which is a pure batch
15one. But this example has an interactive session G4UITerminal(new G4UItcsh) and
16another session "MySession" to  redirect the output to a file named "Mylog".
17
18
19At first, G4UItcsh is instantiated to provide an interactive session.
20When user types in "exit" command, G4UItcsh session is closed, and
21then MySession is used so that all subsequent G4cout/cerr are saved
22in the file "Mylog".
23
24Finally both instances are deleted and the last messages are shown
25on the default display.
26
27Note that when there is no instance of UI sessions, G4cout/cerr are sent to
28the display by default.
29
30
31
32
Note: See TracBrowser for help on using the repository browser.