CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LogicalPart.h
Go to the documentation of this file.
1 #ifndef DDI_LogicalPart_h
2 #define DDI_LogicalPart_h
3 
4 #include <iostream>
5 #include <map>
6 #include <utility>
7 #include <vector>
8 
14 
15 class DDPartSelection;
16 
17 namespace DDI {
18  class LogicalPart {
19  public:
21  const DDMaterial &material() const;
22  const DDSolid &solid() const;
24  std::vector<const DDsvalues_type *> specifics() const;
25  void specificsV(std::vector<const DDsvalues_type *> &result) const;
27  void mergedSpecificsV(DDsvalues_type &res) const;
28  void addSpecifics(const std::pair<const DDPartSelection *, const DDsvalues_type *> &);
29  void removeSpecifics(const std::pair<const DDPartSelection *, const DDsvalues_type *> &);
30  const std::vector<std::pair<const DDPartSelection *, const DDsvalues_type *> > &attachedSpecifics() const {
31  return specifics_;
32  }
33  bool hasDDValue(const DDValue &) const;
34  //const std::vector<DDPartSelection*> & partSelections(const DDValue &) const;
35  void stream(std::ostream &);
36 
37  private:
41 
42  std::map<DDValue, std::vector<DDPartSelection *> > valToParsel_;
43  std::vector<std::pair<const DDPartSelection *, const DDsvalues_type *> > specifics_;
44  std::vector<bool> hasDDValue_;
45  };
46 } // namespace DDI
47 #endif
std::map< DDValue, std::vector< DDPartSelection * > > valToParsel_
Definition: LogicalPart.h:42
LogicalPart(const DDMaterial &, const DDSolid &, DDEnums::Category=DDEnums::unspecified)
Definition: LogicalPart.cc:11
const std::vector< std::pair< const DDPartSelection *, const DDsvalues_type * > > & attachedSpecifics() const
Definition: LogicalPart.h:30
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:45
DDEnums::Category category() const
Definition: LogicalPart.cc:18
void removeSpecifics(const std::pair< const DDPartSelection *, const DDsvalues_type * > &)
Definition: LogicalPart.cc:51
void addSpecifics(const std::pair< const DDPartSelection *, const DDsvalues_type * > &)
Definition: LogicalPart.cc:24
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
tuple result
Definition: mps_fire.py:311
std::vector< bool > hasDDValue_
Definition: LogicalPart.h:44
const DDMaterial & material() const
Definition: LogicalPart.cc:14
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
void stream(std::ostream &)
Definition: LogicalPart.cc:20
Category
Definition: DDEnums.h:7
std::vector< const DDsvalues_type * > specifics() const
Definition: LogicalPart.cc:57
DDMaterial material_
Definition: LogicalPart.h:38
bool hasDDValue(const DDValue &) const
Definition: LogicalPart.cc:42
DDEnums::Category cat_
Definition: LogicalPart.h:40
void mergedSpecificsV(DDsvalues_type &res) const
Definition: LogicalPart.cc:78
const DDSolid & solid() const
Definition: LogicalPart.cc:16
std::vector< std::pair< const DDPartSelection *, const DDsvalues_type * > > specifics_
Definition: LogicalPart.h:43
DDsvalues_type mergedSpecifics() const
Definition: LogicalPart.cc:72
void specificsV(std::vector< const DDsvalues_type * > &result) const
Definition: LogicalPart.cc:63