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 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  private:
42 
43  std::map<DDValue, std::vector<DDPartSelection*> > valToParsel_;
44  std::vector<std::pair<const DDPartSelection*, const DDsvalues_type* > > specifics_;
45  std::vector<bool> hasDDValue_;
46  };
47 }
48 #endif
std::vector< std::pair< const DDPartSelection *, const DDsvalues_type * > > specifics_
Definition: LogicalPart.h:44
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:43
DDEnums::Category category() const
Definition: LogicalPart.cc:25
void removeSpecifics(const std::pair< const DDPartSelection *, const DDsvalues_type * > &)
Definition: LogicalPart.cc:63
void addSpecifics(const std::pair< const DDPartSelection *, const DDsvalues_type * > &)
Definition: LogicalPart.cc:32
Definition: Electron.h:6
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
std::vector< bool > hasDDValue_
Definition: LogicalPart.h:45
std::map< DDValue, std::vector< DDPartSelection * > > valToParsel_
Definition: LogicalPart.h:43
const DDMaterial & material() const
Definition: LogicalPart.cc:21
void stream(std::ostream &)
Definition: LogicalPart.cc:27
Category
Definition: DDEnums.h:7
std::vector< const DDsvalues_type * > specifics() const
Definition: LogicalPart.cc:70
DDMaterial material_
Definition: LogicalPart.h:39
bool hasDDValue(const DDValue &) const
Definition: LogicalPart.cc:53
DDEnums::Category cat_
Definition: LogicalPart.h:41
void mergedSpecificsV(DDsvalues_type &res) const
Definition: LogicalPart.cc:94
const DDSolid & solid() const
Definition: LogicalPart.cc:23
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
DDsvalues_type mergedSpecifics() const
Definition: LogicalPart.cc:88
void specificsV(std::vector< const DDsvalues_type * > &result) const
Definition: LogicalPart.cc:78