File indexing completed on 2024-04-06 12:05:31
0001 #ifndef DETECTOR_DESCRIPTION_PARSER_DDL_ELEMENT_REGISTRY_H
0002 #define DETECTOR_DESCRIPTION_PARSER_DDL_ELEMENT_REGISTRY_H
0003
0004 #include "DetectorDescription/Core/interface/ClhepEvaluator.h"
0005
0006 #include <CLHEP/Evaluator/Evaluator.h>
0007 #include <string>
0008 #include <map>
0009 #include <memory>
0010
0011 class DDXMLElement;
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 class DDLElementRegistry {
0024 public:
0025 typedef std::map<std::string, std::shared_ptr<DDXMLElement> > RegistryMap;
0026
0027 DDLElementRegistry();
0028
0029 ~DDLElementRegistry();
0030
0031
0032 void registerElement(const std::string& name, DDXMLElement*);
0033
0034
0035
0036
0037
0038
0039
0040 std::shared_ptr<DDXMLElement> getElement(const std::string& name);
0041
0042 ClhepEvaluator& evaluator() { return evaluator_; }
0043
0044 private:
0045 RegistryMap registry_;
0046 ClhepEvaluator evaluator_;
0047 };
0048
0049 #endif