Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VGraphicsSystem.cc File Reference
#include "G4VGraphicsSystem.hh"
#include "G4VisManager.hh"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const G4VGraphicsSystem &gs)
 

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream & os,
const G4VGraphicsSystem & gs )

Definition at line 73 of file G4VGraphicsSystem.cc.

74{
75 os << "Graphics System: " << gs.GetName ();
76 os << ", nicknames:"; for (const auto& nickname: gs.GetNicknames())
77 {os << ' ' << nickname;}
78 os << "\n Description: " << gs.GetDescription ();
79 os << "\n Functionality: ";
80 switch (gs.GetFunctionality()) {
82 os << "None";
83 break;
85 os << "nonEuclidian, e.g., tree representation of geometry hierarchy.";
86 break;
88 os << "twoD: Simple 2D, e.g., X (no stored structures).";
89 break;
91 os << "twoDStore: 2D with stored structures.";
92 break;
94 os << "threeD: Passive 3D (with stored structures)";
95 break;
97 os << "threeDInteractive: 3D with mouse control and \"pick\" functionality.";
98 break;
100 os << "virtualReality";
101 break;
103 os << "fileWriter";
104 break;
105 default:
106 os << "unknown";
107 break;
108 }
109
111 const G4SceneHandlerList& scenes = pVMan -> GetAvailableSceneHandlers ();
112 if (pVMan -> GetVerbosity() >= G4VisManager::parameters) {
113 size_t nScenes = scenes.size ();
114 if (nScenes) {
115 G4int nScenesOfThisSystem = 0;
116 for (size_t i = 0; i < nScenes; i++) {
117 if (scenes [i] -> GetGraphicsSystem () == &gs) {
118 nScenesOfThisSystem++;
119 }
120 }
121 if (nScenesOfThisSystem) {
122 os << "\n Its scenes are: ";
123 for (size_t i = 0; i < nScenes; i++) {
124 if (scenes [i] -> GetGraphicsSystem () == &gs) {
125 os << "\n " << *(scenes [i]);
126 }
127 }
128 }
129 else {
130 os << "\n It has no scenes at present.";
131 }
132 }
133 else {
134 os << "\n There are no scenes instantiated at present.";
135 }
136 }
137
138 return os;
139}
int G4int
Definition G4Types.hh:85
const std::vector< G4String > & GetNicknames() const
Functionality GetFunctionality() const
const G4String & GetDescription() const
const G4String & GetName() const
static G4VisManager * GetInstance()