Ignore:
Timestamp:
Dec 22, 2010, 3:52:27 PM (14 years ago)
Author:
garnier
Message:

geant4 tag 9.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/FukuiRenderer/src/G4FukuiRenderer.cc

    r1337 r1347  
    2525//
    2626//
    27 // $Id: G4FukuiRenderer.cc,v 1.9 2006/06/29 21:16:58 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4FukuiRenderer.cc,v 1.10 2010/11/11 01:13:42 akimura Exp $
     28// GEANT4 tag $Name: geant4-09-04-ref-00 $
    2929//
    3030//
     
    4343#define __G_ANSI_C__
    4444
     45#include "G4VisManager.hh"
    4546//#include "G4VisFeaturesOfFukuiRenderer.hh"
    4647#include "G4VSceneHandler.hh"
     
    114115
    115116#if defined DEBUG_FR_SYSTEM
    116         G4cerr << "***** Unix Inet Domain (AUTO mode)" << G4endl;
     117        if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
     118          G4cout << "***** Unix Inet Domain (AUTO mode)" << G4endl;
    117119#endif
    118120        fIPMode = G4FukuiRenderer::IP_UNIX ;
     
    144146
    145147        if(!flag_connected) {
    146           G4cerr << "***** ERROR: Connection failed" << G4endl;
     148          if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
     149            G4cout << "***** ERROR: Connection failed" << G4endl;
    147150        }
    148151        else {
    149           G4cerr << "***** GEANT4 is connected to FukuiRenderer DAWN ";
    150           G4cerr << "in the same host" << G4endl;
     152          if (G4VisManager::GetVerbosity() >= G4VisManager::errors) {
     153            G4cout << "***** GEANT4 is connected to FukuiRenderer DAWN ";
     154            G4cout << "in the same host" << G4endl;
     155          }
    151156        }
    152157
     
    159164{
    160165#if defined DEBUG_FR_SYSTEM
    161         G4cerr << "***** INET Domain " << G4endl;
     166  if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
     167        G4cout << "***** INET Domain " << G4endl;
    162168#endif
    163169        fIPMode = G4FukuiRenderer::IP_INET ;
     
    166172
    167173        if(!flag_connected) {
    168           G4cerr << "***** ERROR: Connection failed" << G4endl;
     174          if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
     175            G4cout << "***** ERROR: Connection failed" << G4endl;
    169176        }
    170177        else {
    171           G4cerr << "GEANT4 is connected to FukuiRenderer DAWN via socket" ;
    172           G4cerr << G4endl;
     178          if (G4VisManager::GetVerbosity() >= G4VisManager::errors) {
     179            G4cout << "GEANT4 is connected to FukuiRenderer DAWN via socket" ;
     180            G4cout << G4endl;
     181          }
    173182        }
    174183
     
    183192    if ( ++connect_trial > max_port_incr ) {
    184193        this->flag_connected = 0 ;
    185         G4cerr << "***** INET Connection failed."                << G4endl;
    186         G4cerr << "      Maybe, you have not invoked DAWN yet,"  << G4endl;
    187         G4cerr << "      or too many DAWN's are already running" << G4endl;
    188         G4cerr << "      in the server host."                    << G4endl;
     194        if (G4VisManager::GetVerbosity() >= G4VisManager::errors) {
     195          G4cout << "***** INET Connection failed."                << G4endl;
     196          G4cout << "      Maybe, you have not invoked DAWN yet,"  << G4endl;
     197          G4cout << "      or too many DAWN's are already running" << G4endl;
     198          G4cout << "      in the server host."                    << G4endl;
     199        }
    189200        fPrimDest.IncrementPortNumber( (- FR_MAX_PORT_INCR) );
    190201        return ;
     
    192203            // INET domain connection is established
    193204        this->flag_connected = 1 ;
    194         G4cerr << "***** GEANT4 is connected to port  " ;
    195         G4cerr << fPrimDest.GetPortNumber() ;
    196         G4cerr << "  of server" << G4endl;
     205        if (G4VisManager::GetVerbosity() >= G4VisManager::errors) {
     206          G4cout << "***** GEANT4 is connected to port  " ;
     207          G4cout << fPrimDest.GetPortNumber() ;
     208          G4cout << "  of server" << G4endl;
     209        }
    197210        break ;
    198211    } else {
     
    200213      this->flag_connected = 0 ;
    201214      fPrimDest.IncrementPortNumber();
    202       G4cerr << "***** GEANT4 incremented targeting port to " ;
    203       G4cerr << fPrimDest.GetPortNumber() << G4endl;
     215      if (G4VisManager::GetVerbosity() >= G4VisManager::errors) {
     216        G4cout << "***** GEANT4 incremented targeting port to " ;
     217        G4cout << fPrimDest.GetPortNumber() << G4endl;
     218      }
    204219
    205220    } // if-elseif-else
     
    215230
    216231#if defined DEBUG_FR_SYSTEM
    217         G4cerr << "***** UseBSDUnixDomainAuto " << G4endl;
     232        if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
     233          G4cout << "***** UseBSDUnixDomainAuto " << G4endl;
    218234#endif
    219235        fIPMode = G4FukuiRenderer::IP_UNIX ; // Unix domain
     
    241257                        //----- display status
    242258                if(!flag_connected) {
    243                   G4cerr << "***** ERROR: Connection failed" << G4endl;
     259                  if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
     260                    G4cout << "***** ERROR: Connection failed" << G4endl;
    244261                } else {
    245                   G4cerr << "*** GEANT4 is connected to FukuiRenderer DAWN ";
    246                   G4cerr <<  "in the same host" << G4endl;
     262                  if (G4VisManager::GetVerbosity() >= G4VisManager::errors) {
     263                    G4cout << "*** GEANT4 is connected to FukuiRenderer DAWN ";
     264                    G4cout <<  "in the same host" << G4endl;
     265                  }
    247266                }
    248267
Note: See TracChangeset for help on using the changeset viewer.