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 <memory>
7 #include <string>
8 #include <utility>
9 #include <vector>
10 
16 
17 class DDLogicalPart;
18 class DDMaterial;
19 class DDPartSelection;
20 class DDSolid;
21 class DDSpecifics;
22 class DDValue;
23 namespace DDI {
24 class LogicalPart;
25 } // namespace DDI
26 
27 std::ostream & operator<<( std::ostream &, const DDLogicalPart &);
28 
30 
93 class DDLogicalPart : public DDBase<DDName,std::unique_ptr<DDI::LogicalPart> >
94 {
95  public:
97  DDLogicalPart( void ) : DDBase<DDName,std::unique_ptr<DDI::LogicalPart> >(){ }
98 
100  DDLogicalPart( const DDName & name );
101 
103  DDLogicalPart( const DDName & name,
104  const DDMaterial & material,
105  const DDSolid & solid,
107 
109  DDEnums::Category category( void ) const;
110 
112  const DDMaterial & material( void ) const;
113 
115  const DDSolid & solid( void ) const;
116 
118  std::vector<const DDsvalues_type *> specifics( void ) const;
119 
121  DDsvalues_type mergedSpecifics( void ) const;
122 
124  void addSpecifics( const std::pair<const DDPartSelection*, const DDsvalues_type*> &);
125  void removeSpecifics( const std::pair<DDPartSelection*,DDsvalues_type*> &);
126  const std::vector< std::pair<const DDPartSelection*, const DDsvalues_type*> > & attachedSpecifics( void ) const;
127  bool hasDDValue( const DDValue & ) const;
128 };
129 
130 // some helpers .... (not very clean, redesign!!)
131 std::pair<bool, std::string>
132 DDIsValid( const std::string & ns, const std::string & name, std::vector<DDLogicalPart> & result, bool doRegex = true );
133 // std::maps name to std::vector of namespaces
134 // 2009-2010 re-write...FIX: Understand how this is used by DDSpecifics and FIX
136 void DD_NC( const DDName & );
137 
138 #endif
Definition: DDBase.h:10
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:43
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
DDI::Singleton< std::map< std::string, std::vector< DDName > > > LPNAMES
def cat(path)
Definition: eostools.py:401
void DD_NC(const DDName &)
Category
Definition: DDEnums.h:7
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
std::pair< bool, std::string > DDIsValid(const std::string &ns, const std::string &name, std::vector< DDLogicalPart > &result, bool doRegex=true)
DDLogicalPart(void)
The default constructor provides an uninitialzed reference object.
Definition: DDLogicalPart.h:97
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
std::ostream & operator<<(std::ostream &, const DDLogicalPart &)
Interface to attach user specific data to nodes in the expanded-view.
Definition: DDSpecifics.h:41