Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Colour.cc File Reference
#include "G4Colour.hh"
#include "G4Threading.hh"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const G4Colour &c)
 

Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const G4Colour c 
)

Definition at line 80 of file G4Colour.cc.

80 {
81 os << '(' << c.red << ',' << c.green << ',' << c.blue
82 << ',' << c.alpha << ')';
83 const std::map<G4String, G4Colour>& colourMap = G4Colour::GetMap();
84 // Reverse iterator to pick up English spelling of grey!! :)
85 std::map<G4String, G4Colour>::const_reverse_iterator ri;
86 for (ri = colourMap.rbegin(); ri != colourMap.rend(); ++ri) {
87 if (c == ri->second) {
88 os << " (" << ri->first << ')';
89 break;
90 }
91 }
92
93 return os;
94}
static const std::map< G4String, G4Colour > & GetMap()
Definition: G4Colour.cc:180