LSST Applications g1653933729+a8ce1bb630,g171997e3ee+76e92115be,g1a997c3884+a8ce1bb630,g28da252d5a+4013ff5194,g2bbee38e9b+d6d0f9f6ae,g2bc492864f+d6d0f9f6ae,g2cdde0e794+ccb74358b7,g3156d2b45e+07302053f8,g347aa1857d+d6d0f9f6ae,g35bb328faa+a8ce1bb630,g3a166c0a6a+d6d0f9f6ae,g3e281a1b8c+130fae20e3,g4005a62e65+17cd334064,g414038480c+c9f68e2a12,g41af890bb2+3e1f62f438,g4e1a3235cc+9db7d56ad0,g7b55021d1b+7b623691d5,g80478fca09+334cc8d2bd,g82479be7b0+b568f6b267,g858d7b2824+37b39d8760,g9125e01d80+a8ce1bb630,ga5288a1d22+11cb34fefe,gae0086650b+a8ce1bb630,gb4ec7eb0ab+37b39d8760,gb58c049af0+d64f4d3760,gc081298178+284e133171,gc28159a63d+d6d0f9f6ae,gcf0d15dbbd+00fe2e0b07,gd6b7c0dfd1+8b62435e69,gda3e153d99+37b39d8760,gda6a2b7d83+00fe2e0b07,gdaeeff99f8+1711a396fd,gdd5a9049c5+23f3b3239a,ge2409df99d+5d9f551a54,ge33fd446bb+37b39d8760,ge79ae78c31+d6d0f9f6ae,gf0baf85859+2dea8344a2,gf5289d68f6+3777f3df5e,w.2024.41
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
lsst::afw::table::PersistableObjectColumnReader< T, Setter > Class Template Reference
Inheritance diagram for lsst::afw::table::PersistableObjectColumnReader< T, Setter >:
lsst::afw::table::io::FitsColumnReader

Public Member Functions

 PersistableObjectColumnReader (int column)
 
void readCell (BaseRecord &record, std::size_t row, fits::Fits &fits, std::shared_ptr< io::InputArchive > const &archive) const override
 Read values from a single row.
 
virtual void prepRead (std::size_t firstRow, std::size_t nRows, fits::Fits &fits)
 Optionally read ahead and cache values from multiple rows.
 

Static Public Member Functions

static void setup (std::string const &name, io::FitsSchemaInputMapper &mapper)
 

Detailed Description

template<typename T, void(ExposureRecord::*)(std::shared_ptr< T const >) Setter>
class lsst::afw::table::PersistableObjectColumnReader< T, Setter >

Definition at line 255 of file Exposure.cc.

Constructor & Destructor Documentation

◆ PersistableObjectColumnReader()

template<typename T , void(ExposureRecord::*)(std::shared_ptr< T const >) Setter>
lsst::afw::table::PersistableObjectColumnReader< T, Setter >::PersistableObjectColumnReader ( int column)
inline

Definition at line 268 of file Exposure.cc.

268: _column(column) {}

Member Function Documentation

◆ prepRead()

virtual void lsst::afw::table::io::FitsColumnReader::prepRead ( std::size_t firstRow,
std::size_t nRows,
fits::Fits & fits )
inlinevirtualinherited

Optionally read ahead and cache values from multiple rows.

Subclasses are not required to implement this method; if they do, they should indicate to readCell that cached values should be used instead. Subclasses should not assume that prepRead will always be called, however.

Parameters
[in]firstRowIndex of the first row to read.
[in]nRowsNumber of rows to read.
[in]fitsFITS file manager object.

Definition at line 42 of file FitsSchemaInputMapper.h.

42{}

◆ readCell()

template<typename T , void(ExposureRecord::*)(std::shared_ptr< T const >) Setter>
void lsst::afw::table::PersistableObjectColumnReader< T, Setter >::readCell ( BaseRecord & record,
std::size_t row,
fits::Fits & fits,
std::shared_ptr< io::InputArchive > const & archive ) const
inlineoverridevirtual

Read values from a single row.

Parameters
[in,out]recordRecord to populate.
[in]rowIndex of the row to read from.
[in]fitsFITS file manager object.
[in]archiveArchive holding persisted objects, loaded from other HDUs. May be null.

Implements lsst::afw::table::io::FitsColumnReader.

Definition at line 270 of file Exposure.cc.

271 {
272 int id = 0;
273 fits.readTableScalar<int>(row, _column, id);
274 std::shared_ptr<T> value = archive->get<T>(id);
275 (static_cast<ExposureRecord &>(record).*(Setter))(value);
276 }
table::Key< int > id
Definition Detector.cc:162
T get(T... args)
int row
Definition CR.cc:145

◆ setup()

template<typename T , void(ExposureRecord::*)(std::shared_ptr< T const >) Setter>
static void lsst::afw::table::PersistableObjectColumnReader< T, Setter >::setup ( std::string const & name,
io::FitsSchemaInputMapper & mapper )
inlinestatic

Definition at line 257 of file Exposure.cc.

257 {
258 auto item = mapper.find(name);
259 if (item) {
260 if (mapper.hasArchive()) {
262 mapper.customize(std::move(reader));
263 }
264 mapper.erase(item);
265 }
266 }
SchemaMapper * mapper
T move(T... args)

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