CMS 3D CMS Logo

Specific.h
Go to the documentation of this file.
1 #ifndef DDI_Specific_h
2 #define DDI_Specific_h
3 
4 #include <iostream>
5 #include <string>
6 #include <utility>
7 #include <vector>
8 
13 
14 class DDExpandedView;
15 class DDLogicalPart;
16 class DDNodes;
17 class DDPartSelection;
18 
19 namespace DDI {
20 
21  class Specific
22  {
23  public:
24  Specific(const std::vector<std::string> & selections,
25  const DDsvalues_type & specs,
26  bool doRegex=true) ;
27 
28  Specific(const std::vector<DDPartSelection> & selections,
29  const DDsvalues_type & specs);
30 
31  ~Specific() { }
32 
33  const std::vector<DDPartSelection> & selection() const;
34 
35  void updateLogicalPart(std::vector<std::pair<DDLogicalPart, std::pair<const DDPartSelection*, const DDsvalues_type*> > >&) const;
36 
37  void tokenize();
38 
39  const DDsvalues_type & specifics() const { return specifics_; }
40 
42  std::pair<bool,DDExpandedView> node() const;
43 
44  void stream(std::ostream &) const;
45  protected:
46  void createPartSelections(const std::string & selString);
47  void addSelectionLevel(std::vector<DDLogicalPart> & lpv, int copyno, ddselection_type st,
48  std::vector<DDPartSelection> & selv);
50  std::vector<DDPartSelection> partSelections_;
51  bool valid_;
52  bool doRegex_;
53  };
54 }
55 
56 #endif // DDI_Specific_h
void addSelectionLevel(std::vector< DDLogicalPart > &lpv, int copyno, ddselection_type st, std::vector< DDPartSelection > &selv)
Definition: Specific.cc:68
const std::vector< DDPartSelection > & selection() const
Definition: Specific.cc:95
std::vector< DDPartSelection > partSelections_
Definition: Specific.h:50
const DDsvalues_type & specifics() const
Definition: Specific.h:39
Definition: DDNodes.h:7
bool valid_
Definition: Specific.h:51
DDsvalues_type specifics_
Definition: Specific.h:49
bool doRegex_
Definition: Specific.h:52
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:20
Specific(const std::vector< std::string > &selections, const DDsvalues_type &specs, bool doRegex=true)
Definition: Specific.cc:19
void createPartSelections(const std::string &selString)
Definition: Specific.cc:37
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:92
std::pair< bool, DDExpandedView > node() const
gives the geometrical history of a fully specified PartSelector
Definition: Specific.cc:148
void updateLogicalPart(std::vector< std::pair< DDLogicalPart, std::pair< const DDPartSelection *, const DDsvalues_type * > > > &) const
Definition: Specific.cc:125
Provides an exploded view of the detector (tree-view)
void stream(std::ostream &) const
Definition: Specific.cc:100