#ifndef __JDETECTOR__JSTRINGROUTER__ #define __JDETECTOR__JSTRINGROUTER__ #include "JDetector/JDetector.hh" #include "JTools/JHashCollection.hh" /** * \file * Direct access to string in detector data structure. * \author mdejong */ namespace JDETECTOR {} namespace JPP { using namespace JDETECTOR; } namespace JDETECTOR { /** * Router for mapping of string identifier to index. */ struct JStringRouter : JTOOLS::JHashCollection { /** * Constructor. * * \param detector detector */ JStringRouter(const JDetector& detector) { for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) { this->insert(module->getString()); } } }; } #endif