28 namespace lsst {
namespace afw {
namespace image {
32 class CoaddInputsFactory :
public table::io::PersistableFactory {
35 virtual PTR(table::io::Persistable)
36 read(InputArchive const & archive, CatalogVector const & catalogs)
const {
38 PTR(CoaddInputs) result = boost::make_shared<CoaddInputs>();
39 result->visits = table::
ExposureCatalog::readFromArchive(archive, catalogs.front());
40 result->ccds = table::
ExposureCatalog::readFromArchive(archive, catalogs.back());
44 CoaddInputsFactory(std::
string const &
name) : table::io::PersistableFactory(
name) {}
48 CoaddInputsFactory registration(
"CoaddInputs");
55 visits(visitSchema), ccds(ccdSchema)
59 visits(visits_), ccds(ccds_)
Defines the fields and offsets for a table.
table::Key< std::string > name
An object passed to Persistable::write to allow it to persist itself.
#define LSST_ARCHIVE_ASSERT(EXPR)
An assertion macro used to validate the structure of an InputArchive.
table::Key< table::Array< Kernel::Pixel > > image
Custom catalog class for ExposureRecord/Table.
ExposureCatalogT< ExposureRecord > ExposureCatalog
void writeToArchive(io::OutputArchiveHandle &handle, bool ignoreUnpersistable=true) const
Convenience output function for Persistables that contain an ExposureCatalog.