File indexing completed on 2024-04-06 12:05:32
0001 #ifndef DDL_Map_H
0002 #define DDL_Map_H
0003
0004 #include <map>
0005 #include <string>
0006 #include <vector>
0007
0008 #include "DetectorDescription/Core/interface/DDReadMapType.h"
0009 #include "DetectorDescription/Core/interface/DDMap.h"
0010 #include "DetectorDescription/Parser/src/DDXMLElement.h"
0011
0012 class DDCompactView;
0013 class DDLElementRegistry;
0014
0015 class MapPair;
0016 class MapMakeName;
0017 class MapMakeDouble;
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 class DDLMap final : public DDXMLElement {
0034 friend class MapPair;
0035 friend class MapMakeName;
0036 friend class MapMakeDouble;
0037
0038 public:
0039 DDLMap(DDLElementRegistry* myreg);
0040
0041 void preProcessElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) override;
0042 void processElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) override;
0043
0044 ReadMapType<std::map<std::string, double> >& getMapOfMaps(void);
0045
0046 private:
0047 dd_map_type pMap;
0048 ReadMapType<std::map<std::string, double> > pMapMap;
0049 double pDouble;
0050 std::string pName;
0051 std::string pNameSpace;
0052
0053 void errorOut(const char* str);
0054
0055 void do_pair(char const* str, char const* end);
0056
0057 void do_makeName(char const* str, char const* end);
0058
0059 void do_makeDouble(char const* str, char const* end);
0060 };
0061
0062 #endif