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  typedef std::vector<DDPartSelection> partsel_type;
23  typedef std::vector<std::string> selectors_type;
24 
25  Specific(const std::vector<std::string> & selections,
26  const DDsvalues_type & specs,
27  bool doRegex=true) ;
28 
29  Specific(const std::vector<DDPartSelection> & selections,
30  const DDsvalues_type & specs);
31 
32  ~Specific();// { }
33 
34  const std::vector<DDPartSelection> & selection() const;
35 
36  void updateLogicalPart(std::vector<std::pair<DDLogicalPart, std::pair<const DDPartSelection*, const DDsvalues_type*> > >&) const;
37 
38  void tokenize();
39 
40  const DDsvalues_type & specifics() const { return specifics_; }
41 
43  bool nodes(DDNodes &) const { return false; }
44 
46  std::pair<bool,DDExpandedView> node() const;
47 
48  void stream(std::ostream &) const;
49  protected:
50  void createPartSelections(const std::string & selString);
51  void addSelectionLevel(std::vector<DDLogicalPart> & lpv, int copyno, ddselection_type st,
52  std::vector<DDPartSelection> & selv);
53  //std::vector<std::string> selection_;
56  bool valid_;
57  bool doRegex_;
58  };
59 
60 }
61 
62 #endif // DDI_Specific_h
void addSelectionLevel(std::vector< DDLogicalPart > &lpv, int copyno, ddselection_type st, std::vector< DDPartSelection > &selv)
Definition: Specific.cc:65
const std::vector< DDPartSelection > & selection() const
Definition: Specific.cc:95
const DDsvalues_type & specifics() const
Definition: Specific.h:40
Definition: DDNodes.h:7
bool valid_
Definition: Specific.h:56
DDsvalues_type specifics_
Definition: Specific.h:54
std::vector< DDPartSelection > partsel_type
Definition: Specific.h:22
bool nodes(DDNodes &) const
CURRENTLY NOT IMPLEMENTED!
Definition: Specific.h:43
std::vector< std::string > selectors_type
Definition: Specific.h:23
bool doRegex_
Definition: Specific.h:57
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:11
void createPartSelections(const std::string &selString)
Definition: Specific.cc:30
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:158
partsel_type partSelections_
Definition: Specific.h:55
void updateLogicalPart(std::vector< std::pair< DDLogicalPart, std::pair< const DDPartSelection *, const DDsvalues_type * > > > &) const
Definition: Specific.cc:131
void stream(std::ostream &) const
Definition: Specific.cc:101