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:8
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:18
void removeSpecifics(const std::pair< const DDPartSelection *, const DDsvalues_type * > &)
Definition: LogicalPart.cc:62
void addSpecifics(const std::pair< const DDPartSelection *, const DDsvalues_type * > &)
Definition: LogicalPart.cc:27
A DDSolid represents the shape of a part.
Definition: DDSolid.h:35
tuple result
Definition: mps_fire.py:95
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:14
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:20
Category
Definition: DDEnums.h:7
std::vector< const DDsvalues_type * > specifics() const
Definition: LogicalPart.cc:69
DDMaterial material_
Definition: LogicalPart.h:40
bool hasDDValue(const DDValue &) const
Definition: LogicalPart.cc:52
DDEnums::Category cat_
Definition: LogicalPart.h:42
void mergedSpecificsV(DDsvalues_type &res) const
Definition: LogicalPart.cc:93
const DDSolid & solid() const
Definition: LogicalPart.cc:16
double & weight()
Definition: LogicalPart.cc:25
DDsvalues_type mergedSpecifics() const
Definition: LogicalPart.cc:87
void specificsV(std::vector< const DDsvalues_type * > &result) const
Definition: LogicalPart.cc:77