LSSTApplications  19.0.0-14-gb0260a2+64befe7c1c,20.0.0+0b340dd7c4,20.0.0+1540ce6389,20.0.0+7c6b12c2f9,20.0.0+ae956f52c5,20.0.0+be870186d9,20.0.0+e2e26847c2,20.0.0-1-g04bee24+7c6b12c2f9,20.0.0-1-g10df615+fbe45b1aff,20.0.0-1-g253301a+7c6b12c2f9,20.0.0-1-g2b7511a+46a6078777,20.0.0-1-g4d801e7+9d50d6c21a,20.0.0-1-g5b95a8c+8ebfc75efb,20.0.0-1-gb058bd0+46a6078777,20.0.0-1-gb88604f+acecce4127,20.0.0-1-gc96f8cb+016e330d09,20.0.0-1-gedffbd8+83814edeba,20.0.0-10-g0891cd99+a5f14e9acb,20.0.0-10-g9a20bd332+576ca7b471,20.0.0-17-gcdbda88+0e26bfb1e6,20.0.0-2-g4dae9ad+016e330d09,20.0.0-2-g61b8584+85c46248f3,20.0.0-2-gb780d76+f45b7d88f4,20.0.0-21-g9bbb7f7+016e330d09,20.0.0-22-gc512666+f30f3883a7,20.0.0-23-g8900aa8+68630f7098,20.0.0-3-g1653f94+85c46248f3,20.0.0-3-g4cc78c6+63636aeed8,20.0.0-3-g750bffe+e05f822de9,20.0.0-3-gbd60e8c+ff10c6d78d,20.0.0-32-g15a0e07c+a4c9d0309b,20.0.0-4-g97dc21a+68630f7098,20.0.0-4-gfea843c+f45b7d88f4,20.0.0-5-g357b56b+f45b7d88f4,20.0.0-6-g9a5b7a1+b0f8c2be93,20.0.0-60-gad89340+e4dd172200,20.0.0-7-gcda7bf1+673816f70c,w.2020.43
LSSTDataManagementBasePackage
Static Public Member Functions | List of all members
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, int n)
 
template<typename T >
static Key< Array< T > > extractRange (KeyBase< Array< T > > const &kb, int begin, int end)
 
template<typename T >
static Key< T > makeKey (int offset)
 
template<typename T >
static Key< T > makeKey (Field< T > const &field, int offset)
 
static Key< Flag > makeKey (int offset, int bit)
 
static Key< std::stringmakeKeyString (int offset, int size)
 
template<typename T >
static Key< Array< T > > makeKeyArray (int offset, int size)
 
static void padSchema (Schema &schema, int 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,
int  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,
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)") %
42  Key<T>::getTypeString())
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  }

◆ extractRange()

template<typename T >
static Key<Array<T> > lsst::afw::table::detail::Access::extractRange ( KeyBase< Array< T > > const &  kb,
int  begin,
int  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' ") %
55  Key<T>::getTypeString())
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,
int  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 ( int  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 ( int  offset,
int  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 ( int  offset,
int  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 ( int  offset,
int  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,
int  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:
schema
table::Schema schema
Definition: Amplifier.cc:115
lsst.pex.config.history.format
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
Definition: history.py:174
end
int end
Definition: BoundedField.cc:105
field
table::Key< int > field
Definition: ApCorrMap.cc:77
LSST_EXCEPT
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
bytes
table::Key< table::Array< std::uint8_t > > bytes
Definition: Transform.cc:199
std::begin
T begin(T... args)
isValid
bool isValid
Definition: fits.cc:399