Loading [MathJax]/extensions/tex2jax.js
LSST Applications g04a91732dc+a777afbe81,g07dc498a13+7e3c5f68a2,g12483e3c20+0145ec33cd,g1409bbee79+7e3c5f68a2,g1a7e361dbc+7e3c5f68a2,g1fd858c14a+9f35e23ec3,g35bb328faa+fcb1d3bbc8,g3ad4f90e5c+0145ec33cd,g3bd4b5ce2c+cbf1bea503,g4e0f332c67+5d362be553,g53246c7159+fcb1d3bbc8,g5477a8d5ce+db04660fe6,g60b5630c4e+0145ec33cd,g623d845a50+0145ec33cd,g6f0c2978f1+3526b51a37,g75b6c65c88+d54b601591,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g8852436030+4639f750a5,g89139ef638+7e3c5f68a2,g9125e01d80+fcb1d3bbc8,g919ac25b3e+6220c5324a,g95236ca021+f7a31438ed,g989de1cb63+7e3c5f68a2,g9f33ca652e+2d6fa11d35,gaaedd4e678+7e3c5f68a2,gabe3b4be73+1e0a283bba,gb1101e3267+4a428ef779,gb4a253aaf5+0122250889,gb58c049af0+f03b321e39,gc99c83e5f0+76d20ab76d,gcf25f946ba+4639f750a5,gd6cbbdb0b4+c8606af20c,gde0f65d7ad+3d8a3b7e46,ge278dab8ac+932305ba37,gf795337580+03b96afe58,gfba249425e+fcb1d3bbc8,w.2025.08
LSST Data Management Base Package
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
lsst::afw::table::detail::Access Class Referencefinal

#include <Access.h>

Static Public Member Functions

template<typename T>
static Key< typename Key< T >::Element > extractElement (KeyBase< T > const &kb, std::size_t n)
 
template<typename T>
static Key< Array< T > > extractRange (KeyBase< Array< T > > const &kb, std::size_t begin, std::size_t end)
 
template<typename T>
static Key< T > makeKey (std::size_t offset)
 
template<typename T>
static Key< T > makeKey (Field< T > const &field, std::size_t offset)
 
static Key< Flag > makeKey (std::size_t offset, std::size_t bit)
 
static Key< std::stringmakeKeyString (std::size_t offset, std::size_t size)
 
template<typename T>
static Key< Array< T > > makeKeyArray (std::size_t offset, std::size_t size)
 
static void padSchema (Schema &schema, std::size_t bytes)
 

Detailed Description

Definition at line 31 of file Access.h.

Member Function Documentation

◆ extractElement()

template<typename T>
static Key< typename Key< T >::Element > lsst::afw::table::detail::Access::extractElement ( KeyBase< T > const & kb,
std::size_t n )
inlinestatic

Definition at line 35 of file Access.h.

35 {
36 if (!static_cast<Key<T> const &>(kb).isValid()) {
37 throw LSST_EXCEPT(
38 pex::exceptions::LogicError,
39 (boost::format(
40 "Cannot extract subfield key from invalid key of type '%s' "
41 "(most often this is caused by failing to setup centroid or shape slots)") %
43 .str());
44 }
45 return Key<typename Key<T>::Element>(static_cast<Key<T> const &>(kb).getOffset() +
46 n * sizeof(typename Key<T>::Element));
47 }
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition Exception.h:48
static std::string getTypeString()
Return a string description of the field type.
Definition FieldBase.cc:56
T Element
the type of subfields (the same as the type itself for scalars)
Definition FieldBase.h:45

◆ extractRange()

template<typename T>
static Key< Array< T > > lsst::afw::table::detail::Access::extractRange ( KeyBase< Array< T > > const & kb,
std::size_t begin,
std::size_t end )
inlinestatic

Definition at line 51 of file Access.h.

51 {
52 if (!static_cast<Key<Array<T> > const &>(kb).isValid()) {
53 throw LSST_EXCEPT(pex::exceptions::LogicError,
54 (boost::format("Cannot extract subfield key from invalid key of type '%s' ") %
56 .str());
57 }
58 return Key<Array<T> >(static_cast<Key<Array<T> > const &>(kb).getOffset() +
59 begin * sizeof(typename Key<T>::Element),
60 end - begin);
61 }

◆ makeKey() [1/3]

template<typename T>
static Key< T > lsst::afw::table::detail::Access::makeKey ( Field< T > const & field,
std::size_t offset )
inlinestatic

Definition at line 71 of file Access.h.

71 {
72 return Key<T>(offset, field);
73 }

◆ makeKey() [2/3]

template<typename T>
static Key< T > lsst::afw::table::detail::Access::makeKey ( std::size_t offset)
inlinestatic

Definition at line 65 of file Access.h.

65 {
66 return Key<T>(offset);
67 }

◆ makeKey() [3/3]

static Key< Flag > lsst::afw::table::detail::Access::makeKey ( std::size_t offset,
std::size_t bit )
inlinestatic

Definition at line 76 of file Access.h.

76{ return Key<Flag>(offset, bit); }

◆ makeKeyArray()

template<typename T>
static Key< Array< T > > lsst::afw::table::detail::Access::makeKeyArray ( std::size_t offset,
std::size_t size )
inlinestatic

Definition at line 83 of file Access.h.

83 {
84 return Key<Array<T>>(offset, size);
85 }

◆ makeKeyString()

static Key< std::string > lsst::afw::table::detail::Access::makeKeyString ( std::size_t offset,
std::size_t size )
inlinestatic

Definition at line 79 of file Access.h.

79{ return Key<std::string>(offset, size); }

◆ padSchema()

static void lsst::afw::table::detail::Access::padSchema ( Schema & schema,
std::size_t bytes )
inlinestatic

Definition at line 88 of file Access.h.

88 {
89 schema._edit();
90 schema._impl->_recordSize += bytes;
91 }

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