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
|
Holds an integer identifier for an LSST filter. More...
#include <Filter.h>
Public Types | |
enum | { AUTO =-1, UNKNOWN =-1 } |
Public Member Functions | |
Filter (std::string const &name, bool const force=false) | |
Filter (int id=UNKNOWN) | |
Filter (boost::shared_ptr< lsst::daf::base::PropertySet const >, bool const force=false) | |
bool | operator== (Filter const &rhs) const |
bool | operator!= (Filter const &rhs) const |
int | getId () const |
std::string const & | getName () const |
FilterProperty const & | getFilterProperty () const |
Static Public Member Functions | |
static void | reset () |
static int | define (FilterProperty const &filterProperty, int id=AUTO, bool force=false) |
static int | defineAlias (std::string const &oldName, std::string const &newName, bool force=false) |
static std::vector< std::string > | getNames () |
Private Types | |
typedef std::tr1::unordered_map < std::string const, std::string const > | AliasMap |
typedef std::tr1::unordered_map < std::string const, unsigned int const > | NameMap |
typedef std::tr1::unordered_map < unsigned int const, std::string const > | IdMap |
Static Private Member Functions | |
static void | _initRegistry () |
static int | _lookup (std::string const &name, bool const force=false) |
static std::string const & | _lookup (int id) |
Private Attributes | |
int | _id |
std::string | _name |
Static Private Attributes | |
static int | _id0 = Filter::UNKNOWN |
static AliasMap * | _aliasMap = NULL |
static IdMap * | _idMap = NULL |
static NameMap * | _nameMap = NULL |
|
private |
|
private |
|
private |
anonymous enum |
Enumerator | |
---|---|
AUTO | |
UNKNOWN |
Definition at line 110 of file Filter.h.
|
inlineexplicit |
Creates a Filter with the given name
name | Name of filter |
force | Allow us to construct an unknown Filter |
Definition at line 114 of file Filter.h.
|
inlineexplicit |
Creates a Filter with the given identifier
id | Id number of desired filter |
Definition at line 120 of file Filter.h.
|
explicit |
Create a Filter from a PropertySet (e.g. a FITS header)
metadata | Metadata to process (e.g. a IFITS header) |
force | Allow us to construct an unknown Filter |
Definition at line 149 of file Filter.cc.
|
staticprivate |
Initialise the Filter registry
Definition at line 213 of file Filter.cc.
|
staticprivate |
Lookup the ID associated with a name
Definition at line 319 of file Filter.cc.
|
staticprivate |
Lookup the name associated with an ID
Definition at line 348 of file Filter.cc.
|
static |
Define a filter name to have the specified id
If id == Filter::AUTO a value will be chosen for you.
It is an error to attempt to change a name's id (unless you specify force)
Definition at line 245 of file Filter.cc.
|
static |
FilterProperty const & lsst::afw::image::Filter::getFilterProperty | ( | ) | const |
Return a Filter's FilterProperty
Definition at line 365 of file Filter.cc.
|
inline |
|
inline |
|
static |
|
inline |
bool lsst::afw::image::Filter::operator== | ( | Filter const & | rhs | ) | const |
|
inlinestatic |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |