1#ifndef __JDETECTOR__JMODULEROUTER__
2#define __JDETECTOR__JMODULEROUTER__
54 for (
const_iterator module = detector.begin(); module != detector.end(); ++module) {
55 router.put(module->getID(), JModuleAddress(std::distance(detector.begin(), module)));
79 return router.get(
id.getID());
103 return router.has(
id.getID());
127 return hasModule(
id.getID()) &&
id.getPMTAddress() >= 0 &&
id.getPMTAddress() < (int)
getModule(
id.getID()).size();
Data structure for detector geometry and calibration.
Address of module in detector data structure.
int first
index of module in detector data structure
Router for direct addressing of module data in detector data structure.
JDetector::const_iterator const_iterator
JReference< const JDetector > JReference_t
JModuleRouter(const JDetector &detector)
Constructor.
bool hasModule(const JModuleIdentifier &id) const
Has module.
const JPMT & getPMT(const JPMTIdentifier &id) const
Get PMT parameters.
const JModule & getModule(const JModuleIdentifier &id) const
Get module parameters.
const int getIndex(const JModuleIdentifier &id) const
Get index of module.
bool hasPMT(const JPMTIdentifier &id) const
Has PMT.
const JModuleAddress & getAddress(const JModuleIdentifier &id) const
Get address of module.
JTOOLS::JRouter< JModuleAddress > router
const JModuleRouter & getModuleRouter() const
Get module router.
JUTMPosition getUTMPosition(const JModuleIdentifier &id) const
Get UTM position of given module identifier.
Data structure for a composite optical module.
const JPMT & getPMT(const int index) const
Get PMT.
Data structure for PMT geometry, calibration and status.
Auxiliary base class for object identification.
The template JReference class can be used to reference an object.
const JClass_t & getReference() const
Get reference to object.
Data structure for UTM position.
file Auxiliary data structures and methods for detector calibration.
JPosition3D getPosition(const JModule &first, const JModule &second)
Get position to go from first to second module.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).