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);
94 return getReference().getPMT(address);
106 return getReference().getPMT(this->getAddress(
id));
118 return router.has(
id);
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.
bool hasPMT(const int id) const
Has PMT.
JDetector::const_iterator const_iterator
JPMTChannel getPMTChannel(const JPMTAddress &address) const
Get PMT channel.
const JModule & getParentModule(const int id) const
Get parent module.
const JPMTRouter & getPMTRouter() const
Get PMT router.
JTOOLS::JRouter< JPMTAddress > router
int getParentModuleID(const int id) const
Get parent module identifier.
JUTMPosition getUTMPosition(const int id) const
Get UTM position of given PMT identifier.
const JPMTAddress & getAddress(const int id) const
Get address of PMT.
JReference< const JDetector > JReference_t
JPMTIdentifier getIdentifier(const int id) const
Get identifier of PMT.
JPMTChannel getPMTChannel(const int id) const
Get PMT channel.
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 JPMT & getPMT(const int id) 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.
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).