Router for direct addressing of location data in detector data structure.
More...
#include <JLocationRouter.hh>
Router for direct addressing of location data in detector data structure.
Definition at line 28 of file JLocationRouter.hh.
◆ JReference_t
◆ const_iterator
◆ JLocationRouter()
JDETECTOR::JLocationRouter::JLocationRouter |
( |
const JDetector & | detector | ) |
|
|
inline |
Constructor.
- Parameters
-
Definition at line 44 of file JLocationRouter.hh.
44 :
46 {
47 for (
const_iterator module = detector.begin(); module != detector.end(); ++module) {
48 router[module->getString()][module->getFloor()] = JModuleAddress(std::distance(detector.begin(), module));
49 }
50 }
JTOOLS::JHashMap< int, JTOOLS::JHashMap< int, JModuleAddress > > router
JReference< const JDetector > JReference_t
JDetector::const_iterator const_iterator
◆ getLocationRouter()
const JLocationRouter & JDETECTOR::JLocationRouter::getLocationRouter |
( |
| ) |
const |
|
inline |
Get location router.
- Returns
- location router
Definition at line 58 of file JLocationRouter.hh.
59 {
61 }
JLocationRouter(const JDetector &detector)
Constructor.
◆ getAddress()
Get address of location.
- Parameters
-
- Returns
- address
Definition at line 70 of file JLocationRouter.hh.
71 {
72 return router[location.getString()][location.getFloor()];
73 }
◆ getModule()
const JModule & JDETECTOR::JLocationRouter::getModule |
( |
const JLocation & | location | ) |
const |
|
inline |
Get module parameters.
- Parameters
-
- Returns
- module parameters
Definition at line 82 of file JLocationRouter.hh.
83 {
85 }
const JModuleAddress & getAddress(const JLocation &location) const
Get address of location.
const JClass_t & getReference() const
Get reference to object.
◆ hasLocation()
bool JDETECTOR::JLocationRouter::hasLocation |
( |
const JLocation & | location | ) |
const |
|
inline |
Has module.
- Parameters
-
- Returns
- true if location present; else false
Definition at line 94 of file JLocationRouter.hh.
95 {
96 return router.has(location.getString()) &&
router[location.getString()].has(location.getFloor());
97 }
◆ getIndex()
const int JDETECTOR::JLocationRouter::getIndex |
( |
const JLocation & | location | ) |
const |
|
inline |
Get index of location.
- Parameters
-
- Returns
- index
Definition at line 106 of file JLocationRouter.hh.
107 {
109 }
int first
index of module in detector data structure
◆ getReference() [1/2]
template<class JClass_t >
Get reference to object.
- Returns
- reference to object
Definition at line 38 of file JReference.hh.
◆ getReference() [2/2]
template<class JClass_t >
Get reference to object.
- Returns
- reference to object
Definition at line 49 of file JReference.hh.
◆ is_valid()
template<class JClass_t >
Check validity of reference.
- Returns
- true
Definition at line 60 of file JReference.hh.
61 {
62 return true;
63 }
◆ operator->() [1/2]
template<class JClass_t >
Smart pointer.
- Returns
- pointer to object
Definition at line 71 of file JReference.hh.
◆ operator->() [2/2]
template<class JClass_t >
Smart pointer.
- Returns
- pointer to object
Definition at line 82 of file JReference.hh.
◆ operator*() [1/2]
template<class JClass_t >
Dereference operator.
- Returns
- reference to object
Definition at line 93 of file JReference.hh.
◆ operator*() [2/2]
template<class JClass_t >
Dereference operator.
- Returns
- reference to object
Definition at line 104 of file JReference.hh.
◆ router
◆ __object
template<class JClass_t >
The documentation for this class was generated from the following file: