LSST Applications g04e9c324dd+8c5ae1fdc5,g0644efc3f0+7e72ced385,g123d84c11c+8c5ae1fdc5,g1ec0fe41b4+6ec6b74de1,g1fd858c14a+1d778e1869,g3533f9d6cb+7e72ced385,g35bb328faa+8c5ae1fdc5,g35ef7ab7cf+460d7c47aa,g53246c7159+8c5ae1fdc5,g60b5630c4e+7e72ced385,g60c8b41c57+095f713f68,g663da51e9b+6aff55297d,g6735e52a0d+29de3d959a,g67b6fd64d1+57193d00fb,g7605de067c+eb240d2b47,g78460c75b0+7e33a9eb6d,g786e29fd12+668abc6043,g844c57033c+03ddc13274,g8852436030+670976b475,g89139ef638+57193d00fb,g989de1cb63+57193d00fb,g9f33ca652e+a4f2b81461,ga1e959baac+5fbc491aed,ga2f891cd6c+7e72ced385,gabe3b4be73+8856018cbb,gabf8522325+cc757f8247,gac2eed3f23+57193d00fb,gb1101e3267+3b5d6a3d0b,gb89ab40317+57193d00fb,gcf25f946ba+670976b475,gd107969129+b3ac407438,gd6cbbdb0b4+8e46defd2a,gde0f65d7ad+eb00ebb37f,ge278dab8ac+2322f1d6ea,ge410e46f29+57193d00fb,gf30d85a44d+9b77053554,gf5e32f922b+8c5ae1fdc5,gff02db199a+bb6b2c7d57,w.2025.28
LSST Data Management Base Package
Loading...
Searching...
No Matches
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: