|
Mantid
|
A vector of DetectorCacheEntry, which holds the detector cache This is implemented as a vector rather than an ordered map to facilitate faster (unsorted) insertion some hotpaths requiring access by index. More...
Public Member Functions | |
| DetectorCache::iterator | find (detid_t id) |
| Find the element in the detector cache with the given ID. | |
| DetectorCache::const_iterator | find (detid_t id) const |
| Find the element in the detector cache with the given ID. | |
| bool | isFinalized () const |
| DetectorCache::iterator | lower_bound (detid_t id) |
| Perform a lower bound search on the detector cache, for the element with the given ID. | |
| DetectorCache::const_iterator | lower_bound (detid_t id) const |
| Perform a lower bound search on the detector cache, for the element with the given ID. | |
| detid_t | maxID () const |
| detid_t | minID () const |
| void | setFinalized (bool const flag=true) |
| void | setIncomplete () |
Public Attributes | |
| bool | m_isFinalized {true} |
| std::unordered_set< IDetector const * > | m_toRemove |
A vector of DetectorCacheEntry, which holds the detector cache This is implemented as a vector rather than an ordered map to facilitate faster (unsorted) insertion some hotpaths requiring access by index.
This vector otherwise should act like an ordered map.
Definition at line 287 of file Instrument.h.
| Instrument::DetectorCache::iterator Mantid::Geometry::Instrument::DetectorCache::find | ( | detid_t | id | ) |
Find the element in the detector cache with the given ID.
Note that this method is only valid for a finalized (sorted) instrument cache; otherwise the results are undefined. This method should complete in O(log N), where N is the number of detectors in the cache.
| id | the detector ID to search for |
| std::runtime_error | if the detector cache is not finalized |
Definition at line 515 of file Instrument.cpp.
References Mantid::Geometry::Instrument::isFinalized().
Referenced by Mantid::Geometry::Instrument::detectorIndex(), Mantid::Geometry::Instrument::getDetector(), Mantid::Geometry::Instrument::isMonitor(), Mantid::Geometry::Instrument::markAsMonitor(), and Mantid::Geometry::Instrument::removeDetector().
| Instrument::DetectorCache::const_iterator Mantid::Geometry::Instrument::DetectorCache::find | ( | detid_t | id | ) | const |
Find the element in the detector cache with the given ID.
Note that this method is only valid for a finalized (sorted) instrument cache; otherwise the results are undefined. This method should complete in O(log N), where N is the number of detectors in the cache.
| id | the detector ID to search for |
| std::runtime_error | if the detector cache is not finalized |
Definition at line 534 of file Instrument.cpp.
References Mantid::Geometry::Instrument::isFinalized().
|
inline |
Definition at line 289 of file Instrument.h.
Referenced by lower_bound().
| Instrument::DetectorCache::iterator Mantid::Geometry::Instrument::DetectorCache::lower_bound | ( | detid_t | id | ) |
Perform a lower bound search on the detector cache, for the element with the given ID.
Note that this method is only valid for a finalized (sorted) detector cache; otherwise the results are undefined. This method should complete in O(log N), where N is the number of detectors in the cache.
| id | the detector ID to search for |
| std::runtime_error | if the detector cache is not finalized |
Definition at line 483 of file Instrument.cpp.
References Mantid::Geometry::Instrument::DetectorCacheEntry::id(), and isFinalized().
Referenced by Mantid::Geometry::Instrument::markAsDetector().
| Instrument::DetectorCache::const_iterator Mantid::Geometry::Instrument::DetectorCache::lower_bound | ( | detid_t | id | ) | const |
Perform a lower bound search on the detector cache, for the element with the given ID.
Note that this method is only valid for a finalized (sorted) detector cache; otherwise the results are undefined. This method should complete in O(log N), where N is the number of detectors in the cache.
| id | the detector ID to search for |
| std::runtime_error | if the detector cache is not finalized |
Definition at line 500 of file Instrument.cpp.
References Mantid::Geometry::Instrument::DetectorCacheEntry::id(), and Mantid::Geometry::Instrument::isFinalized().
|
inline |
Definition at line 299 of file Instrument.h.
|
inline |
Definition at line 292 of file Instrument.h.
|
inline |
Definition at line 291 of file Instrument.h.
Referenced by Mantid::Geometry::Instrument::markAsDetectorFinalize(), and Mantid::Geometry::Instrument::removeDetectorFinalize().
|
inline |
Definition at line 290 of file Instrument.h.
Referenced by Mantid::Geometry::Instrument::markAsDetectorIncomplete(), Mantid::Geometry::Instrument::markAsMonitorIncomplete(), and Mantid::Geometry::Instrument::removeDetectorIncomplete().
| bool Mantid::Geometry::Instrument::DetectorCache::m_isFinalized {true} |
Definition at line 288 of file Instrument.h.
| std::unordered_set<IDetector const *> Mantid::Geometry::Instrument::DetectorCache::m_toRemove |
Definition at line 310 of file Instrument.h.
Referenced by Mantid::Geometry::Instrument::removeDetectorFinalize(), and Mantid::Geometry::Instrument::removeDetectorIncomplete().