CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Specific.h
Go to the documentation of this file.
1 #ifndef DDI_Specific_h
2 #define DDI_Specific_h
3 
8 
9 #include <iostream>
10 #include <vector>
11 #include <string>
12 #include <utility>
13 
14 class DDPartSelection;
15 class DDNodes;
16 
17 namespace DDI {
18 
19  class Specific
20  {
21  public:
22  Specific(const std::vector<std::string> & selections,
23  const DDsvalues_type & specs,
24  bool doRegex=true) ;
25 
26  Specific(const std::vector<DDPartSelection> & selections,
27  const DDsvalues_type & specs);
28 
29  ~Specific() { }
30 
31  const std::vector<DDPartSelection> & selection() const;
32 
33  void updateLogicalPart(std::vector<std::pair<DDLogicalPart, std::pair<const DDPartSelection*, const DDsvalues_type*> > >&) const;
34 
35  void tokenize();
36 
37  const DDsvalues_type & specifics() const { return specifics_; }
38 
40  std::pair<bool,DDExpandedView> node() const;
41 
42  void stream(std::ostream &) const;
43  protected:
44  void createPartSelections(const std::string & selString);
45  void addSelectionLevel(std::vector<DDLogicalPart> & lpv, int copyno, ddselection_type st,
46  std::vector<DDPartSelection> & selv);
48  std::vector<DDPartSelection> partSelections_;
49  bool valid_;
50  bool doRegex_;
51  };
52 }
53 
54 #endif // DDI_Specific_h
void addSelectionLevel(std::vector< DDLogicalPart > &lpv, int copyno, ddselection_type st, std::vector< DDPartSelection > &selv)
Definition: Specific.cc:54
const std::vector< DDPartSelection > & selection() const
Definition: Specific.cc:81
std::vector< DDPartSelection > partSelections_
Definition: Specific.h:48
const DDsvalues_type & specifics() const
Definition: Specific.h:37
Definition: DDNodes.h:7
bool valid_
Definition: Specific.h:49
DDsvalues_type specifics_
Definition: Specific.h:47
bool doRegex_
Definition: Specific.h:50
ddselection_type
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Definition: DDsvalues.h:19
Specific(const std::vector< std::string > &selections, const DDsvalues_type &specs, bool doRegex=true)
Definition: Specific.cc:8
void createPartSelections(const std::string &selString)
Definition: Specific.cc:26
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
std::pair< bool, DDExpandedView > node() const
gives the geometrical history of a fully specified PartSelector
Definition: Specific.cc:134
void updateLogicalPart(std::vector< std::pair< DDLogicalPart, std::pair< const DDPartSelection *, const DDsvalues_type * > > > &) const
Definition: Specific.cc:111
void stream(std::ostream &) const
Definition: Specific.cc:86