PYTHIA  8.311
Classes | Public Member Functions | Static Public Attributes | List of all members
Logger Class Reference

#include <Logger.h>

Inheritance diagram for Logger:

Public Member Functions

 Logger ()
 Construct with default values.
 
void init (Settings &settings)
 
void reportMsg (string loc, string message, string extraInfo="", bool showAlways=false)
 Report messages contain information not relevant in normal runs. More...
 
void infoMsg (string loc, string message, string extraInfo="", bool showAlways=false)
 Info messages are diagnostic messages that don't indicate an issue.
 
void warningMsg (string loc, string message, string extraInfo="", bool showAlways=false)
 Warnings indicate that there might be an issue, but the run will continue.
 
void errorMsg (string loc, string message, string extraInfo="", bool showAlways=false)
 Errors indicate an issue that might cause the current event to fail.
 
void abortMsg (string loc, string message, string extraInfo="", bool showAlways=false)
 Aborts indicate critical issues that prevent further event generation.
 
bool isQuiet () const
 If quiet, the logger will not print any messages.
 
bool mayPrintInit () const
 Indicates whether information will be printed during initialization.
 
bool mayPrintNext () const
 Indicates whether information will be printed during event generation.
 
bool mayPrintErrors () const
 Indicates whether error messages will be printed.
 
void setVerbosity (int verbosityIn)
 0: no messages | 1: aborts only | 2: default | 3: debug
 
int getVerbosity () const
 
void errorCombine (const Logger &other, string prefix="")
 Add all errors from the other Logger object to the counts of this object.
 
void errorReset ()
 Reset to empty map of error messages.
 
int errorTotalNumber () const
 Total number of errors/aborts/warnings logged.
 
void errorStatistics () const
 Print error statistics.
 
void errorStatistics (ostream &stream) const
 
ostream & infoStream ()
 
ostream & errorStream ()
 
map< string, int, LogComparer >::iterator begin ()
 Iterators over error messages.
 
map< string, int, LogComparer >::iterator end ()
 
map< string, int, LogComparer >::const_iterator begin () const
 
map< string, int, LogComparer >::const_iterator end () const
 

Static Public Attributes

static constexpr int ABORT = 1
 Abort verbosity level: print only abort messages.
 
static constexpr int NORMAL = 2
 Normal verbosity level: print errors, warnings and info messages.
 
static constexpr int REPORT = 3
 Report verbosity level: print everything, including report messages.
 

Detailed Description

The Logger class prints diagnostic messages and counts error messages. Objects of the Logger class can be used as ostream object, supporting the << operator.

Member Function Documentation

void errorStatistics ( ostream &  stream) const

Header.

Loop over all messages

Message printout.

Done.

void reportMsg ( string  loc,
string  message,
string  extraInfo = "",
bool  showAlways = false 
)

Report messages contain information not relevant in normal runs.

Methods for providing different levels of error messaging. These methods are thread safe.


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