Loading...
Searching...
No Matches
fastjet::LimitedWarning Class Reference
Error handling

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.

## 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.
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 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()

void fastjet::LimitedWarning::set_default_stream | ( | std::ostream * | ostr | ) |

inline static

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()

void fastjet::LimitedWarning::set_default_max_warn | ( | int | max_warn | ) |

inline static

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:

- include/fastjet/LimitedWarning.hh
- src/LimitedWarning.cc