lsst.afw  13.0-92-g8ecf155+1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
lsst::afw::detection::PeakTable Class Reference

Table class for Peaks in Footprints. More...

#include <Peak.h>

Inheritance diagram for lsst::afw::detection::PeakTable:
lsst::afw::table::BaseTable

Public Types

typedef PeakRecord Record
 
typedef
afw::table::ColumnViewT
< PeakRecord > 
ColumnView
 
typedef afw::table::CatalogT
< Record > 
Catalog
 
typedef afw::table::CatalogT
< Record const > 
ConstCatalog
 
- Public Types inherited from lsst::afw::table::BaseTable
typedef BaseRecord Record
 The associated record class. More...
 
typedef BaseColumnView ColumnView
 The associated ColumnView class. More...
 
typedef CatalogT< Record > Catalog
 Template of CatalogT used to hold records of the associated type. More...
 
typedef CatalogT< Record const > ConstCatalog
 Template of CatalogT used to hold const records of the associated type. More...
 

Public Member Functions

std::shared_ptr
< afw::table::IdFactory > 
getIdFactory ()
 Return the object that generates IDs for the table (may be null). More...
 
std::shared_ptr
< afw::table::IdFactory const > 
getIdFactory () const
 Return the object that generates IDs for the table (may be null). More...
 
void setIdFactory (std::shared_ptr< afw::table::IdFactory > f)
 Switch to a new IdFactory – object that generates IDs for the table (may be null). More...
 
std::shared_ptr< PeakTable > clone () const
 
std::shared_ptr< PeakRecord > makeRecord ()
 
std::shared_ptr< PeakRecord > copyRecord (afw::table::BaseRecord const &other)
 
std::shared_ptr< PeakRecord > copyRecord (afw::table::BaseRecord const &other, afw::table::SchemaMapper const &mapper)
 
- Public Member Functions inherited from lsst::afw::table::BaseTable
std::shared_ptr
< daf::base::PropertyList > 
getMetadata () const
 Return the flexible metadata associated with the table. May be null. More...
 
void setMetadata (std::shared_ptr< daf::base::PropertyList > const &metadata)
 Set the flexible metadata associated with the table. May be null. More...
 
std::shared_ptr
< daf::base::PropertyList > 
popMetadata ()
 Return the metadata and set the internal metadata to a null pointer. More...
 
std::shared_ptr< BaseTable > clone () const
 Return a polymorphic deep copy of the table. More...
 
std::shared_ptr< BaseRecord > makeRecord ()
 Default-construct an associated record. More...
 
std::shared_ptr< BaseRecord > copyRecord (BaseRecord const &input)
 Deep-copy a record, requiring that it have the same schema as this table. More...
 
std::shared_ptr< BaseRecord > copyRecord (BaseRecord const &input, SchemaMapper const &mapper)
 Deep-copy a record, using a mapper to relate two schemas. More...
 
Schema getSchema () const
 Return the table's schema. More...
 
void preallocate (std::size_t nRecords)
 Allocate contiguous space for new records in advance. More...
 
std::size_t getBufferSize () const
 Return the number of additional records space has been already been allocated for. More...
 
virtual ~BaseTable ()
 

Static Public Member 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. More...
 
static afw::table::Schema makeMinimalSchema ()
 Return a minimal schema for Peak tables and records. More...
 
static bool checkSchema (afw::table::Schema const &other)
 Return true if the given schema is a valid PeakTable schema. More...
 
static afw::table::Key
< afw::table::RecordId > 
getIdKey ()
 Get keys for standard fields shared by all peaks. More...
 
static afw::table::Key< int > getIxKey ()
 Get keys for standard fields shared by all peaks. More...
 
static afw::table::Key< int > getIyKey ()
 Get keys for standard fields shared by all peaks. More...
 
static afw::table::Key< float > getFxKey ()
 Get keys for standard fields shared by all peaks. More...
 
static afw::table::Key< float > getFyKey ()
 Get keys for standard fields shared by all peaks. More...
 
static afw::table::Key< float > getPeakValueKey ()
 Get keys for standard fields shared by all peaks. More...
 
- Static Public Member Functions inherited from lsst::afw::table::BaseTable
static std::shared_ptr< BaseTable > make (Schema const &schema)
 Construct a new table. More...
 

Protected Member Functions

 PeakTable (afw::table::Schema const &schema, std::shared_ptr< afw::table::IdFactory > const &idFactory)
 
 PeakTable (PeakTable const &other)
 
std::shared_ptr
< afw::table::BaseTable > 
_clone () const override
 Clone implementation with noncovariant return types. More...
 
std::shared_ptr
< afw::table::BaseRecord > 
_makeRecord () override
 Default-construct an associated record (protected implementation). More...
 
- Protected Member Functions inherited from lsst::afw::table::BaseTable
template<typename Derived >
std::shared_ptr< Derived > getSelf ()
 Convenience function for static-casting shared_from_this for use by derived classes. More...
 
template<typename Derived >
std::shared_ptr< Derived const > getSelf () const
 Convenience function for static-casting shared_from_this for use by derived classes. More...
 
virtual void handleAliasChange (std::string const &alias)
 
 BaseTable (Schema const &schema)
 Construct from a schema. More...
 
 BaseTable (BaseTable const &other)
 Copy construct. More...
 

Friends

class afw::table::io::FitsWriter
 

Additional Inherited Members

- Static Public Attributes inherited from lsst::afw::table::BaseTable
static int nRecordsPerBlock
 Number of records in each memory block. More...
 

Detailed Description

Table class for Peaks in Footprints.

Definition at line 86 of file Peak.h.

Member Typedef Documentation

Definition at line 90 of file Peak.h.

Definition at line 89 of file Peak.h.

Definition at line 91 of file Peak.h.

Definition at line 88 of file Peak.h.

Constructor & Destructor Documentation

lsst::afw::detection::PeakTable::PeakTable ( afw::table::Schema const &  schema,
std::shared_ptr< afw::table::IdFactory > const &  idFactory 
)
protected

Definition at line 134 of file Peak.cc.

lsst::afw::detection::PeakTable::PeakTable ( PeakTable const &  other)
protected

Definition at line 138 of file Peak.cc.

Member Function Documentation

std::shared_ptr< afw::table::BaseTable > lsst::afw::detection::PeakTable::_clone ( ) const
overrideprotectedvirtual

Clone implementation with noncovariant return types.

Reimplemented from lsst::afw::table::BaseTable.

Definition at line 161 of file Peak.cc.

std::shared_ptr< afw::table::BaseRecord > lsst::afw::detection::PeakTable::_makeRecord ( )
overrideprotectedvirtual

Default-construct an associated record (protected implementation).

Reimplemented from lsst::afw::table::BaseTable.

Definition at line 165 of file Peak.cc.

static bool lsst::afw::detection::PeakTable::checkSchema ( afw::table::Schema const &  other)
inlinestatic

Return true if the given schema is a valid PeakTable schema.

This will always be true if the given schema was originally constructed using makeMinimalSchema(), and will rarely be true otherwise.

Definition at line 125 of file Peak.h.

std::shared_ptr<PeakTable> lsst::afw::detection::PeakTable::clone ( ) const
inline

Definition at line 153 of file Peak.h.

std::shared_ptr<PeakRecord> lsst::afw::detection::PeakTable::copyRecord ( afw::table::BaseRecord const &  other)
inline

Definition at line 159 of file Peak.h.

std::shared_ptr<PeakRecord> lsst::afw::detection::PeakTable::copyRecord ( afw::table::BaseRecord const &  other,
afw::table::SchemaMapper const &  mapper 
)
inline

Definition at line 164 of file Peak.h.

static afw::table::Key<float> lsst::afw::detection::PeakTable::getFxKey ( )
inlinestatic

Get keys for standard fields shared by all peaks.

These keys are used to implement getters and setters on PeakRecord.

Definition at line 147 of file Peak.h.

static afw::table::Key<float> lsst::afw::detection::PeakTable::getFyKey ( )
inlinestatic

Get keys for standard fields shared by all peaks.

These keys are used to implement getters and setters on PeakRecord.

Definition at line 148 of file Peak.h.

std::shared_ptr<afw::table::IdFactory> lsst::afw::detection::PeakTable::getIdFactory ( )
inline

Return the object that generates IDs for the table (may be null).

Definition at line 130 of file Peak.h.

std::shared_ptr<afw::table::IdFactory const> lsst::afw::detection::PeakTable::getIdFactory ( ) const
inline

Return the object that generates IDs for the table (may be null).

Definition at line 133 of file Peak.h.

static afw::table::Key<afw::table::RecordId> lsst::afw::detection::PeakTable::getIdKey ( )
inlinestatic

Get keys for standard fields shared by all peaks.

These keys are used to implement getters and setters on PeakRecord.

Definition at line 144 of file Peak.h.

static afw::table::Key<int> lsst::afw::detection::PeakTable::getIxKey ( )
inlinestatic

Get keys for standard fields shared by all peaks.

These keys are used to implement getters and setters on PeakRecord.

Definition at line 145 of file Peak.h.

static afw::table::Key<int> lsst::afw::detection::PeakTable::getIyKey ( )
inlinestatic

Get keys for standard fields shared by all peaks.

These keys are used to implement getters and setters on PeakRecord.

Definition at line 146 of file Peak.h.

static afw::table::Key<float> lsst::afw::detection::PeakTable::getPeakValueKey ( )
inlinestatic

Get keys for standard fields shared by all peaks.

These keys are used to implement getters and setters on PeakRecord.

Definition at line 149 of file Peak.h.

std::shared_ptr< PeakTable > lsst::afw::detection::PeakTable::make ( afw::table::Schema const &  schema,
bool  forceNew = false 
)
static

Obtain a table that can be used to create records with given schema.

Parameters
[in]schemaSchema that defines the fields, offsets, and record size for the table.
[in]forceNewIf true, guarantee that the returned PeakTable will be a new one, rather than attempting to reuse an existing PeakTable with the same 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)

Definition at line 100 of file Peak.cc.

static afw::table::Schema lsst::afw::detection::PeakTable::makeMinimalSchema ( )
inlinestatic

Return a minimal schema for Peak tables and records.

The returned schema can and generally should be modified further, but many operations on PeakRecords will assume that at least the fields provided by this routine are present.

Definition at line 117 of file Peak.h.

std::shared_ptr<PeakRecord> lsst::afw::detection::PeakTable::makeRecord ( )
inline

Definition at line 156 of file Peak.h.

void lsst::afw::detection::PeakTable::setIdFactory ( std::shared_ptr< afw::table::IdFactory >  f)
inline

Switch to a new IdFactory – object that generates IDs for the table (may be null).

Definition at line 136 of file Peak.h.

Friends And Related Function Documentation

friend class afw::table::io::FitsWriter
friend

Definition at line 195 of file Peak.h.


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