1#ifndef __JDETECTOR__JPMTROUTER__
2#define __JDETECTOR__JPMTROUTER__
55 for (
const_iterator module = detector.begin(); module != detector.end(); ++module) {
56 for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
57 router.put(pmt->getID(), JPMTAddress(JModuleAddress(std::distance(detector.begin(), module)), std::distance(module->begin(), pmt)));
82 return router.get(
id.getID());
94 return getReference().getPMT(address);
106 return getReference().getPMT(this->getAddress(
id));
118 return router.has(
id.getID());
142 return getIdentifier(this->getAddress(
id));
154 return getReference().getModule(address);
178 return getParentModule(
id).getID();
202 return getPMTChannel(getAddress(
id));
Data structure for detector geometry and calibration.
Data structure to uniquely identify PMT readout channel.
Address of module in detector data structure.
Data structure for a composite optical module.
Address of PMT in detector data structure.
int second
index of PMT in module data structure.
Auxiliary class to uniquely identify PMT readout channel.
Router for direct addressing of PMT data in detector data structure.
JDetector::const_iterator const_iterator
JPMTChannel getPMTChannel(const JObjectID &id) const
Get PMT channel.
JUTMPosition getUTMPosition(const JObjectID &id) const
Get UTM position of given PMT identifier.
const JPMT & getPMT(const JObjectID &id) const
Get PMT.
JPMTChannel getPMTChannel(const JPMTAddress &address) const
Get PMT channel.
bool hasPMT(const JObjectID &id) const
Has PMT.
const JPMTRouter & getPMTRouter() const
Get PMT router.
JTOOLS::JRouter< JPMTAddress > router
JReference< const JDetector > JReference_t
JPMTIdentifier getIdentifier(const JObjectID &id) const
Get identifier of PMT.
int getParentModuleID(const JObjectID &id) const
Get parent module identifier.
JPMTRouter(const JDetector &detector)
Constructor.
const JPMT & getPMT(const JPMTAddress &address) const
Get PMT.
const JModule & getModule(const JModuleAddress &address) const
Get module.
JPMTIdentifier getIdentifier(const JPMTAddress &address) const
Get identifier of PMT.
const JModule & getParentModule(const JObjectID &id) const
Get parent module.
const JPMTAddress & getAddress(const JObjectID &id) const
Get address of PMT.
Data structure for PMT geometry, calibration and status.
Auxiliary class for object identification.
The template JReference class can be used to reference an object.
Data structure for UTM position.
file Auxiliary data structures and methods for detector calibration.
const JModule & getModule(const JType< JDetector_t > type, const int id, const JLocation &location=JLocation())
Get module according given detector type.
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).