FastJet  3.3.3
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
 
 LimitedWarning (int max_warn_in)
 constructor that provides a user-set max number of warnings
 
void warn (const char *warning)
 outputs a warning to standard error (or the user's default warning stream if set)
 
void warn (const std::string &warning)
 outputs a warning to standard error (or the user's default warning stream if set)
 
void warn (const char *warning, std::ostream *ostr)
 outputs a warning to the specified stream
 
void warn (const std::string &warning, std::ostream *ostr)
 outputs a warning to the specified stream
 
int max_warn () const
 the maximum number of warning messages that will be printed by this instance of the class
 
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)
 
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
 

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 47 of file LimitedWarning.hh.

Member Function Documentation

◆ 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 78 of file LimitedWarning.hh.

◆ n_warn_so_far()

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

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

Definition at line 88 of file LimitedWarning.hh.


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