41 "afw::table-based persistence is not supported for this object.");
47 return _readFits(fitsfile);
53 return _readFits(fitsfile);
58 return archive.
get(1);
67 RegistryMap &getRegistry() {
68 static RegistryMap instance;
77 RegistryMap::const_iterator i = getRegistry().find(name);
78 if (i == getRegistry().
end()) {
79 if (!module.
empty()) {
85 "PersistableFactory with name '%s' not found, and import of module " 86 "'%s' failed (possibly because Python calls were not available from C++).") %
90 i = getRegistry().find(name);
91 if (i == getRegistry().
end()) {
95 "PersistableFactory with name '%s' not found even after successful import " 96 "of module '%s'. Please report this as a bug in the persistence " 97 "implementation for this object.") %
105 "PersistableFactory with name '%s' not found, and no Python module to import " 106 "was provided. Please report this as a bug in the persistence implementation " 107 "for this object.") %
PersistableFactory(std::string const &name)
Constructor for the factory.
An object passed to Persistable::write to allow it to persist itself.
A base class for factory classes used to reconstruct objects from records.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
static PersistableFactory const & lookup(std::string const &name, std::string const &module="")
Return the factory that has been registered with the given name.
virtual void write(OutputArchiveHandle &handle) const
Write the object to one or more catalogs.
A multi-catalog archive object used to save table::io::Persistable objects.
Reports attempts to access elements using an invalid key.
void writeFits(std::string const &fileName, std::string const &mode="w") const
Write the object to a regular FITS file.
void writeFits(fits::Fits &fitsfile) const
Write the archive to an already-open FITS object.
A base class for image defects.
virtual std::string getPythonModule() const
Return the fully-qualified Python module that should be imported to guarantee that its factory is reg...
Lifetime-management for memory that goes into FITS memory files.
Mechanism for safely importing Python modules from C++; should not be included except by its own impl...
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
Reports errors in the logical structure of the program.
void setHdu(int hdu, bool relative=false)
Set the current HDU.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
static bool import(std::string const &name)
Import the given Python module, and return true if successful.
virtual bool isPersistable() const noexcept
Return true if this particular object can be persisted using afw::table::io.
virtual std::string getPersistenceName() const
Return the unique name used to persist this object and look up its factory.
int put(std::shared_ptr< Persistable const > obj, bool permissive=false)
Save an object to the archive and return a unique ID that can be used to retrieve it from an InputArc...