LSSTApplications
17.0+11,17.0+34,17.0+56,17.0+57,17.0+59,17.0+7,17.0-1-g377950a+33,17.0.1-1-g114240f+2,17.0.1-1-g4d4fbc4+28,17.0.1-1-g55520dc+49,17.0.1-1-g5f4ed7e+52,17.0.1-1-g6dd7d69+17,17.0.1-1-g8de6c91+11,17.0.1-1-gb9095d2+7,17.0.1-1-ge9fec5e+5,17.0.1-1-gf4e0155+55,17.0.1-1-gfc65f5f+50,17.0.1-1-gfc6fb1f+20,17.0.1-10-g87f9f3f+1,17.0.1-11-ge9de802+16,17.0.1-16-ga14f7d5c+4,17.0.1-17-gc79d625+1,17.0.1-17-gdae4c4a+8,17.0.1-2-g26618f5+29,17.0.1-2-g54f2ebc+9,17.0.1-2-gf403422+1,17.0.1-20-g2ca2f74+6,17.0.1-23-gf3eadeb7+1,17.0.1-3-g7e86b59+39,17.0.1-3-gb5ca14a,17.0.1-3-gd08d533+40,17.0.1-30-g596af8797,17.0.1-4-g59d126d+4,17.0.1-4-gc69c472+5,17.0.1-6-g5afd9b9+4,17.0.1-7-g35889ee+1,17.0.1-7-gc7c8782+18,17.0.1-9-gc4bbfb2+3,w.2019.22
LSSTDataManagementBasePackage
|
An immutable collection of Detectors that can be accessed by name or ID. More...
#include <DetectorCollection.h>
Classes | |
class | Factory |
Public Types | |
using | NameMap = std::unordered_map< std::string, std::shared_ptr< Detector > > |
using | IdMap = std::map< int, std::shared_ptr< Detector > > |
using | List = std::vector< std::shared_ptr< Detector > > |
Public Member Functions | |
DetectorCollection (List const &detectorList) | |
DetectorCollection (DetectorCollection const &)=delete | |
DetectorCollection (DetectorCollection &&)=delete | |
DetectorCollection & | operator= (DetectorCollection const &)=delete |
DetectorCollection & | operator= (DetectorCollection &&)=delete |
virtual | ~DetectorCollection () noexcept |
NameMap const & | getNameMap () const noexcept |
Get an unordered map over detector names. More... | |
IdMap const & | getIdMap () const noexcept |
Get an unordered map over detector IDs. More... | |
lsst::geom::Box2D const & | getFpBBox () const noexcept |
Return a focal plane bounding box that encompasses all detectors. More... | |
std::size_t | size () const noexcept |
Get the number of detectors. More... | |
bool | empty () const noexcept |
Determine if the DetectorCollection contains any Detectors. More... | |
std::shared_ptr< Detector > | operator[] (std::string const &name) const |
Implement the [name] operator. More... | |
std::shared_ptr< Detector > | operator[] (int id) const |
Implement the [id] operator. More... | |
std::shared_ptr< Detector > | get (std::string const &name, std::shared_ptr< Detector > def=nullptr) const |
Support the "in" operator. More... | |
std::shared_ptr< Detector > | get (int id, std::shared_ptr< Detector > def=nullptr) const |
Support the "in" operator. More... | |
bool | isPersistable () const noexcept override |
DetectorCollections are always persistable. More... | |
void | writeFits (std::string const &fileName, std::string const &mode="w") const |
Write the object to a regular FITS file. More... | |
void | writeFits (fits::MemFileManager &manager, std::string const &mode="w") const |
Write the object to a FITS image in memory. More... | |
void | writeFits (fits::Fits &fitsfile) const |
Write the object to an already-open FITS object. More... | |
Static Public Member Functions | |
static std::shared_ptr< DetectorCollection > | readFits (fits::Fits &fitsfile) |
Read an object from an already open FITS object. More... | |
static std::shared_ptr< DetectorCollection > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
Read an object from a regular FITS file. More... | |
static std::shared_ptr< DetectorCollection > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
Read an object from a FITS file in memory. More... | |
static std::shared_ptr< DetectorCollection > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
Dynamically cast a shared_ptr. More... | |
Protected Types | |
typedef io::OutputArchiveHandle | OutputArchiveHandle |
Protected Member Functions | |
DetectorCollection (table::io::InputArchive const &archive, table::io::CatalogVector const &catalogs) | |
std::string | getPersistenceName () const override |
Return the unique name used to persist this object and look up its factory. More... | |
std::string | getPythonModule () const override |
Return the fully-qualified Python module that should be imported to guarantee that its factory is registered. More... | |
void | write (OutputArchiveHandle &handle) const override |
Write the object to one or more catalogs. More... | |
An immutable collection of Detectors that can be accessed by name or ID.
Definition at line 40 of file DetectorCollection.h.
Definition at line 44 of file DetectorCollection.h.
Definition at line 45 of file DetectorCollection.h.
using lsst::afw::cameraGeom::DetectorCollection::NameMap = std::unordered_map<std::string, std::shared_ptr<Detector> > |
Definition at line 43 of file DetectorCollection.h.
|
protectedinherited |
Definition at line 108 of file Persistable.h.
|
explicit |
Definition at line 32 of file DetectorCollection.cc.
|
delete |
|
delete |
|
virtualdefaultnoexcept |
|
protected |
Definition at line 149 of file DetectorCollection.cc.
|
staticinherited |
Dynamically cast a shared_ptr.
Dynamically cast a shared pointer and raise on failure.
You must provide an explicit template instantiation in the .cc file for each class that inherits from PersistableFacade. Designed to work around RTTI issues on macOS with hidden symbols;
lsst::pex::exceptions::LogicError | if the cast fails |
param[in] ptr The pointer to be cast.
lsst::pex::exceptions::TypeError | If the dynamic cast fails. |
Definition at line 18 of file Persistable.cc.
|
inlinenoexcept |
Determine if the DetectorCollection contains any Detectors.
Definition at line 77 of file DetectorCollection.h.
std::shared_ptr< Detector > lsst::afw::cameraGeom::DetectorCollection::get | ( | std::string const & | name, |
std::shared_ptr< Detector > | def = nullptr |
||
) | const |
Support the "in" operator.
[in] | name | detector name |
[in] | def | default detector to return. This defaults to the NULL pointer |
Definition at line 67 of file DetectorCollection.cc.
std::shared_ptr< Detector > lsst::afw::cameraGeom::DetectorCollection::get | ( | int | id, |
std::shared_ptr< Detector > | def = nullptr |
||
) | const |
Support the "in" operator.
[in] | id | detector id |
[in] | def | default detector to return. This defaults to the NULL pointer |
Definition at line 76 of file DetectorCollection.cc.
|
inlinenoexcept |
Return a focal plane bounding box that encompasses all detectors.
Definition at line 67 of file DetectorCollection.h.
|
inlinenoexcept |
Get an unordered map over detector IDs.
Definition at line 64 of file DetectorCollection.h.
|
inlinenoexcept |
Get an unordered map over detector names.
Definition at line 61 of file DetectorCollection.h.
|
overrideprotectedvirtual |
Return the unique name used to persist this object and look up its factory.
Must be less than ArchiveIndexSchema::MAX_NAME_LENGTH characters.
Reimplemented from lsst::afw::table::io::Persistable.
Definition at line 155 of file DetectorCollection.cc.
|
overrideprotectedvirtual |
Return the fully-qualified Python module that should be imported to guarantee that its factory is registered.
Must be less than ArchiveIndexSchema::MAX_MODULE_LENGTH characters.
Will be ignored if empty.
Reimplemented from lsst::afw::table::io::Persistable.
Definition at line 159 of file DetectorCollection.cc.
|
inlineoverridevirtualnoexcept |
DetectorCollections are always persistable.
Reimplemented from lsst::afw::table::io::Persistable.
Definition at line 114 of file DetectorCollection.h.
|
delete |
|
delete |
std::shared_ptr< Detector > lsst::afw::cameraGeom::DetectorCollection::operator[] | ( | std::string const & | name | ) | const |
Implement the [name] operator.
[in] | name | detector name |
Definition at line 51 of file DetectorCollection.cc.
std::shared_ptr< Detector > lsst::afw::cameraGeom::DetectorCollection::operator[] | ( | int | id | ) | const |
Implement the [id] operator.
[in] | id | detector name |
Definition at line 59 of file DetectorCollection.cc.
|
inlinestaticinherited |
Read an object from an already open FITS object.
[in] | fitsfile | FITS object to read from, already positioned at the desired HDU. |
Definition at line 183 of file Persistable.h.
|
inlinestaticinherited |
Read an object from a regular FITS file.
[in] | fileName | Name of the file to read. |
[in] | hdu | HDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty. |
Definition at line 194 of file Persistable.h.
|
inlinestaticinherited |
Read an object from a FITS file in memory.
[in] | manager | Manager for the memory to read from. |
[in] | hdu | HDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty. |
Definition at line 205 of file Persistable.h.
|
inlinenoexcept |
Get the number of detectors.
Renamed to __len__
in Python.
Definition at line 72 of file DetectorCollection.h.
|
overrideprotectedvirtual |
Write the object to one or more catalogs.
The handle object passed to this function provides an interface for adding new catalogs and adding nested objects to the same archive (while checking for duplicates). See OutputArchiveHandle for more information.
Reimplemented from lsst::afw::table::io::Persistable.
Definition at line 163 of file DetectorCollection.cc.
|
inherited |
Write the object to a regular FITS file.
[in] | fileName | Name of the file to write to. |
[in] | mode | If "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file. |
Definition at line 24 of file Persistable.cc.
|
inherited |
Write the object to a FITS image in memory.
[in] | manager | Name of the file to write to. |
[in] | mode | If "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file. |
Definition at line 29 of file Persistable.cc.
|
inherited |
Write the object to an already-open FITS object.
[in] | fitsfile | Open FITS object to write to. |
Definition at line 18 of file Persistable.cc.