lsst.afw g1f6fc4ca13+8b5155b42b
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
lsst::afw::table::io::InputArchive Class Referencefinal

A multi-catalog archive object used to load table::io::Persistable objects. More...

#include <InputArchive.h>

Classes

class  Impl
 

Public Types

using Map = std::map< int, std::shared_ptr< Persistable > >
 

Public Member Functions

 InputArchive ()
 Construct an empty InputArchive that contains no objects. More...
 
 InputArchive (BaseCatalog const &index, CatalogVector const &dataCatalogs)
 Construct an archive from catalogs. More...
 
 InputArchive (InputArchive const &other)
 Copy-constructor. Does not deep-copy loaded Persistables. More...
 
 InputArchive (InputArchive &&other)
 
InputArchiveoperator= (InputArchive const &other)
 Assignment. Does not deep-copy loaded Persistables. More...
 
InputArchiveoperator= (InputArchive &&other)
 
 ~InputArchive ()
 
std::shared_ptr< Persistableget (int id) const
 Load the Persistable with the given ID and return it. More...
 
template<typename T >
std::shared_ptr< T > get (int id) const
 Load an object of the given type and ID with error checking. More...
 
Map const & getAll () const
 Load and return all objects in the archive. More...
 

Static Public Member Functions

static InputArchive readFits (fits::Fits &fitsfile)
 Read an object from an already open FITS object. More...
 

Detailed Description

A multi-catalog archive object used to load table::io::Persistable objects.

An InputArchive can be constructed directly from the catalogs produced by OutputArchive, or more usefully, read from a multi-extension FITS file.

See also
OutputArchive

Definition at line 31 of file InputArchive.h.

Member Typedef Documentation

◆ Map

Definition at line 33 of file InputArchive.h.

Constructor & Destructor Documentation

◆ InputArchive() [1/4]

lsst::afw::table::io::InputArchive::InputArchive ( )

Construct an empty InputArchive that contains no objects.

Definition at line 162 of file InputArchive.cc.

◆ InputArchive() [2/4]

lsst::afw::table::io::InputArchive::InputArchive ( BaseCatalog const &  index,
CatalogVector const &  dataCatalogs 
)

Construct an archive from catalogs.

Definition at line 166 of file InputArchive.cc.

◆ InputArchive() [3/4]

lsst::afw::table::io::InputArchive::InputArchive ( InputArchive const &  other)
default

Copy-constructor. Does not deep-copy loaded Persistables.

◆ InputArchive() [4/4]

lsst::afw::table::io::InputArchive::InputArchive ( InputArchive &&  other)

Definition at line 171 of file InputArchive.cc.

◆ ~InputArchive()

lsst::afw::table::io::InputArchive::~InputArchive ( )
default

Member Function Documentation

◆ get() [1/2]

std::shared_ptr< Persistable > lsst::afw::table::io::InputArchive::get ( int  id) const

Load the Persistable with the given ID and return it.

If the object has already been loaded once, the same instance will be returned again.

Definition at line 179 of file InputArchive.cc.

◆ get() [2/2]

template<typename T >
std::shared_ptr< T > lsst::afw::table::io::InputArchive::get ( int  id) const
inline

Load an object of the given type and ID with error checking.

Definition at line 60 of file InputArchive.h.

◆ getAll()

InputArchive::Map const & lsst::afw::table::io::InputArchive::getAll ( ) const

Load and return all objects in the archive.

Definition at line 181 of file InputArchive.cc.

◆ operator=() [1/2]

InputArchive & lsst::afw::table::io::InputArchive::operator= ( InputArchive &&  other)

Definition at line 175 of file InputArchive.cc.

◆ operator=() [2/2]

InputArchive & lsst::afw::table::io::InputArchive::operator= ( InputArchive const &  other)
default

Assignment. Does not deep-copy loaded Persistables.

◆ readFits()

InputArchive lsst::afw::table::io::InputArchive::readFits ( fits::Fits fitsfile)
static

Read an object from an already open FITS object.

Parameters
[in]fitsfileFITS object to read from, already positioned at the desired HDU.

Definition at line 183 of file InputArchive.cc.


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