LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Public Member Functions | Protected Attributes | List of all members
lsst.afw.table::SlotDefinition Class Reference

#include <slots.h>

Inheritance diagram for lsst.afw.table::SlotDefinition:
lsst.afw.table::CentroidSlotDefinition lsst.afw.table::FluxSlotDefinition lsst.afw.table::ShapeSlotDefinition

Public Member Functions

 SlotDefinition (std::string const &name)
 Construct a SlotDefinition from the name of the slot (e.g. "Centroid" or "PsfFlux") More...
 
std::string getName () const
 Return the name of the slot (e.g. "Centroid" or "PsfFlux") More...
 
std::string getAlias () const
 

Protected Attributes

std::string _name
 

Detailed Description

Base class for helper classes that define slots on SourceTable/SourceRecord.

Each type of slot corresponds to a subclass of SlotDefinition, and each actual slot corresponds to a particular field name prefix. For instance, to look up the centroid slot, we look for fields named "slot_Centroid_x" and "slot_Centroid_y". Instead of actually naming a particular field that, however, we use Schema's alias mechanism (see AliasMap) to make these field name lookups resolve to the name of other fields. The actual definition of the slots is thus managed by the Schema's AliasMap, though a SourceTable object will cache Keys for the various slots to make sure accessing slot values is efficient (more precisely, when you set an alias related to a slot on an AliasMap, any table it corresponds to will receive a notification that it should update its Keys). These cached Keys are actually stored within the SlotDefinition (as data members of derived classes).

Note that the uncertainty and failure flag components of slots are not required; a slot may have only a measurement defined, or a measurement and either one of these (but not both). A slot may not have only an uncertainty and/or a a failure flag, however.

A SlotDefinition instance is not just an internal object used by SourceTable; it can also be used to inspect the slots via SourceTable::getXxxSlot(), which is now the preferred way to access the Keys that slots correspond to. SlotDefinition objects should only be constructed by SourceTable, however.

Definition at line 46 of file slots.h.

Constructor & Destructor Documentation

lsst.afw.table::SlotDefinition::SlotDefinition ( std::string const &  name)
inlineexplicit

Construct a SlotDefinition from the name of the slot (e.g. "Centroid" or "PsfFlux")

Definition at line 50 of file slots.h.

50 : _name(name) {}
table::Key< std::string > name
Definition: ApCorrMap.cc:71

Member Function Documentation

std::string lsst.afw.table::SlotDefinition::getAlias ( ) const
inline

Return the alias field prefix used to lookup Keys for the slot.

This simply prepends "slot_" to the slot name.

Definition at line 60 of file slots.h.

60  {
61  return "slot_" + _name;
62  }
std::string lsst.afw.table::SlotDefinition::getName ( ) const
inline

Return the name of the slot (e.g. "Centroid" or "PsfFlux")

Definition at line 53 of file slots.h.

53 { return _name; }

Member Data Documentation

std::string lsst.afw.table::SlotDefinition::_name
protected

Definition at line 65 of file slots.h.


The documentation for this class was generated from the following file: