test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDPartSelection.h
Go to the documentation of this file.
1 #ifndef DDPartSelection_h
2 #define DDPartSelection_h
3 
4 #include <vector>
5 #include <string>
6 #include <iostream>
8 
9 class DDLogicalPart;
10 
11 enum ddselection_type { ddunknown, // -> (should never appear!)
12  ddanynode, // -> //*
13  ddanychild, // -> /*
14  ddanylogp, // -> //NameOfLogicalPart
15  ddanyposp, // -> //NameOfLogicalPart[copyno]
16  ddchildlogp, // -> /NameOfLogicalPart
17  ddchildposp // -> /NameOfLogicalPart[copyno]
18  };
19 
21 {
22  DDPartSelRegExpLevel(const std::string & ns, const std::string & nm, int cpn, ddselection_type t, bool isRegex=false)
23  : ns_(ns), nm_(nm), copyno_(cpn), selectionType_(t), isRegex_(isRegex) { }
25  int copyno_;
27  bool isRegex_;
28 };
29 
31 {
34  int copyno_;
36 };
37 
38 class DDPartSelection : public std::vector<DDPartSelectionLevel>
39 {
40 public:
41  DDPartSelection() : std::vector<DDPartSelectionLevel>() { }
42 };
43 
44 std::ostream & operator<<(std::ostream &, const DDPartSelection &);
45 std::ostream & operator<<(std::ostream &, const std::vector<DDPartSelection> &);
46 
47 void DDTokenize2(const std::string & selectionString, std::vector<DDPartSelRegExpLevel> & result);
48 std::ostream & operator<<(std::ostream &, const DDPartSelection &);
49 
50 #endif
DDPartSelRegExpLevel(const std::string &ns, const std::string &nm, int cpn, ddselection_type t, bool isRegex=false)
ddselection_type selectionType_
DDPartSelectionLevel(const DDLogicalPart &, int, ddselection_type)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
ddselection_type
tuple result
Definition: query.py:137
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
ddselection_type selectionType_
void DDTokenize2(const std::string &selectionString, std::vector< DDPartSelRegExpLevel > &result)