CMS 3D CMS Logo

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:26
void removeSpecifics(const std::pair< const DDPartSelection *, const DDsvalues_type * > &)
Definition: LogicalPart.cc:66
void addSpecifics(const std::pair< const DDPartSelection *, const DDsvalues_type * > &)
Definition: LogicalPart.cc:35
Definition: Electron.h:4
A DDSolid represents the shape of a part.
Definition: DDSolid.h:38
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:22
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:28
Category
Definition: DDEnums.h:7
std::vector< const DDsvalues_type * > specifics() const
Definition: LogicalPart.cc:73
DDMaterial material_
Definition: LogicalPart.h:41
bool hasDDValue(const DDValue &) const
Definition: LogicalPart.cc:56
DDEnums::Category cat_
Definition: LogicalPart.h:43
void mergedSpecificsV(DDsvalues_type &res) const
Definition: LogicalPart.cc:97
const DDSolid & solid() const
Definition: LogicalPart.cc:24
double & weight()
Definition: LogicalPart.cc:33
DDsvalues_type mergedSpecifics() const
Definition: LogicalPart.cc:91
void specificsV(std::vector< const DDsvalues_type * > &result) const
Definition: LogicalPart.cc:81