CMS 3D CMS Logo

DDLogicalPart.h
Go to the documentation of this file.
1 #ifndef DDLogicalPart_h
2 #define DDLogicalPart_h
3 
4 #include <iosfwd>
5 #include <map>
6 #include <string>
7 #include <utility>
8 #include <vector>
9 
15 
16 class DDLogicalPart;
17 class DDMaterial;
18 class DDPartSelection;
19 class DDSolid;
20 class DDSpecifics;
21 class DDValue;
22 namespace DDI {
23 class LogicalPart;
24 } // namespace DDI
25 
26 std::ostream & operator<<( std::ostream &, const DDLogicalPart &);
27 
29 
92 class DDLogicalPart : public DDBase<DDName,DDI::LogicalPart*>
93 {
94  friend std::ostream & operator<<( std::ostream &, const DDLogicalPart &);
95 
96 public:
98  DDLogicalPart( void ) : DDBase<DDName,DDI::LogicalPart*>(){ }
99 
101  DDLogicalPart( const DDName & name );
102 
104  DDLogicalPart( const DDName & name,
105  const DDMaterial & material,
106  const DDSolid & solid,
108 
110  DDEnums::Category category( void ) const;
111 
113  const DDMaterial & material( void ) const;
114 
116  const DDSolid & solid( void ) const;
117 
119  double & weight( void );
120 
122  std::vector<const DDsvalues_type *> specifics( void ) const;
123 
125  DDsvalues_type mergedSpecifics( void ) const;
126 
128  void addSpecifics( const std::pair<const DDPartSelection*, const DDsvalues_type*> &);
129  void removeSpecifics( const std::pair<DDPartSelection*,DDsvalues_type*> &);
130  const std::vector< std::pair<const DDPartSelection*, const DDsvalues_type*> > & attachedSpecifics( void ) const;
131  bool hasDDValue( const DDValue & ) const;
132 };
133 
134 // some helpers .... (not very clean, redesign!!)
135 std::pair<bool, std::string>
136 DDIsValid( const std::string & ns, const std::string & name, std::vector<DDLogicalPart> & result, bool doRegex = true );
137 // std::maps name to std::vector of namespaces
138 // 2009-2010 re-write...FIX: Understand how this is used by DDSpecifics and FIX
140 void DD_NC( const DDName & );
141 
142 #endif
Definition: DDBase.h:10
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:16
A DDSolid represents the shape of a part.
Definition: DDSolid.h:37
DDI::Singleton< std::map< std::string, std::vector< DDName > > > LPNAMES
def cat(path)
Definition: eostools.py:400
void DD_NC(const DDName &)
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
Category
Definition: DDEnums.h:7
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:92
std::pair< bool, std::string > DDIsValid(const std::string &ns, const std::string &name, std::vector< DDLogicalPart > &result, bool doRegex=true)
Definition: rep_type.h:4
DDLogicalPart(void)
The default constructor provides an uninitialzed reference object.
Definition: DDLogicalPart.h:98
std::ostream & operator<<(std::ostream &, const DDLogicalPart &)
Interface to attach user specific data to nodes in the expanded-view.
Definition: DDSpecifics.h:42