Class Filter

Inheritance Relationships

Base Type

  • public Storable

Class Documentation

class Filter : public Storable

Holds an integer identifier for an LSST filter.

Public Functions

Filter(std::string const &name, bool const force = false)

Parameters
  • name: Name of filter

  • force: Allow us to construct an unknown Filter

Creates a Filter with the given name

Filter(int id = UNKNOWN)

Parameters
  • id: Id number of desired filter

Creates a Filter with the given identifier

Filter(std::shared_ptr<lsst::daf::base::PropertySet const> metadata, bool const force = false)

Create a Filter from a PropertySet (e.g. a FITS header)

Parameters
  • metadata: Metadata to process (e.g. a IFITS header)

  • force: Allow us to construct an unknown Filter

Filter(Filter const&)
Filter(Filter&&)
Filter &operator=(Filter const&)
Filter &operator=(Filter&&)
~Filter()
bool operator==(Filter const &rhs) const

Are two filters identical?

bool operator!=(Filter const &rhs) const
std::size_t hash_value() const

Return a hash of this object.

int getId() const

Return a Filter’s integral id

std::string const &getName() const

Return a Filter’s name

std::string const &getCanonicalName() const

Return a filter’s canonical name

I.e. if this filter’s an alias, return the name of the aliased Filter

std::vector<std::string> getAliases() const

Return all aliases by which this filter is known

The list excludes the canonical name

FilterProperty const &getFilterProperty() const

Return a Filter’s FilterProperty

std::shared_ptr<typehandling::Storable> cloneStorable() const

Create a new Filter that is a copy of this one.

bool equals(typehandling::Storable const &other) const

Compare this object to another Storable.

Return

*this == other if other is a Filter; otherwise false.

bool isPersistable() const

Public Static Functions

static void reset()

Clear all definitions

static int define(FilterProperty const &filterProperty, int id = AUTO, bool force = false)

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)

static int defineAlias(std::string const &oldName, std::string const &newName, bool force = false)

Define an alias for a filter

Parameters
  • oldName: old name for Filter

  • newName: new name for Filter

  • force: force an alias even if newName is already in use

static std::vector<std::string> getNames()

Return a list of known filters

Public Static Attributes

int const AUTO
int const UNKNOWN

Protected Functions

std::string getPersistenceName() const
std::string getPythonModule() const
void write(OutputArchiveHandle &handle) const