|
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 293 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 543 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 562 of file Instrument.cpp.
References Mantid::Geometry::Instrument::isFinalized().
|
inline |
Definition at line 295 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 511 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 528 of file Instrument.cpp.
References Mantid::Geometry::Instrument::DetectorCacheEntry::id(), and Mantid::Geometry::Instrument::isFinalized().
|
inline |
Definition at line 305 of file Instrument.h.
|
inline |
Definition at line 298 of file Instrument.h.
|
inline |
Definition at line 297 of file Instrument.h.
Referenced by Mantid::Geometry::Instrument::markAsDetectorFinalize(), and Mantid::Geometry::Instrument::removeDetectorFinalize().
|
inline |
Definition at line 296 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 294 of file Instrument.h.
| std::unordered_set<IDetector const *> Mantid::Geometry::Instrument::DetectorCache::m_toRemove |
Definition at line 316 of file Instrument.h.
Referenced by Mantid::Geometry::Instrument::removeDetectorFinalize(), and Mantid::Geometry::Instrument::removeDetectorIncomplete().