Class PeakTable¶
Defined in File Peak.h
Inheritance Relationships¶
Base Type¶
public lsst::afw::table::BaseTable
(Class BaseTable)
Class Documentation¶
-
class
PeakTable
: public lsst::afw::table::BaseTable¶ Table class for Peaks in Footprints.
Unnamed Group
Public Functions
-
~PeakTable
()¶
-
std::shared_ptr<afw::table::IdFactory>
getIdFactory
()¶ Return the object that generates IDs for the table (may be null).
-
std::shared_ptr<afw::table::IdFactory const>
getIdFactory
() const¶ Return the object that generates IDs for the table (may be null).
Switch to a new IdFactory object that generates IDs for the table (may be null).
-
std::shared_ptr<PeakTable>
clone
() const¶ Return a polymorphic deep copy of the table.
Derived classes should reimplement by static-casting the output of _clone to a pointer-to-derived to simulate covariant return types.
Cloning a table does not clone its associated records; the new table produced by clone() does not have any associated records.
-
std::shared_ptr<PeakRecord>
makeRecord
()¶ Default-construct an associated record.
Derived classes should reimplement by static-casting the output of _makeRecord to the appropriate BaseRecord subclass to simulate covariant return types.
-
std::shared_ptr<PeakRecord>
copyRecord
(afw::table::BaseRecord const &other)¶ Deep-copy a record, requiring that it have the same schema as this table.
Regardless of the type or associated table of the input record, the type of the output record will be the type associated with this table and the record instance will be associated with this table.
Allowing derived-class records to be constructed from base-class records could be considered a form of type-slicing, but because we already demand that all records be constructable from nothing but a table, this isn’t anything new.
Derived classes should reimplement by static-casting the output of BaseTable::copyRecord to the appropriate BaseRecord subclass.
This is implemented using makeRecord and calling record.assign on the results; override those to change the behavior.
-
std::shared_ptr<PeakRecord>
copyRecord
(afw::table::BaseRecord const &other, afw::table::SchemaMapper const &mapper)¶ Deep-copy a record, requiring that it have the same schema as this table.
Regardless of the type or associated table of the input record, the type of the output record will be the type associated with this table and the record instance will be associated with this table.
Allowing derived-class records to be constructed from base-class records could be considered a form of type-slicing, but because we already demand that all records be constructable from nothing but a table, this isn’t anything new.
Derived classes should reimplement by static-casting the output of BaseTable::copyRecord to the appropriate BaseRecord subclass.
This is implemented using makeRecord and calling record.assign on the results; override those to change the behavior.
Public Static Functions
-
static std::shared_ptr<PeakTable>
make
(afw::table::Schema const &schema, bool forceNew = false)¶ Obtain a table that can be used to create records with given schema
If a
PeakTable already exists that uses this Schema, that PeakTable will be returned instead of creating a new one. This is different from how most Record/Table classes work, but it is an important memory optimization for Peaks, for which we expect to have very few distinct Schemas as well as many catalogs (one per Footprint) with a small number of Peaks; we don’t want to have a different PeakTable for each one of those catalogs if they all share the same Schema. This behavior can be disabled by setting forceNewTable=true or by cloning an existing table (in both of these cases, the new table will not be reused in the future, either)
Protected Functions
-
std::shared_ptr<afw::table::BaseTable>
_clone
() const¶ Clone implementation with noncovariant return types.
-
std::shared_ptr<afw::table::BaseRecord>
_makeRecord
()¶ Default-construct an associated record (protected implementation).
Friends
-
friend
lsst::afw::detection::PeakTable::afw::table::io::FitsWriter
-