File OutputArchive.h

namespace lsst

Class for a simple mapping implementing a generic AstrometryTransform.

Remove all non-astronomical counts from the Chunk Exposure’s pixels.

Forward declarations for lsst::utils::Cache

For details on the Cache class, see the Cache.h file.

It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.

A base class for image defects

Numeric constants used by the Integrate.h integrator routines.

Compute Image Statistics

Note

Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.

Note

The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.

namespace afw
namespace table
namespace io
class OutputArchive
#include <OutputArchive.h>

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

OutputArchive should generally be used directly only by objects that do not themselves inherit from Persistable, but contain many objects that do (such as Exposure). It provides an interface for adding objects to the archive (put()), transforming them into catalogs that can be retrieved directly or written to a FITS file. The first catalog is an index that indicates which rows of the subsequent catalogs correspond to each object.

See getIndexCatalog() for a more detailed description of the index.

Unnamed Group

int put(std::shared_ptr<Persistable const> obj, bool permissive = false)

Save an object to the archive and return a unique ID that can be used to retrieve it from an InputArchive.

If permissive is true and obj->isPersistable() is false, the object will not be saved but 0 will be returned instead of throwing an exception.

If the given pointer is null, the returned ID is always 0, which may be used to retrieve null pointers from an InputArchive.

It is expected that the shared_ptr form will usually be used, as Persistables are typically held by shared_ptr. We also provide a const reference overload for temporaries as well as a const raw pointer overload for temporaries that may be null.

If the shared_ptr form is used and the given pointer has already been saved, it will not be written again and the same ID will be returned as the first time it was saved.

Provides no exception safety for the archive itself - if the object being saved (or any nested object) throws an exception, the archive may be in an inconsistent state and should not be saved. The objects being saved are never modified during persistence, even when exceptions are thrown.

int put(Persistable const *obj, bool permissive = false)
int put(Persistable const &obj, bool permissive = false)

Public Functions

OutputArchive()

Construct an empty OutputArchive containing no objects.

OutputArchive(OutputArchive const &other)

Copy-construct an OutputArchive. Saved objects are not deep-copied.

OutputArchive(OutputArchive &&other)
OutputArchive &operator=(OutputArchive const &other)

Assign from another OutputArchive. Saved objects are not deep-copied.

OutputArchive &operator=(OutputArchive &&other)
~OutputArchive()
BaseCatalog const &getIndexCatalog() const

Return the index catalog that specifies where objects are stored in the data catalogs.

BaseCatalog const &getCatalog(int n) const

Return the nth catalog. Catalog 0 is always the index catalog.

int countCatalogs() const

Return the total number of catalogs, including the index.

void writeFits(fits::Fits &fitsfile) const

Write the archive to an already-open FITS object.

Always appends new HDUs.

Parameters
  • [in] fitsfile: Open FITS object to write to.

Private Members

std::shared_ptr<Impl> _impl

Friends

friend lsst::afw::table::io::OutputArchiveHandle
class OutputArchiveHandle
#include <OutputArchive.h>

An object passed to Persistable::write to allow it to persist itself.

OutputArchiveHandle provides an interface to add additional catalogs and save nested Persistables to the same archive.

Unnamed Group

int put(Persistable const *obj, bool permissive = false)
int put(std::shared_ptr<Persistable const> obj, bool permissive = false)
int put(Persistable const &obj, bool permissive = false)

Public Functions

BaseCatalog makeCatalog(Schema const &schema)

Return a new, empty catalog with the given schema.

All catalogs passed to saveCatalog should be originally created by makeCatalog, or at least share the same table.

void saveEmpty()

Indicate that the object being persisted has no state, and hence will never call makeCatalog() or saveCatalog().

void saveCatalog(BaseCatalog const &catalog)

Save a catalog in the archive.

The catalog must have been created using makeCatalog, or be a shallow copy or subset of such a catalog.

~OutputArchiveHandle()
OutputArchiveHandle(const OutputArchiveHandle&)
OutputArchiveHandle &operator=(const OutputArchiveHandle&)
OutputArchiveHandle(OutputArchiveHandle&&)
OutputArchiveHandle &operator=(OutputArchiveHandle&&)

Private Functions

OutputArchiveHandle(int id, std::string const &name, std::string const &module, std::shared_ptr<OutputArchive::Impl> impl)

Private Members

int _id
int _catPersistable
std::string _name
std::string _module
std::shared_ptr<OutputArchive::Impl> _impl

Friends

friend lsst::afw::table::io::OutputArchive::Impl