LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
|
An abstract base class for collections of Detectors and specific subclasses thereof. More...
#include <DetectorCollection.h>
Public Types | |
using | NameMap = std::unordered_map<std::string, std::shared_ptr<T>> |
using | IdMap = std::map<int, std::shared_ptr<T>> |
using | List = std::vector<std::shared_ptr<T>> |
Public Member Functions | |
virtual | ~DetectorCollectionBase () noexcept=0 |
NameMap const & | getNameMap () const noexcept |
Get a map keyed and ordered by name. | |
IdMap const & | getIdMap () const noexcept |
Get a map keyed and ordered by ID. | |
std::size_t | size () const noexcept |
Get the number of detectors. | |
bool | empty () const noexcept |
Determine if the collection contains any detectors. | |
std::shared_ptr< T > | operator[] (std::string const &name) const |
Implement the [name] operator. | |
std::shared_ptr< T > | operator[] (int id) const |
Implement the [id] operator. | |
std::shared_ptr< T > | get (std::string const &name, std::shared_ptr< T > def=nullptr) const |
Retrieve a detector by name, or fall back to a default. | |
std::shared_ptr< T > | get (int id, std::shared_ptr< T > def=nullptr) const |
Retrieve a detector by ID, or fall back to a default. | |
Protected Member Functions | |
DetectorCollectionBase (List const &detectorList) | |
DetectorCollectionBase () noexcept=default | |
DetectorCollectionBase (DetectorCollectionBase const &)=default | |
DetectorCollectionBase (DetectorCollectionBase &&)=default | |
DetectorCollectionBase & | operator= (DetectorCollectionBase const &)=default |
DetectorCollectionBase & | operator= (DetectorCollectionBase &&)=default |
void | add (std::shared_ptr< T > detector) |
Add a detector to the collection. | |
void | remove (std::string const &name) |
void | remove (int id) |
An abstract base class for collections of Detectors and specific subclasses thereof.
T | Element type; either Detector or a subclass thereof. |
This class provides the common interface and implementation for DetectorCollection
(which holds true Detector
instances) and Camera::Builder
(which holds Detector::InCameraBuilder
instances). It is not intended to define an interface independent of those classes.
Definition at line 49 of file DetectorCollection.h.
using lsst::afw::cameraGeom::DetectorCollectionBase< T >::IdMap = std::map<int, std::shared_ptr<T>> |
Definition at line 53 of file DetectorCollection.h.
using lsst::afw::cameraGeom::DetectorCollectionBase< T >::List = std::vector<std::shared_ptr<T>> |
Definition at line 54 of file DetectorCollection.h.
using lsst::afw::cameraGeom::DetectorCollectionBase< T >::NameMap = std::unordered_map<std::string, std::shared_ptr<T>> |
Definition at line 52 of file DetectorCollection.h.
|
pure virtualdefaultnoexcept |
|
explicitprotected |
Definition at line 74 of file DetectorCollection.cc.
|
protecteddefaultnoexcept |
|
protecteddefault |
|
protecteddefault |
|
protected |
Add a detector to the collection.
[in] | detector | New detector to add to the collection. |
pex::exceptions::RuntimeError | Thrown if the ID and/or name conflict with those of detectors already in the collection. |
Definition at line 89 of file DetectorCollection.cc.
|
inlinenoexcept |
Determine if the collection contains any detectors.
Definition at line 72 of file DetectorCollection.h.
std::shared_ptr< T > lsst::afw::cameraGeom::DetectorCollectionBase< T >::get | ( | int | id, |
std::shared_ptr< T > | def = nullptr ) const |
Retrieve a detector by ID, or fall back to a default.
[in] | id | detector id |
[in] | def | default detector to return. This defaults to nullptr . |
Definition at line 65 of file DetectorCollection.cc.
std::shared_ptr< T > lsst::afw::cameraGeom::DetectorCollectionBase< T >::get | ( | std::string const & | name, |
std::shared_ptr< T > | def = nullptr ) const |
Retrieve a detector by name, or fall back to a default.
[in] | name | detector name |
[in] | def | default detector to return. This defaults to nullptr . |
Definition at line 56 of file DetectorCollection.cc.
|
inlinenoexcept |
Get a map keyed and ordered by ID.
Definition at line 62 of file DetectorCollection.h.
|
inlinenoexcept |
Get a map keyed and ordered by name.
Definition at line 59 of file DetectorCollection.h.
|
protecteddefault |
|
protecteddefault |
std::shared_ptr< T > lsst::afw::cameraGeom::DetectorCollectionBase< T >::operator[] | ( | int | id | ) | const |
Implement the [id] operator.
[in] | id | detector name |
Definition at line 46 of file DetectorCollection.cc.
std::shared_ptr< T > lsst::afw::cameraGeom::DetectorCollectionBase< T >::operator[] | ( | std::string const & | name | ) | const |
Implement the [name] operator.
[in] | name | detector name |
Definition at line 36 of file DetectorCollection.cc.
|
protected |
Definition at line 144 of file DetectorCollection.cc.
|
protected |
Definition at line 129 of file DetectorCollection.cc.
|
inlinenoexcept |
Get the number of detectors.
Renamed to __len__
in Python.
Definition at line 67 of file DetectorCollection.h.