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