GGEMS  1.1
GPU GEant4-based Monte Carlo Simulations
GGEMSPrint.hh File Reference

Print a custom std::cout end std::cerr handling verbosity. More...

#include <iostream>
#include <ostream>
#include <iomanip>
#include <mutex>
#include "GGEMS/global/GGEMSExport.hh"
#include "GGEMS/tools/GGEMSTypes.hh"
#include <windows.h>
Include dependency graph for GGEMSPrint.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GGEMSStream
 Generic class redefining standard output. More...
 

Namespaces

 anonymous_namespace{GGEMSPrint.hh}
 empty namespace storing mutex
 

Macros

#define GGendl   (static_cast<std::ostream& (*)(std::ostream&)>(std::endl))
 overload C++ std::endl More...
 
#define GGcin   (std::cin)
 overload C++ std::cin More...
 

Enumerations

enum  GGEMSConsoleColor : GGuchar {
  black = 0, blue, green, aqua,
  red, purple, yellow, white,
  gray
}
 define a color for the console terminal More...
 

Functions

void set_ggems_verbose (GGint verbosity)
 Set the verbosity of output stream. More...
 

Variables

std::mutex anonymous_namespace{GGEMSPrint.hh}::mutex
 
constexpr WORD anonymous_namespace{GGEMSPrint.hh}::kColor []
 
GGEMSStream GGcout
 
GGEMSStream GGcerr
 
GGEMSStream GGwarn
 

Detailed Description

Print a custom std::cout end std::cerr handling verbosity.

Author
Julien BERT julie.nosp@m.n.be.nosp@m.rt@un.nosp@m.iv-b.nosp@m.rest..nosp@m.fr
Didier BENOIT didie.nosp@m.r.be.nosp@m.noit@.nosp@m.inse.nosp@m.rm.fr
LaTIM, Brest, FRANCE
Version
1.0
Date
Monday September 23, 2019

Definition in file GGEMSPrint.hh.

Macro Definition Documentation

◆ GGcin

#define GGcin   (std::cin)

overload C++ std::cin

Definition at line 66 of file GGEMSPrint.hh.

◆ GGendl

#define GGendl   (static_cast<std::ostream& (*)(std::ostream&)>(std::endl))

overload C++ std::endl

Definition at line 60 of file GGEMSPrint.hh.

Enumeration Type Documentation

◆ GGEMSConsoleColor

define a color for the console terminal

Definition at line 76 of file GGEMSPrint.hh.

Function Documentation

◆ set_ggems_verbose()

void set_ggems_verbose ( GGint  verbosity)

Set the verbosity of output stream.

Parameters
verbosity- level of verbosity

Definition at line 81 of file GGEMSPrint.cc.

Variable Documentation

◆ GGcerr

GGEMSStream GGcerr
extern

Define a new std::cerr with green red

Definition at line 35 of file GGEMSPrint.cc.

◆ GGcout

GGEMSStream GGcout
extern

Define a new std::cout with green color

Definition at line 34 of file GGEMSPrint.cc.

◆ GGwarn

GGEMSStream GGwarn
extern

Define a new std::cout for warning with orange color

Definition at line 36 of file GGEMSPrint.cc.