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 <map>
6 #include <utility>
7 #include <vector>
8 
14 
15 //class DDsvalues_type;
16 class DDPartSelection;
17 
18 namespace DDI {
19  class LogicalPart
20  {
21  public:
22  LogicalPart(const DDMaterial &,
23  const DDSolid &,
25  const DDMaterial & material() const;
26  const DDSolid & solid() const;
27  DDEnums::Category category() const;
28  std::vector<const DDsvalues_type*> specifics() const;
29  void specificsV(std::vector<const DDsvalues_type*> & result) const;
31  void mergedSpecificsV(DDsvalues_type & res) const;
32  void addSpecifics(const std::pair<const DDPartSelection*, const DDsvalues_type*> &);
33  void removeSpecifics(const std::pair<const DDPartSelection*, const DDsvalues_type*> &);
34  const std::vector<std::pair<const DDPartSelection*,const DDsvalues_type* > > &
35  attachedSpecifics() const { return specifics_; }
36  bool hasDDValue(const DDValue &) const;
37  //const std::vector<DDPartSelection*> & partSelections(const DDValue &) const;
38  void stream(std::ostream &);
39  double & weight();
40  private:
44  double weight_;
45 
46  //std::vector<DDSpecifics> specifics_;
47  std::map<DDValue, std::vector<DDPartSelection*> > valToParsel_;
48  std::vector<std::pair<const DDPartSelection*, const DDsvalues_type* > > specifics_;
49  std::vector<bool> hasDDValue_;
50  };
51 }
52 #endif
std::vector< std::pair< const DDPartSelection *, const DDsvalues_type * > > specifics_
Definition: LogicalPart.h:48
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:35
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
DDEnums::Category category() const
Definition: LogicalPart.cc:21
void removeSpecifics(const std::pair< const DDPartSelection *, const DDsvalues_type * > &)
Definition: LogicalPart.cc:61
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:37
tuple result
Definition: mps_fire.py:84
std::vector< bool > hasDDValue_
Definition: LogicalPart.h:49
std::map< DDValue, std::vector< DDPartSelection * > > valToParsel_
Definition: LogicalPart.h:47
const DDMaterial & material() const
Definition: LogicalPart.cc:17
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:20
void stream(std::ostream &)
Definition: LogicalPart.cc:23
Category
Definition: DDEnums.h:7
std::vector< const DDsvalues_type * > specifics() const
Definition: LogicalPart.cc:68
DDMaterial material_
Definition: LogicalPart.h:41
bool hasDDValue(const DDValue &) const
Definition: LogicalPart.cc:51
DDEnums::Category cat_
Definition: LogicalPart.h:43
void mergedSpecificsV(DDsvalues_type &res) const
Definition: LogicalPart.cc:92
const DDSolid & solid() const
Definition: LogicalPart.cc:19
double & weight()
Definition: LogicalPart.cc:28
DDsvalues_type mergedSpecifics() const
Definition: LogicalPart.cc:86
void specificsV(std::vector< const DDsvalues_type * > &result) const
Definition: LogicalPart.cc:76