2 #ifndef AFW_TABLE_IO_Persistable_h_INCLUDED
3 #define AFW_TABLE_IO_Persistable_h_INCLUDED
5 #include "boost/noncopyable.hpp"
10 namespace lsst {
namespace afw {
19 namespace table {
namespace io {
23 class OutputArchiveHandle;
30 lsst::afw::table::io::PersistenceError)
38 lsst::afw::table::io::MalformedArchiveError)
47 #define LSST_ARCHIVE_ASSERT(EXPR) \
48 if (!(EXPR)) throw LSST_EXCEPT( \
49 lsst::afw::table::io::MalformedArchiveError, \
50 "Archive assertion failed: " # EXPR)
84 void writeFits(std::string
const & fileName, std::string
const & mode=
"w")
const;
95 #ifndef SWIG // only expose the higher-level interfaces to Python
181 template <typename T>
192 static PTR(T) readFits(fits::Fits & fitsfile) {
205 static PTR(T) readFits(std::
string const & fileName,
int hdu=0) {
216 static PTR(T) readFits(fits::MemFileManager & manager,
int hdu=0) {
269 #endif // !AFW_TABLE_IO_Persistable_h_INCLUDED
LSST_EXCEPTION_TYPE(PersistenceError, lsst::pex::exceptions::IoError, lsst::afw::table::io::PersistenceError) LSST_EXCEPTION_TYPE(MalformedArchiveError
An exception thrown when problems occur during persistence.
io::CatalogVector CatalogVector
table::Key< std::string > name
An object passed to Persistable::write to allow it to persist itself.
void writeFits(std::string const &fileName, std::string const &mode="w") const
Write the object to a regular FITS file.
Include files required for standard LSST Exception handling.
A base class for factory classes used to reconstruct objects from records.
virtual std::string getPersistenceName() const
Return the unique name used to persist this object and look up its factory.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
A base class for objects that can be persisted via afw::table::io Archive classes.
A multi-catalog archive object used to save table::io::Persistable objects.
Persistable(Persistable const &other)
virtual bool isPersistable() const
Return true if this particular object can be persisted using afw::table::io.
void operator=(Persistable const &other)
Lifetime-management for memory that goes into FITS memory files.
virtual std::string getPythonModule() const
Return the fully-qualified Python module that should be imported to guarantee that its factory is reg...
static boost::shared_ptr< Persistable > _readFits(std::string const &fileName, int hdu=0)
A vector of catalogs used by Persistable.
io::OutputArchiveHandle OutputArchiveHandle
A CRTP facade class for subclasses of Persistable.
virtual void write(OutputArchiveHandle &handle) const
Write the object to one or more catalogs.
io::InputArchive InputArchive