Jpp  18.0.0-rc.4
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JStringRouter.hh
Go to the documentation of this file.
1 #ifndef __JDETECTOR__JSTRINGROUTER__
2 #define __JDETECTOR__JSTRINGROUTER__
3 
4 #include "JDetector/JDetector.hh"
6 
7 
8 /**
9  * \file
10  * Direct access to string in detector data structure.
11  * \author mdejong
12  */
13 namespace JDETECTOR {}
14 namespace JPP { using namespace JDETECTOR; }
15 
16 namespace JDETECTOR {
17 
18  /**
19  * Router for mapping of string identifier to index.
20  */
21  struct JStringRouter :
23  {
24  /**
25  * Constructor.
26  *
27  * \param detector detector
28  */
30  {
31  for (JDetector::const_iterator module = detector.begin(); module != detector.end(); ++module) {
32  this->insert(module->getString());
33  }
34  }
35  };
36 }
37 
38 #endif
Detector data structure.
Definition: JDetector.hh:89
General purpose class for a hash collection of unique elements.
Data structure for detector geometry and calibration.
virtual bool insert(const value_type &element)
Insert element.
General purpose class for hash collection of unique elements.
JStringRouter(const JDetector &detector)
Constructor.
Router for mapping of string identifier to index.
do set_variable DETECTOR_TXT $WORKDIR detector