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::KernelPsfFactory< T, K > Class Template Reference

A PersistableFactory for KernelPsf and its subclasses. More...

#include <KernelPsfFactory.h>

Inheritance diagram for lsst::meas::algorithms::KernelPsfFactory< T, K >:
lsst::afw::table::io::PersistableFactory

Public Member Functions

virtual boost::shared_ptr
< afw::table::io::Persistable
read (afw::table::io::InputArchive const &archive, afw::table::io::CatalogVector const &catalogs) const
 Construct a new object from the given InputArchive and vector of catalogs. More...
 
 KernelPsfFactory (std::string const &name)
 
- Public Member Functions inherited from lsst::afw::table::io::PersistableFactory
 PersistableFactory (std::string const &name)
 Constructor for the factory. More...
 
virtual ~PersistableFactory ()
 

Additional Inherited Members

- Static Public Member Functions inherited from lsst::afw::table::io::PersistableFactory
static PersistableFactory const & lookup (std::string const &name, std::string const &module="")
 Return the factory that has been registered with the given name. More...
 
- Protected Types inherited from lsst::afw::table::io::PersistableFactory
typedef io::InputArchive InputArchive
 
typedef io::CatalogVector CatalogVector
 

Detailed Description

template<typename T = KernelPsf, typename K = afw::math::Kernel>
class lsst::meas::algorithms::KernelPsfFactory< T, K >

A PersistableFactory for KernelPsf and its subclasses.

If a KernelPsf subclass has no data members other than its kernel, table persistence for it can be implemented simply by reimplementing getPersistenceName() and registering a specialization of KernelPsfFactory.

Template Parameters
TKernelPsf subclass the factory will construct.
KKernel subclass the Psf constructor requires.

Definition at line 45 of file KernelPsfFactory.h.

Constructor & Destructor Documentation

template<typename T = KernelPsf, typename K = afw::math::Kernel>
lsst::meas::algorithms::KernelPsfFactory< T, K >::KernelPsfFactory ( std::string const &  name)
inline

Definition at line 63 of file KernelPsfFactory.h.

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

Member Function Documentation

template<typename T = KernelPsf, typename K = afw::math::Kernel>
virtual boost::shared_ptr< afw::table::io::Persistable > lsst::meas::algorithms::KernelPsfFactory< T, K >::read ( afw::table::io::InputArchive const &  archive,
afw::table::io::CatalogVector const &  catalogs 
) const
inlinevirtual

Construct a new object from the given InputArchive and vector of catalogs.

Implements lsst::afw::table::io::PersistableFactory.

Definition at line 49 of file KernelPsfFactory.h.

49  {
50  static KernelPsfPersistenceHelper const & keys = KernelPsfPersistenceHelper::get();
51  LSST_ARCHIVE_ASSERT(catalogs.size() == 1u);
52  LSST_ARCHIVE_ASSERT(catalogs.front().size() == 1u);
53  afw::table::BaseRecord const & record = catalogs.front().front();
54  LSST_ARCHIVE_ASSERT(record.getSchema() == keys.schema);
55  return PTR(T)(
56  new T(
57  archive.get<K>(record.get(keys.kernel)),
58  record.get(keys.averagePosition)
59  )
60  );
61  }
#define PTR(...)
Definition: base.h:41
static KernelPsfPersistenceHelper const & get()
Definition: KernelPsf.cc:32
#define LSST_ARCHIVE_ASSERT(EXPR)
An assertion macro used to validate the structure of an InputArchive.
Definition: Persistable.h:47

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