CMS 3D CMS Logo

DDLVector.h
Go to the documentation of this file.
1 #ifndef DDL_Vector_H
2 #define DDL_Vector_H
3 
4 #include <map>
5 #include <string>
6 #include <vector>
7 
8 #include "DDXMLElement.h"
12 
13 class DDCompactView;
14 class DDLElementRegistry;
15 
17 
29 class DDLVector final : public DDXMLElement {
30 public:
32 
33  void preProcessElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) override;
34  void processElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) override;
35  void clearall();
36 
39 
40 private:
41  std::vector<double> pVector;
42  std::vector<std::string> pStrVector;
46  void errorOut(const char* str) const;
47  void do_makeDouble(char const* str, char const* end);
48  void do_makeString(char const* str, char const* end);
49  bool parse_numbers(char const* str);
50  bool parse_strings(char const* str);
51 };
52 
53 #endif
ReadMapType< std::vector< std::string > > pStrVecMap
Definition: DDLVector.h:44
std::vector< double > pVector
Definition: DDLVector.h:41
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Called by loadAttributes AFTER attributes are loaded.
Definition: DDLVector.cc:64
DDLVector handles Rotation and ReflectionRotation elements.
Definition: DDLVector.h:29
DDLVector(DDLElementRegistry *myreg)
Definition: DDLVector.cc:62
ReadMapType< std::vector< std::string > > & getMapOfStrVectors()
Definition: DDLVector.cc:124
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
void do_makeDouble(char const *str, char const *end)
Definition: DDLVector.cc:126
ReadMapType< std::vector< double > > & getMapOfVectors()
Definition: DDLVector.cc:122
void do_makeString(char const *str, char const *end)
Definition: DDLVector.cc:132
virtual std::vector< DDXMLAttribute >::const_iterator end(void)
bool parse_strings(char const *str)
Definition: DDLVector.cc:57
std::string pNameSpace
Definition: DDLVector.h:45
a std::map<std::string,YourType> that offers a const operator[key]; if key is not stored in the std::...
Definition: DDReadMapType.h:14
ReadMapType< std::vector< double > > pVecMap
Definition: DDLVector.h:43
void clearall()
Definition: DDLVector.cc:144
bool parse_numbers(char const *str)
Definition: DDLVector.cc:52
std::vector< std::string > pStrVector
Definition: DDLVector.h:42
void errorOut(const char *str) const
Definition: DDLVector.cc:137
This is a base class for processing XML elements in the DDD.
Definition: DDXMLElement.h:48
The main class for processing parsed elements.
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
Definition: DDLVector.cc:70
#define str(s)