CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 <vector>
6 #include <utility>
7 #include <map>
8 
13 
14 //class DDsvalues_type;
15 class DDPartSelection;
16 
17 namespace DDI {
18  class LogicalPart
19  {
20  public:
21  LogicalPart(const DDMaterial &,
22  const DDSolid &,
24  const DDMaterial & material() const;
25  const DDSolid & solid() const;
26  DDEnums::Category category() const;
27  std::vector<const DDsvalues_type*> specifics() const;
28  void specificsV(std::vector<const DDsvalues_type*> & result) const;
30  void mergedSpecificsV(DDsvalues_type & res) const;
31  void addSpecifics(const std::pair<const DDPartSelection*, const DDsvalues_type*> &);
32  void removeSpecifics(const std::pair<const DDPartSelection*, const DDsvalues_type*> &);
33  const std::vector<std::pair<const DDPartSelection*,const DDsvalues_type* > > &
34  attachedSpecifics() const { return specifics_; }
35  bool hasDDValue(const DDValue &) const;
36  //const std::vector<DDPartSelection*> & partSelections(const DDValue &) const;
37  void stream(std::ostream &);
38  double & weight();
39  private:
43  double weight_;
44 
45  //std::vector<DDSpecifics> specifics_;
46  std::map<DDValue, std::vector<DDPartSelection*> > valToParsel_;
47  std::vector<std::pair<const DDPartSelection*, const DDsvalues_type* > > specifics_;
48  std::vector<bool> hasDDValue_;
49  };
50 }
51 #endif
std::vector< std::pair< const DDPartSelection *, const DDsvalues_type * > > specifics_
Definition: LogicalPart.h:47
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:34
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
DDEnums::Category category() const
Definition: LogicalPart.cc:22
void removeSpecifics(const std::pair< const DDPartSelection *, const DDsvalues_type * > &)
Definition: LogicalPart.cc:67
void addSpecifics(const std::pair< const DDPartSelection *, const DDsvalues_type * > &)
Definition: LogicalPart.cc:30
A DDSolid represents the shape of a part.
Definition: DDSolid.h:35
std::vector< bool > hasDDValue_
Definition: LogicalPart.h:48
std::map< DDValue, std::vector< DDPartSelection * > > valToParsel_
Definition: LogicalPart.h:46
const DDMaterial & material() const
Definition: LogicalPart.cc:20
tuple result
Definition: query.py:137
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
void stream(std::ostream &)
Definition: LogicalPart.cc:23
Category
Definition: DDEnums.h:7
std::vector< const DDsvalues_type * > specifics() const
Definition: LogicalPart.cc:75
DDMaterial material_
Definition: LogicalPart.h:40
bool hasDDValue(const DDValue &) const
Definition: LogicalPart.cc:57
DDEnums::Category cat_
Definition: LogicalPart.h:42
void mergedSpecificsV(DDsvalues_type &res) const
Definition: LogicalPart.cc:103
const DDSolid & solid() const
Definition: LogicalPart.cc:21
double & weight()
Definition: LogicalPart.cc:28
DDsvalues_type mergedSpecifics() const
Definition: LogicalPart.cc:96
void specificsV(std::vector< const DDsvalues_type * > &result) const
Definition: LogicalPart.cc:83