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 DDPartSelection;
17 
18 namespace DDI {
19 
20  class Specific
21  {
22  public:
23  Specific(const std::vector<std::string> & selections,
24  const DDsvalues_type & specs,
25  bool doRegex=true) ;
26 
27  Specific(const std::vector<DDPartSelection> & selections,
28  const DDsvalues_type & specs);
29 
30  const std::vector<DDPartSelection> & selection() const;
31 
32  void updateLogicalPart(std::vector<std::pair<DDLogicalPart, std::pair<const DDPartSelection*, const DDsvalues_type*> > >&) const;
33 
34  void tokenize();
35 
36  const DDsvalues_type & specifics() const { return specifics_; }
37 
39  std::pair<bool,DDExpandedView> node() const;
40 
41  void stream(std::ostream &) const;
42  protected:
43  void createPartSelections(const std::string & selString);
44  void addSelectionLevel(std::vector<DDLogicalPart> & lpv, int copyno, ddselection_type st,
45  std::vector<DDPartSelection> & selv);
47  std::vector<DDPartSelection> partSelections_;
48  bool valid_;
49  bool doRegex_;
50  };
51 }
52 
53 #endif // DDI_Specific_h
void addSelectionLevel(std::vector< DDLogicalPart > &lpv, int copyno, ddselection_type st, std::vector< DDPartSelection > &selv)
Definition: Specific.cc:69
const std::vector< DDPartSelection > & selection() const
Definition: Specific.cc:96
std::vector< DDPartSelection > partSelections_
Definition: Specific.h:47
const DDsvalues_type & specifics() const
Definition: Specific.h:36
bool valid_
Definition: Specific.h:48
DDsvalues_type specifics_
Definition: Specific.h:46
bool doRegex_
Definition: Specific.h:49
ddselection_type
Specific(const std::vector< std::string > &selections, const DDsvalues_type &specs, bool doRegex=true)
Definition: Specific.cc:20
void createPartSelections(const std::string &selString)
Definition: Specific.cc:38
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
std::pair< bool, DDExpandedView > node() const
gives the geometrical history of a fully specified PartSelector
Definition: Specific.cc:149
void updateLogicalPart(std::vector< std::pair< DDLogicalPart, std::pair< const DDPartSelection *, const DDsvalues_type * > > > &) const
Definition: Specific.cc:126
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
Provides an exploded view of the detector (tree-view)
void stream(std::ostream &) const
Definition: Specific.cc:101