LSST Applications g063fba187b+cac8b7c890,g0f08755f38+6aee506743,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+b4475c5878,g1dcb35cd9c+8f9bc1652e,g20f6ffc8e0+6aee506743,g217e2c1bcf+73dee94bd0,g28da252d5a+1f19c529b9,g2bbee38e9b+3f2625acfc,g2bc492864f+3f2625acfc,g3156d2b45e+6e55a43351,g32e5bea42b+1bb94961c2,g347aa1857d+3f2625acfc,g35bb328faa+a8ce1bb630,g3a166c0a6a+3f2625acfc,g3e281a1b8c+c5dd892a6c,g3e8969e208+a8ce1bb630,g414038480c+5927e1bc1e,g41af890bb2+8a9e676b2a,g7af13505b9+809c143d88,g80478fca09+6ef8b1810f,g82479be7b0+f568feb641,g858d7b2824+6aee506743,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+2903d499ea,gb58c049af0+d64f4d3760,gc28159a63d+3f2625acfc,gcab2d0539d+b12535109e,gcf0d15dbbd+46a3f46ba9,gda6a2b7d83+46a3f46ba9,gdaeeff99f8+1711a396fd,ge79ae78c31+3f2625acfc,gef2f8181fd+0a71e47438,gf0baf85859+c1f95f4921,gfa517265be+6aee506743,gfa999e8aa5+17cd334064,w.2024.51
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
lsst::afw::table::SlotDefinition Class Reference

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

#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")
 
std::string getName () const
 Return the name of the slot (e.g. "Centroid" or "PsfFlux")
 
std::string getAlias () const
 Return the alias field prefix used to lookup Keys for the slot.
 
 SlotDefinition (SlotDefinition const &)=default
 
 SlotDefinition (SlotDefinition &&)=default
 
SlotDefinitionoperator= (SlotDefinition const &)=default
 
SlotDefinitionoperator= (SlotDefinition &&)=default
 
 ~SlotDefinition ()=default
 

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 47 of file slots.h.

Constructor & Destructor Documentation

◆ SlotDefinition() [1/3]

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) {}

◆ SlotDefinition() [2/3]

lsst::afw::table::SlotDefinition::SlotDefinition ( SlotDefinition const & )
default

◆ SlotDefinition() [3/3]

lsst::afw::table::SlotDefinition::SlotDefinition ( SlotDefinition && )
default

◆ ~SlotDefinition()

lsst::afw::table::SlotDefinition::~SlotDefinition ( )
default

Member Function Documentation

◆ getAlias()

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{ return "slot_" + _name; }

◆ getName()

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; }

◆ operator=() [1/2]

SlotDefinition & lsst::afw::table::SlotDefinition::operator= ( SlotDefinition && )
default

◆ operator=() [2/2]

SlotDefinition & lsst::afw::table::SlotDefinition::operator= ( SlotDefinition const & )
default

Member Data Documentation

◆ _name

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

Definition at line 69 of file slots.h.


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