LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
A hierarchical tree structure for holding mappings of names to threshold values. More...
#include <Memory.h>
Public Member Functions | |
Family (int defaultThreshold=INHERIT) | |
~Family () | |
int | getThreshold () |
void | setThreshold (int threshold) |
int | getThresholdFor (tokenizer::iterator toptoken, const tokenizer::iterator &end) const |
void | setThresholdFor (tokenizer::iterator toptoken, const tokenizer::iterator &end, int threshold) |
void | resetThresholdFor (tokenizer::iterator toptoken, const tokenizer::iterator &end) |
void | printDescThresholds (std::ostream &out, const std::string &prefix) const |
void | deleteDescendants () |
Protected Member Functions | |
Family * | ensureDescendant (tokenizer::iterator toptoken, const tokenizer::iterator &end) |
const Family * | findDescendant (tokenizer::iterator toptoken, const tokenizer::iterator &end, bool orNearest=false) const |
Family * | makeDescendants (tokenizer::iterator toptoken, const tokenizer::iterator &end) |
Private Types | |
typedef std::map< std::string, Family * > | ChildMap |
Private Attributes | |
int | _thresh |
ChildMap * | _children |
A hierarchical tree structure for holding mappings of names to threshold values.
This contain contains a default threshold value and 0 or more child Family instances, each with a name. One can get or set the default threshold value for the Family as a whole or for any arbitrary descendant. If any threshold is set to the special value INHERIT, the effective value should be taken to be the threshold of its nearest ancestor.
|
private |
lsst::pex::logging::threshold::Family::Family | ( | int | defaultThreshold = INHERIT | ) |
lsst::pex::logging::threshold::Family::~Family | ( | ) |
delete this container
Definition at line 142 of file Memory.cc.
void lsst::pex::logging::threshold::Family::deleteDescendants | ( | ) |
|
protected |
return the child data for a given descendant name. Null is returned if the name does not exist.
toptoken | the first field in the hierarchical name |
end | the end iterator value from the tokenizer that produced toptoken |
Definition at line 48 of file Memory.cc.
|
protected |
return a threshold Family for a given descendant name. What is returned when the name doesn't exist depends on the value of the orNearest parameter.
toptoken | the first field in the hierarchical name |
end | the end iterator value from the tokenizer that produced toptoken |
orNearest | if true and the exact named descendant does not exist, return the nearest ancestor that does exist. If false, return null if it doesn't exist. |
Definition at line 70 of file Memory.cc.
|
inline |
|
inline |
return the threshold associated with a descendent with a given name
Definition at line 86 of file Memory.h.
|
protected |
create a threshold Family for a given descendant name.
toptoken | the first field in the hierarchical name |
end | the end iterator value from the tokenizer that produced toptoken |
Definition at line 92 of file Memory.cc.
void lsst::pex::logging::threshold::Family::printDescThresholds | ( | std::ostream & | out, |
const std::string & | prefix | ||
) | const |
void lsst::pex::logging::threshold::Family::resetThresholdFor | ( | tokenizer::iterator | toptoken, |
const tokenizer::iterator & | end | ||
) |
reset the threshold associated with a descendent with a given name to inherit from its parent.
Definition at line 120 of file Memory.cc.
|
inline |
void lsst::pex::logging::threshold::Family::setThresholdFor | ( | tokenizer::iterator | toptoken, |
const tokenizer::iterator & | end, | ||
int | threshold | ||
) |
set the threshold associated with a descendent with a given name
Definition at line 108 of file Memory.cc.
|
private |