GGEMS  1.1
GPU GEant4-based Monte Carlo Simulations
GGEMSStream Class Reference

Generic class redefining standard output. More...

#include "GGEMSPrint.hh"

Collaboration diagram for GGEMSStream:
Collaboration graph

Public Member Functions

 GGEMSStream (std::ostream &stream, GGEMSConsoleColor const &color)
 GGEMSStream constructor. More...
 
 ~GGEMSStream ()
 GGStream destructor. More...
 
GGEMSStreamoperator() (std::string const &class_name, std::string const &method_name, GGint const &verbosity_level)
 setting private members to display them to standart output More...
 
template<typename T >
GGEMSStreamoperator<< (T const &message)
 overloading << to print a message in standard output More...
 
void SetVerbosity (GGint const &verbosity_limit)
 Set the global verbosity. More...
 

Protected Attributes

std::ostream & stream_
 
GGEMSConsoleColor color_index_
 

Private Attributes

std::string class_name_
 
std::string method_name_
 
GGint verbosity_limit_
 
GGint verbosity_level_
 
GGint stream_counter_
 

Detailed Description

Generic class redefining standard output.

Definition at line 126 of file GGEMSPrint.hh.

Constructor & Destructor Documentation

◆ GGEMSStream()

GGEMSStream::GGEMSStream ( std::ostream &  stream,
GGEMSConsoleColor const &  color 
)

GGEMSStream constructor.

Parameters
stream- an output stream
color- define a color on the screen

Definition at line 42 of file GGEMSPrint.cc.

◆ ~GGEMSStream()

GGEMSStream::~GGEMSStream ( )
inline

GGStream destructor.

Definition at line 139 of file GGEMSPrint.hh.

Member Function Documentation

◆ operator()()

GGEMSStream & GGEMSStream::operator() ( std::string const &  class_name,
std::string const &  method_name,
GGint const &  verbosity_level 
)

setting private members to display them to standart output

Parameters
class_name- Name of the class to print
method_name- Name of the method to print
verbosity_level- Verbosity level to display
Returns
sstream of message

Definition at line 143 of file GGEMSPrint.hh.

◆ operator<<()

template<typename T >
GGEMSStream & GGEMSStream::operator<< ( T const &  message)

overloading << to print a message in standard output

Template Parameters
T- type of data
Parameters
message- message displayed to screen
Returns
stream of message

Definition at line 186 of file GGEMSPrint.hh.

◆ SetVerbosity()

void GGEMSStream::SetVerbosity ( GGint const &  verbosity_limit)

Set the global verbosity.

Parameters
verbosity_limit- give the verbosity limit applied during execution

Definition at line 58 of file GGEMSPrint.cc.

Member Data Documentation

◆ class_name_

std::string GGEMSStream::class_name_
private

Name of the class to print

Definition at line 170 of file GGEMSPrint.hh.

◆ color_index_

GGEMSConsoleColor GGEMSStream::color_index_
protected

Color to print on screen

Definition at line 178 of file GGEMSPrint.hh.

◆ method_name_

std::string GGEMSStream::method_name_
private

Name of the method to print

Definition at line 171 of file GGEMSPrint.hh.

◆ stream_

std::ostream& GGEMSStream::stream_
protected

Stream handling std::cout or std::endl

Definition at line 177 of file GGEMSPrint.hh.

◆ stream_counter_

GGint GGEMSStream::stream_counter_
private

Counter printing multiple stream

Definition at line 174 of file GGEMSPrint.hh.

◆ verbosity_level_

GGint GGEMSStream::verbosity_level_
private

Verbosity level of the print

Definition at line 173 of file GGEMSPrint.hh.

◆ verbosity_limit_

GGint GGEMSStream::verbosity_limit_
private

Verbosity limit fixed by user

Definition at line 172 of file GGEMSPrint.hh.


The documentation for this class was generated from the following files: