22#ifndef LSST_AFW_CAMERAGEOM_DETECTORCOLLECTION_H
23#define LSST_AFW_CAMERAGEOM_DETECTORCOLLECTION_H
72 bool empty() const noexcept {
return _idDict.empty(); }
183 void write(OutputArchiveHandle& handle)
const override;
std::unordered_map< std::string, std::shared_ptr< Detector::InCameraBuilder > > NameMap
void remove(std::string const &name)
std::size_t size() const noexcept
Get the number of detectors.
std::vector< std::shared_ptr< Detector::InCameraBuilder > > List
std::shared_ptr< T > operator[](int id) const
Implement the [id] operator.
DetectorCollectionBase() noexcept=default
std::shared_ptr< T > operator[](std::string const &name) const
Implement the [name] operator.
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.
virtual ~DetectorCollectionBase() noexcept=0
DetectorCollectionBase(List const &detectorList)
IdMap const & getIdMap() const noexcept
Get a map keyed and ordered by ID.
NameMap const & getNameMap() const noexcept
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.
void add(std::shared_ptr< Detector::InCameraBuilder > detector)
std::map< int, std::shared_ptr< Detector::InCameraBuilder > > IdMap
bool empty() const noexcept
Determine if the collection contains any detectors.
An immutable collection of Detectors that can be accessed by name or ID.
DetectorCollection(DetectorCollection const &)=delete
DetectorCollection(List const &list)
lsst::geom::Box2D const & getFpBBox() const noexcept
Return a focal plane bounding box that encompasses all detectors.
virtual ~DetectorCollection() noexcept
bool isPersistable() const noexcept override
DetectorCollections are always persistable.
DetectorCollection & operator=(DetectorCollection &&)=delete
DetectorCollection(DetectorCollection &&)=delete
DetectorCollection & operator=(DetectorCollection const &)=delete
A representation of a detector in a mosaic camera.
A vector of catalogs used by Persistable.
Persistable() noexcept=default
friend class PersistableFacade