Geant4 9.6.0
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 68 of file G4VGraphicsSystem.cc.

68 {
69 G4VisManager* pVMan = G4VisManager::GetInstance ();
70 const G4SceneHandlerList& scenes = pVMan -> GetAvailableSceneHandlers ();
71 os << "Graphics System: " << gs.GetName ();
72 if (gs.GetNickname () != "") {
73 os << ", nickname: " << gs.GetNickname ();
74 }
75 if (gs.GetDescription () != "") {
76 os << "\n Description: " << gs.GetDescription ();
77 }
78 os << "\n Functionality: " << G4int(gs.GetFunctionality());
79 if (pVMan -> GetVerbosity() >= G4VisManager::parameters) {
80 size_t nScenes = scenes.size ();
81 if (nScenes) {
82 G4int nScenesOfThisSystem = 0;
83 for (size_t i = 0; i < nScenes; i++) {
84 if (scenes [i] -> GetGraphicsSystem () == &gs) {
85 nScenesOfThisSystem++;
86 }
87 }
88 if (nScenesOfThisSystem) {
89 os << "\n Its scenes are: ";
90 for (size_t i = 0; i < nScenes; i++) {
91 if (scenes [i] -> GetGraphicsSystem () == &gs) {
92 os << "\n " << *(scenes [i]);
93 }
94 }
95 }
96 else {
97 os << "\n It has no scenes at present.";
98 }
99 }
100 else {
101 os << "\n There are no scenes instantiated at present.";
102 }
103 }
104 return os;
105}
int G4int
Definition: G4Types.hh:66
const G4String & GetNickname() const
Functionality GetFunctionality() const
const G4String & GetDescription() const
const G4String & GetName() const