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 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /visualization/management/include/G4VisExecutive.hh (Version 11.3.0) and /visualization/management/include/G4VisExecutive.hh (Version 10.4.p3)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //                                                 26 //
                                                   >>  27 // $Id$
 27 //                                                 28 //
 28 //                                                 29 // 
 29 // John Allison 2nd February 2005 (based on My     30 // John Allison 2nd February 2005 (based on MyVisManager, 24th January 1998).
 30 //                                                 31 //
 31 // Class description                               32 // Class description
 32 //                                                 33 //
 33 // Concrete Visualization Manager that impleme     34 // Concrete Visualization Manager that implements the virtual
 34 // functions RegisterGraphicsSystems and Regis     35 // functions RegisterGraphicsSystems and RegisterModelFactories.  This
 35 // is executed when you Initialise() or Initia     36 // is executed when you Initialise() or Initialize() the vis manager.
 36 // It exploits C-pre-processor variables G4VIS     37 // It exploits C-pre-processor variables G4VIS_USE_DAWN, etc., which
 37 // are set by the GNUmakefiles if environment      38 // are set by the GNUmakefiles if environment variables of the same
 38 // name are set.                                   39 // name are set.
 39 //                                                 40 //
 40 // Include this file and write code to instant     41 // Include this file and write code to instantiate G4VisExecutive just
 41 // once at beginning of operations.  Before yo     42 // once at beginning of operations.  Before you compile, set
 42 // appropriate environment variables (usually      43 // appropriate environment variables (usually using "./Configure").
 43 // If you change your environment you must for     44 // If you change your environment you must force recompilation (the
 44 // make files will not detect the need to do t     45 // make files will not detect the need to do this).
 45 //                                                 46 //
 46 // Typically, your main program file will cont     47 // Typically, your main program file will contain:
 47 //                                                 48 //
 48 // #ifdef G4VIS_USE                                49 // #ifdef G4VIS_USE
 49 // #include "G4VisExecutive.hh"                    50 // #include "G4VisExecutive.hh"
 50 // #endif                                          51 // #endif
 51 // ...                                             52 // ...
 52 // int main() {                                    53 // int main() {
 53 //   ...                                           54 //   ...
 54 // #ifdef G4VIS_USE                                55 // #ifdef G4VIS_USE
 55 //   // Instantiate and initialise Visualizati     56 //   // Instantiate and initialise Visualization Manager.
 56 //   G4VisManager* visManager = new G4VisExecu     57 //   G4VisManager* visManager = new G4VisExecutive;    // See Note (a).
 57 //   visManager -> SetVerboseLevel (verbosityS     58 //   visManager -> SetVerboseLevel (verbosityString);  // See Note (b).
 58 //   visManager -> RegisterGraphicsSystem (new     59 //   visManager -> RegisterGraphicsSystem (new myGS);  // See Note (c).
 59 //   visManager -> Initialize ();                  60 //   visManager -> Initialize ();                      // See Note (d).
 60 // #endif                                          61 // #endif
 61 //   ...                                           62 //   ...
 62 // #ifdef G4VIS_USE                                63 // #ifdef G4VIS_USE
 63 //   G4cout << "Deleting vis manager..." << G4     64 //   G4cout << "Deleting vis manager..." << G4endl;
 64 //   delete visManager;                            65 //   delete visManager;
 65 //   G4cout << "Vis manager deleted." << G4end     66 //   G4cout << "Vis manager deleted." << G4endl;
 66 // #endif                                          67 // #endif
 67 //                                                 68 //
 68 // Notes:                                          69 // Notes:
 69 // (a) After instantiation, all references to      70 // (a) After instantiation, all references to this object should be as
 70 //     a G4VisManager.  The functions Register     71 //     a G4VisManager.  The functions RegisterGraphicsSystems and
 71 //     RegisterModelFactories defined in G4Vis     72 //     RegisterModelFactories defined in G4VisExecutive.icc are
 72 //     virtual functions of G4VisManager.  The     73 //     virtual functions of G4VisManager.  They are invoked by
 73 //     G4VisManager::Initialise.  If you need      74 //     G4VisManager::Initialise.  If you need to initialise in a
 74 //     separate file, see advice below.            75 //     separate file, see advice below.
 75 // (b) The verbosityString ("quiet", "errors",     76 // (b) The verbosityString ("quiet", "errors", "warnings",
 76 //     "confirmations", etc. - "help /vis/verb     77 //     "confirmations", etc. - "help /vis/verbose" to see options) can be
 77 //     set here or with /vis/verbose.  Alterna     78 //     set here or with /vis/verbose.  Alternatively, you can instantiate
 78 //     with a verbosity string. e.g:               79 //     with a verbosity string. e.g:
 79 //       G4VisManager* visManager = new G4VisE     80 //       G4VisManager* visManager = new G4VisExecutive("quiet");
 80 // (c) You can register your own graphics syst     81 // (c) You can register your own graphics system like this.
 81 // (d) Your can intialise like this with C++ c     82 // (d) Your can intialise like this with C++ code or use /vis/initialize.
 82 //                                                 83 //
 83 // If you need to perform the instantiation an     84 // If you need to perform the instantiation and the initialisation in
 84 // separate files, e.g., to establish the verb     85 // separate files, e.g., to establish the verbosity before
 85 // initialisation, then the code that initiali     86 // initialisation, then the code that initialises must have access, of
 86 // course, to the G4VisExecutive object, but t     87 // course, to the G4VisExecutive object, but this should be as a
 87 // G4VisManager object, i.e., #include "G4VisM     88 // G4VisManager object, i.e., #include "G4VisManager.hh".
 88 // RegisterGraphicsSystems and RegisterModelFa     89 // RegisterGraphicsSystems and RegisterModelFactories are (pure)
 89 // virtual methods of G4VisManager called from     90 // virtual methods of G4VisManager called from G4VisManager::Initialize.
 90 // First file:                                     91 // First file:
 91 // #include "G4VisExecutive.hh"                    92 // #include "G4VisExecutive.hh"
 92 // ...                                             93 // ...
 93 //   fpVisManager = new G4VisExecutive;            94 //   fpVisManager = new G4VisExecutive;
 94 // where fpVisManager is a G4VisManager*.          95 // where fpVisManager is a G4VisManager*.
 95 // Second file:                                    96 // Second file:
 96 // #include "G4VisManager.hh"                      97 // #include "G4VisManager.hh"
 97 // ...                                             98 // ...
 98 //   fpVisManager -> Initialize ();                99 //   fpVisManager -> Initialize ();
 99 // where there is some mechanism for getting a    100 // where there is some mechanism for getting access to the pointer
100 // fpVisManager.                                  101 // fpVisManager.
101 //                                                102 //
102 // The implementation is included as an .icc f    103 // The implementation is included as an .icc file because - for those
103 // graphics systems that need external librari    104 // graphics systems that need external libraries - only those systems
104 // that have been selected by the flags may be    105 // that have been selected by the flags may be instantiated without
105 // causing unresolved references (only the use    106 // causing unresolved references (only the user knows which libraries
106 // are available on his/her computer).  It als    107 // are available on his/her computer).  It also ensures that libraries
107 // can be linked in the right order, without c    108 // can be linked in the right order, without circular dependencies.
108 // (Note that some graphics systems, notable t    109 // (Note that some graphics systems, notable those that write files
109 // for off-line viewing, do not suffer these r    110 // for off-line viewing, do not suffer these restrictions and are
110 // always registered.)                            111 // always registered.)
111 //                                                112 //
112 // See class description of G4VisManager for m    113 // See class description of G4VisManager for more details.
113                                                   114 
114 #ifndef G4VISEXECUTIVE_HH                         115 #ifndef G4VISEXECUTIVE_HH
115 #define G4VISEXECUTIVE_HH                         116 #define G4VISEXECUTIVE_HH
116                                                   117 
117 #include "G4VisManager.hh"                        118 #include "G4VisManager.hh"
118                                                   119 
119 class G4VisExecutive: public G4VisManager {       120 class G4VisExecutive: public G4VisManager {
120                                                   121 
121 public: // With description                       122 public: // With description
122                                                   123 
123   G4VisExecutive(const G4String& verbosityStri << 124   G4VisExecutive (const G4String& verbosityString = "warnings");
124   G4VisExecutive(int argc, char** argv, const  << 
125                  const G4String& verbosityStri << 
126                                                   125 
127 private:                                          126 private:
128                                                   127 
129   const G4String& GetDefaultGraphicsSystemName << 128   void RegisterGraphicsSystems();
130   void SetDefaultsByArgument(const G4String& s << 129   void RegisterModelFactories();
131   void SetDefaultsByEnvironment();             << 
132   void SetDefaultsByFile(int argc, char** argv << 
133   void SetDefaultsByBatch();                   << 
134   void SetDefaultsByBuildFlags();              << 
135   int      fUserArgc;                          << 
136   char**   fUserArgv;                          << 
137   G4String fUserSpecifiedSystem;               << 
138   G4bool   fSelected;                          << 
139                                                << 
140   void RegisterGraphicsSystems() override;     << 
141   void RegisterModelFactories() override;      << 
142                                                   130 
143 };                                                131 };
144                                                   132 
145 #include "G4VisExecutive.icc"                     133 #include "G4VisExecutive.icc"
146                                                   134 
147 #endif                                            135 #endif
148                                                   136