Class BaseAlgorithm¶
Defined in File Algorithm.h
Inheritance Relationships¶
Derived Types¶
public lsst::meas::base::ForcedAlgorithm
(Class ForcedAlgorithm)public lsst::meas::base::SingleFrameAlgorithm
(Class SingleFrameAlgorithm)
Class Documentation¶
-
class
BaseAlgorithm
¶ Ultimate abstract base class for all C++ measurement algorithms
New algorithms should not inherit directly from this class.
Subclassed by lsst::meas::base::ForcedAlgorithm, lsst::meas::base::SingleFrameAlgorithm
Public Functions
-
virtual void
fail
(afw::table::SourceRecord &measRecord, MeasurementError *error = nullptr) const = 0¶ Handle an exception thrown by the current algorithm by setting flags in the given record.
fail() is called by the measurement framework when an exception is allowed to propagate out of one the algorithm’s measure() methods. It should generally set both a general failure flag for the algorithm as well as a specific flag indicating the error condition, if possible. To aid in this, if the exception was an instance of MeasurementError, it will be passed in, carrying information about what flag to set.
An algorithm can also to chose to set flags within its own measure() methods, and then just return, rather than throw an exception. However, fail() should be implemented even when all known failure modes do not throw exceptions, to ensure that unexpected exceptions thrown in lower-level code are properly handled.
-
virtual
~BaseAlgorithm
()¶
-
std::string
getLogName
() const¶
Protected Attributes
-
std::string
_logName
¶
-
virtual void