lsst.afw  13.0-109-g62eb66483
Public Types | Public Member Functions | Static Public Member Functions | List of all members
lsst::afw::table::io::InputArchive Class Reference

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

#include <InputArchive.h>

Public Types

typedef std::map< int, std::shared_ptr< Persistable > > Map
 

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 & operator= (InputArchive const &other)
 Assignment. Does not deep-copy loaded Persistables. More...
 
 ~InputArchive ()
 
std::shared_ptr< Persistable > get (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

typedef std::map<int, std::shared_ptr<Persistable> > lsst::afw::table::io::InputArchive::Map

Definition at line 33 of file InputArchive.h.

Constructor & Destructor Documentation

◆ InputArchive() [1/3]

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

Construct an empty InputArchive that contains no objects.

◆ InputArchive() [2/3]

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

Construct an archive from catalogs.

◆ InputArchive() [3/3]

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

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

◆ ~InputArchive()

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

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.

◆ 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 58 of file InputArchive.h.

◆ getAll()

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

Load and return all objects in the archive.

◆ operator=()

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

Assignment. Does not deep-copy loaded Persistables.

◆ readFits()

static 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.

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