|
LSST Applications g00274db5b6+edbf708997,g00d0e8bbd7+edbf708997,g199a45376c+5137f08352,g1fd858c14a+1d4b6db739,g262e1987ae+f4d9505c4f,g29ae962dfc+7156fb1a53,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3e17d7035e+5b3adc59f5,g3fd5ace14f+852fa6fbcb,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+9f17e571f4,g67b6fd64d1+6dc8069a4c,g74acd417e5+ae494d68d9,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+536efcc10a,g7cc15d900a+d121454f8d,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d7436a09f+28c28d8d6d,g8ea07a8fe4+db21c37724,g92c671f44c+9f17e571f4,g98df359435+b2e6376b13,g99af87f6a8+b0f4ad7b8d,gac66b60396+966efe6077,gb88ae4c679+7dec8f19df,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gc24b5d6ed1+9f17e571f4,gca7fc764a6+6dc8069a4c,gcc769fe2a4+97d0256649,gd7ef33dd92+6dc8069a4c,gdab6d2f7ff+ae494d68d9,gdbb4c4dda9+9f17e571f4,ge410e46f29+6dc8069a4c,geaed405ab2+e194be0d2b,w.2025.47
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.