lsst.afw
20.0.0-17-g80088cf60+109ac6652c
|
Go to the documentation of this file.
2 #ifndef AFW_TABLE_IO_Persistable_h_INCLUDED
3 #define AFW_TABLE_IO_Persistable_h_INCLUDED
25 class OutputArchiveHandle;
48 #define LSST_ARCHIVE_ASSERT(EXPR) \
50 throw LSST_EXCEPT(lsst::afw::table::io::MalformedArchiveError, "Archive assertion failed: " #EXPR)
148 template <typename T>
175 template <typename T>
184 return dynamicCast(Persistable::_readFits(fitsfile));
195 return dynamicCast(Persistable::_readFits(fileName, hdu));
206 return dynamicCast(Persistable::_readFits(manager, hdu));
275 #endif // !AFW_TABLE_IO_Persistable_h_INCLUDED
An exception thrown when problems occur during persistence.
virtual std::string getPythonModule() const
Return the fully-qualified Python module that should be imported to guarantee that its factory is reg...
void writeFits(std::string const &fileName, std::string const &mode="w") const
Write the object to a regular FITS file.
const int DEFAULT_HDU
Specify that the default HDU should be read.
An object passed to Persistable::write to allow it to persist itself.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
virtual ~Persistable() noexcept=default
static std::shared_ptr< T > readFits(fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
Read an object from a FITS file in memory.
Lifetime-management for memory that goes into FITS memory files.
virtual bool isPersistable() const noexcept
Return true if this particular object can be persisted using afw::table::io.
virtual ~PersistableFactory() noexcept=default
io::CatalogVector CatalogVector
io::InputArchive InputArchive
virtual std::string getPersistenceName() const
Return the unique name used to persist this object and look up its factory.
ItemVariant const * other
A vector of catalogs used by Persistable.
virtual void write(OutputArchiveHandle &handle) const
Write the object to one or more catalogs.
virtual std::shared_ptr< Persistable > read(InputArchive const &archive, CatalogVector const &catalogs) const =0
Construct a new object from the given InputArchive and vector of catalogs.
A base class for factory classes used to reconstruct objects from records.
A multi-catalog archive object used to save table::io::Persistable objects.
A base class for image defects.
A base class for objects that can be persisted via afw::table::io Archive classes.
static std::shared_ptr< T > readFits(fits::Fits &fitsfile)
Read an object from an already open FITS object.
A CRTP facade class for subclasses of Persistable.
#define LSST_EXCEPTION_TYPE(t, b, c)
static std::shared_ptr< T > readFits(std::string const &fileName, int hdu=fits::DEFAULT_HDU)
Read an object from a regular FITS file.