Ignore:
Timestamp:
Nov 3, 2009, 11:17:28 AM (16 years ago)
Author:
garnier
Message:

update to CVS

Location:
trunk/source/visualization/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/test/History

    r1093 r1140  
    1 $Id: History,v 1.117 2009/07/28 12:50:51 lgarnier Exp $
     1$Id: History,v 1.119 2009/09/29 21:36:38 allison Exp $
    22
    33History file for visualization/test subdirectory
     
    55
    66$Log: History,v $
     7Revision 1.119  2009/09/29 21:36:38  allison
     8vistest-V09-02-00
     9
     10Revision 1.118  2009/09/29 21:35:56  allison
     11Changed main program, test19.cc, to use G4UIExecutive.
     12
    713Revision 1.117  2009/07/28 12:50:51  lgarnier
    814Adding Qt support for test19
  • trunk/source/visualization/test/test19.cc

    r1093 r1140  
    2525//
    2626//
    27 // $Id: test19.cc,v 1.30 2009/07/28 12:50:51 lgarnier Exp $
     27// $Id: test19.cc,v 1.31 2009/09/29 21:35:56 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    4848#include "MySteppingAction.hh"
    4949
    50 #include "G4UIterminal.hh"
    51 #if defined(G4UI_USE_GAG)
    52   #include "G4UIGAG.hh"
    53 #elif defined(G4UI_USE_TCSH)
    54   #include "G4UItcsh.hh"
    55 #elif defined(G4UI_USE_WO)
    56   #include "G4UIWo.hh"
    57 #elif defined(G4UI_USE_XM)
    58   #include "G4UIXm.hh"
    59 #elif defined(G4UI_USE_XAW)
    60   #include "G4UIXaw.hh"
    61 #elif defined(G4UI_USE_WIN32)
    62   #include "G4UIWin32.hh"
    63 #elif defined(G4UI_USE_QT)
    64   #include "G4UIQt.hh"
     50#ifdef G4UI_USE
     51#include "G4UIExecutive.hh"
    6552#endif
    6653
     
    9380#endif
    9481
     82#ifdef G4UI_USE
    9583  // Choose (G)UI.
    96   G4UIsession* session;
    97 #ifdef G4UI_USE_WIN32
    98   session = new G4UIWin32 (hInstance,hPrevInstance,lpszCmdLine,nCmdShow);
    99 #else
    100   if (argc >= 2) {
    101   #if defined(G4UI_USE_TCSH)
    102     if (strcmp (argv[1], "tcsh")==0)     session =
    103       new G4UIterminal(new G4UItcsh);
    104   #elif defined(G4UI_USE_WO)
    105     if (strcmp (argv[1], "Wo")==0)  session = new G4UIWo (argc, argv);
    106   #elif defined(G4UI_USE_XM)
    107     if (strcmp (argv[1], "Xm")==0)  session = new G4UIXm (argc, argv);
    108   #elif defined(G4UI_USE_XAW)
    109     if (strcmp (argv[1], "Xaw")==0) session = new G4UIXaw (argc, argv);
    110   #elif defined(G4UI_USE_GAG)
    111     if (strcmp (argv[1], "gag")==0) session = new G4UIGAG ;
    112   #elif defined(G4UI_USE_QT)
    113     if (strcmp (argv[1], "Qt")==0)  session = new G4UIQt (argc, argv);
    114   #else
    115     session = new G4UIterminal();
    116   #endif
    117     else  session = new G4UIterminal();
    118   }
    119   else                                   
    120   {
    121     G4cerr << "You should define a UI in order to interact with test" << G4endl;
    122     return 0;
    123   }
     84  G4UIExecutive* UIexecutive = new G4UIExecutive(argc, argv);
     85  G4UImanager::GetUIpointer()->SetSession(UIexecutive->GetSession());  //So that Pause works..
    12486#endif
    125   G4UImanager::GetUIpointer()->SetSession(session);  //So that Pause works..
    12687
    12788  // Run manager
     
    159120
    160121  G4UImanager* UI = G4UImanager::GetUIpointer ();
    161 
    162122#ifdef G4UI_USE_WIN32
    163123  G4cout << "Reading win32.g4m file...." << G4endl;
     
    173133       << G4endl;
    174134
     135#ifdef G4UI_USE
    175136  // Start an interactive session.
    176   session -> SessionStart();
     137  UIexecutive -> SessionStart();
     138#endif
    177139
    178140#ifdef G4VIS_USE
     
    185147  G4cout << "vis_test19: Run manager deleted." << G4endl;
    186148  G4cout << "vis_test19: Deleting session..." << G4endl;
    187   delete session;
     149#ifdef G4UI_USE
     150  delete UIexecutive;
    188151  G4cout << "vis_test19: Session deleted." << G4endl;
     152#endif
    189153
    190154  return 0;
Note: See TracChangeset for help on using the changeset viewer.