|
LSSTApplications
8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
|
Base class for source measurement algorithms. More...
#include <Algorithm.h>
Public Member Functions | |
| Algorithm (AlgorithmControl const &ctrl) | |
| virtual | ~Algorithm () |
| AlgorithmControl const & | getControl () const |
| Return a clone of the control object used to construct the algorithm. More... | |
| template<typename PixelT > | |
| void | apply (afw::table::SourceRecord &source, afw::image::Exposure< PixelT > const &exposure, afw::geom::Point2D const ¢er) const |
| Run the algorithm, filling appropriate fields in the given source. More... | |
Protected Member Functions | |
| template<typename PixelT > | |
| void | _apply (afw::table::SourceRecord &source, afw::image::Exposure< PixelT > const &exposure, afw::geom::Point2D const ¢er) const |
| Simulated virtual function that all algorithms must implement. More... | |
Private Member Functions | |
| virtual void | _applyT (lsst::afw::table::SourceRecord &, lsst::afw::image::Exposure< float > const &, lsst::afw::geom::Point2D const ¢er) const =0 |
| virtual void | _applyT (lsst::afw::table::SourceRecord &, lsst::afw::image::Exposure< double > const &, lsst::afw::geom::Point2D const ¢er) const =0 |
Private Attributes | |
| boost::shared_ptr < AlgorithmControl const > | _ctrl |
Base class for source measurement algorithms.
Algorithm simulates template virtual functions, with the following mechanism:
Algorithm subclasses will generally declare and define "_applyT" using the macro LSST_MEAS_ALGORITHM_PRIVATE_INTERFACE (in the private or protected section of the class declaration). Similarly, LSST_MEAS_ALGORITHM_PRIVATE_IMPLEMENTATION (at namespace scope in the same source file that contains the implementation of "_apply") will ensure that the needed versions of "_apply" are instantiated.
Algorithms should generally be immutable; this will prevent letting Python have access to CONST_PTR(Algorithm) objects from causing problems.
Most algorithms will have a constructor that takes a control object, a non-const reference to an afw::table::Schema, and a PTR(daf::base::PropertyList). This is effectively enforced by the signature of AlgorithmControl::makeAlgorithm.
Definition at line 106 of file Algorithm.h.
|
inlineexplicit |
Definition at line 236 of file Algorithm.h.
|
inlinevirtual |
Definition at line 111 of file Algorithm.h.
|
inlineprotected |
Simulated virtual function that all algorithms must implement.
Definition at line 142 of file Algorithm.h.
|
privatepure virtual |
|
privatepure virtual |
|
inline |
Run the algorithm, filling appropriate fields in the given source.
This is the public interface to the algorithm; it delegates to virtual functions that are overloaded for all the allowed template types. These in turn delegate the templated _apply function.
Definition at line 130 of file Algorithm.h.
|
inline |
Return a clone of the control object used to construct the algorithm.
The returned reference can be considered completely immutable, and should never be changed. Subclasses that reimplement to cast to a derived type should use returnCopy (in p_lsstSwig.i) to prevent dangling references and keep Python from const-casting the result.
Definition at line 120 of file Algorithm.h.
|
private |
Definition at line 157 of file Algorithm.h.
1.8.5