FastJet 3.4.1
Public Member Functions | Static Public Member Functions | List of all members
fastjet::LimitedWarning Class Reference

class to provide facilities for giving warnings up to some maximum number of times and to provide global summaries of warnings that have been issued. More...

#include <fastjet/LimitedWarning.hh>

Public Member Functions

 LimitedWarning ()
 constructor that provides a default maximum number of warnings More...
 
 LimitedWarning (int max_warn_in)
 constructor that provides a user-set max number of warnings More...
 
void warn (const char *warning)
 outputs a warning to standard error (or the user's default warning stream if set) More...
 
void warn (const std::string &warning)
 outputs a warning to standard error (or the user's default warning stream if set) More...
 
void warn (const char *warning, std::ostream *ostr)
 outputs a warning to the specified stream More...
 
void warn (const std::string &warning, std::ostream *ostr)
 outputs a warning to the specified stream More...
 
int max_warn () const
 the maximum number of warning messages that will be printed by this instance of the class More...
 
int n_warn_so_far () const
 the number of times so far that a warning has been registered with this instance of the class. More...
 

Static Public Member Functions

static void set_default_stream (std::ostream *ostr)
 sets the default output stream for all warnings (by default cerr; passing a null pointer prevents warnings from being output) More...
 
static void set_default_max_warn (int max_warn)
 sets the default maximum number of warnings of a given kind before warning messages are silenced. More...
 
static std::string summary ()
 returns a summary of all the warnings that came through the LimiteWarning class More...
 

Detailed Description

class to provide facilities for giving warnings up to some maximum number of times and to provide global summaries of warnings that have been issued.

Definition at line 54 of file LimitedWarning.hh.

Constructor & Destructor Documentation

◆ LimitedWarning() [1/2]

fastjet::LimitedWarning::LimitedWarning ( )
inline

constructor that provides a default maximum number of warnings

Definition at line 58 of file LimitedWarning.hh.

◆ LimitedWarning() [2/2]

fastjet::LimitedWarning::LimitedWarning ( int  max_warn_in)
inline

constructor that provides a user-set max number of warnings

Definition at line 61 of file LimitedWarning.hh.

Member Function Documentation

◆ warn() [1/4]

void fastjet::LimitedWarning::warn ( const char *  warning)
inline

outputs a warning to standard error (or the user's default warning stream if set)

Definition at line 71 of file LimitedWarning.hh.

◆ warn() [2/4]

void fastjet::LimitedWarning::warn ( const std::string &  warning)
inline

outputs a warning to standard error (or the user's default warning stream if set)

Definition at line 75 of file LimitedWarning.hh.

◆ warn() [3/4]

void fastjet::LimitedWarning::warn ( const char *  warning,
std::ostream *  ostr 
)

outputs a warning to the specified stream

Definition at line 67 of file LimitedWarning.cc.

◆ warn() [4/4]

void fastjet::LimitedWarning::warn ( const std::string &  warning,
std::ostream *  ostr 
)
inline

outputs a warning to the specified stream

Definition at line 81 of file LimitedWarning.hh.

◆ set_default_stream()

static void fastjet::LimitedWarning::set_default_stream ( std::ostream *  ostr)
inlinestatic

sets the default output stream for all warnings (by default cerr; passing a null pointer prevents warnings from being output)

Definition at line 85 of file LimitedWarning.hh.

◆ set_default_max_warn()

static void fastjet::LimitedWarning::set_default_max_warn ( int  max_warn)
inlinestatic

sets the default maximum number of warnings of a given kind before warning messages are silenced.

Definition at line 103 of file LimitedWarning.hh.

◆ max_warn()

int fastjet::LimitedWarning::max_warn ( ) const
inline

the maximum number of warning messages that will be printed by this instance of the class

Definition at line 109 of file LimitedWarning.hh.

◆ n_warn_so_far()

int fastjet::LimitedWarning::n_warn_so_far ( ) const

the number of times so far that a warning has been registered with this instance of the class.

Definition at line 58 of file LimitedWarning.cc.

◆ summary()

string fastjet::LimitedWarning::summary ( )
static

returns a summary of all the warnings that came through the LimiteWarning class

Definition at line 132 of file LimitedWarning.cc.


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