File indexing completed on 2024-04-06 12:05:33
0001 #ifndef DDL_Vector_H
0002 #define DDL_Vector_H
0003
0004 #include <map>
0005 #include <string>
0006 #include <vector>
0007
0008 #include "DDXMLElement.h"
0009 #include "DetectorDescription/Core/interface/DDReadMapType.h"
0010 #include "DetectorDescription/Core/interface/DDTypes.h"
0011 #include "DetectorDescription/Core/interface/DDVector.h"
0012
0013 class DDCompactView;
0014 class DDLElementRegistry;
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 class DDLVector final : public DDXMLElement {
0030 public:
0031 DDLVector(DDLElementRegistry* myreg);
0032
0033 void preProcessElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) override;
0034 void processElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) override;
0035 void clearall();
0036
0037 ReadMapType<std::vector<double> >& getMapOfVectors();
0038 ReadMapType<std::vector<std::string> >& getMapOfStrVectors();
0039
0040 private:
0041 std::vector<double> pVector;
0042 std::vector<std::string> pStrVector;
0043 ReadMapType<std::vector<double> > pVecMap;
0044 ReadMapType<std::vector<std::string> > pStrVecMap;
0045 std::string pNameSpace;
0046 void errorOut(const char* str) const;
0047 void do_makeDouble(char const* str, char const* end);
0048 void do_makeString(char const* str, char const* end);
0049 bool parse_numbers(char const* str);
0050 bool parse_strings(char const* str);
0051 };
0052
0053 #endif