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 {
31 
32  public:
33 
34  DDLVector( DDLElementRegistry* myreg );
35 
36  void preProcessElement (const std::string& name, const std::string& nmspace, DDCompactView& cpv ) override;
37  void processElement (const std::string& name, const std::string& nmspace, DDCompactView& cpv ) override;
38  void clearall();
39 
42 
43  private:
44  std::vector<double> pVector;
45  std::vector<std::string> pStrVector;
49  void errorOut(const char* str) const;
50  void do_makeDouble(char const* str, char const* end);
51  void do_makeString(char const* str, char const* end);
52  bool parse_numbers(char const* str);
53  bool parse_strings(char const* str);
54 };
55 
56 #endif
std::vector< double > pVector
Definition: DDLVector.h:44
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Called by loadAttributes AFTER attributes are loaded.
Definition: DDLVector.cc:75
DDLVector handles Rotation and ReflectionRotation elements.
Definition: DDLVector.h:29
DDLVector(DDLElementRegistry *myreg)
Definition: DDLVector.cc:70
ReadMapType< std::vector< std::string > > & getMapOfStrVectors()
Definition: DDLVector.cc:155
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:83
void do_makeDouble(char const *str, char const *end)
Definition: DDLVector.cc:161
ReadMapType< std::vector< double > > & getMapOfVectors()
Definition: DDLVector.cc:149
void do_makeString(char const *str, char const *end)
Definition: DDLVector.cc:169
virtual std::vector< DDXMLAttribute >::const_iterator end(void)
bool parse_strings(char const *str)
Definition: DDLVector.cc:62
void errorOut(const char *str) const
Definition: DDLVector.cc:176
std::string pNameSpace
Definition: DDLVector.h:48
a std::map<std::string,YourType> that offers a const operator[key]; if key is not stored in the std::...
Definition: DDReadMapType.h:13
void clearall()
Definition: DDLVector.cc:185
bool parse_numbers(char const *str)
Definition: DDLVector.cc:53
std::vector< std::string > pStrVector
Definition: DDLVector.h:45
ReadMapType< std::vector< double > > pVecMap
Definition: DDLVector.h:46
This is a base class for processing XML elements in the DDD.
Definition: DDXMLElement.h:48
ReadMapType< std::vector< std::string > > pStrVecMap
Definition: DDLVector.h:47
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:83
#define str(s)