LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | List of all members
lsst::meas::algorithms::CoaddBoundedField::Factory Class Reference
Inheritance diagram for lsst::meas::algorithms::CoaddBoundedField::Factory:

Public Member Functions

virtual boost::shared_ptr
< tbl::io::Persistable > 
read (InputArchive const &archive, CatalogVector const &catalogs) const
 
 Factory (std::string const &name)
 

Detailed Description

Definition at line 154 of file CoaddBoundedField.cc.

Constructor & Destructor Documentation

lsst::meas::algorithms::CoaddBoundedField::Factory::Factory ( std::string const &  name)
inline

Definition at line 185 of file CoaddBoundedField.cc.

185 : tbl::io::PersistableFactory(name) {}
table::Key< std::string > name
Definition: ApCorrMap.cc:71

Member Function Documentation

virtual boost::shared_ptr< tbl::io::Persistable > lsst::meas::algorithms::CoaddBoundedField::Factory::read ( InputArchive const &  archive,
CatalogVector const &  catalogs 
) const
inlinevirtual

Definition at line 158 of file CoaddBoundedField.cc.

158  {
159  CoaddBoundedFieldPersistenceKeys1 const & keys1 = CoaddBoundedFieldPersistenceKeys1::get();
160  CoaddBoundedFieldPersistenceKeys2 const & keys2 = CoaddBoundedFieldPersistenceKeys2::get();
161  LSST_ARCHIVE_ASSERT(catalogs.size() == 2u);
162  LSST_ARCHIVE_ASSERT(catalogs.front().getSchema() == keys1.schema);
163  LSST_ARCHIVE_ASSERT(catalogs.back().getSchema() == keys2.schema);
164  tbl::BaseRecord const & record1 = catalogs.front().front();
165  ElementVector elements;
166  elements.reserve(catalogs.back().size());
167  for (tbl::BaseCatalog::const_iterator i = catalogs.back().begin(); i != catalogs.back().end(); ++i) {
168  elements.push_back(
169  Element(
170  archive.get<afw::math::BoundedField>(i->get(keys2.field)),
171  archive.get<afw::image::Wcs>(i->get(keys2.wcs)),
172  archive.get<afw::geom::polygon::Polygon>(i->get(keys2.validPolygon)),
173  i->get(keys2.weight)
174  )
175  );
176  }
177  return boost::make_shared<CoaddBoundedField>(
178  afw::geom::Box2I(record1.get(keys1.bboxMin), record1.get(keys1.bboxMax)),
179  archive.get<afw::image::Wcs>(record1.get(keys1.coaddWcs)),
180  elements,
181  record1.get(keys1.default_)
182  );
183  }
#define LSST_ARCHIVE_ASSERT(EXPR)
An assertion macro used to validate the structure of an InputArchive.
Definition: Persistable.h:47
lsst::afw::image::Wcs Wcs
Definition: Wcs.cc:60

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