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 public:
96  DDLogicalPart(void) : DDBase<DDName, std::unique_ptr<DDI::LogicalPart> >() {}
97 
99  DDLogicalPart(const DDName &name);
100 
102  DDLogicalPart(const DDName &name,
103  const DDMaterial &material,
104  const DDSolid &solid,
106 
108  DDEnums::Category category(void) const;
109 
111  const DDMaterial &material(void) const;
112 
114  const DDSolid &solid(void) const;
115 
117  std::vector<const DDsvalues_type *> specifics(void) const;
118 
120  DDsvalues_type mergedSpecifics(void) const;
121 
123  void addSpecifics(const std::pair<const DDPartSelection *, const DDsvalues_type *> &);
124  void removeSpecifics(const std::pair<DDPartSelection *, DDsvalues_type *> &);
125  const std::vector<std::pair<const DDPartSelection *, const DDsvalues_type *> > &attachedSpecifics(void) const;
126  bool hasDDValue(const DDValue &) const;
127 };
128 
129 // some helpers .... (not very clean, redesign!!)
130 std::pair<bool, std::string> DDIsValid(const std::string &ns,
131  const std::string &name,
132  std::vector<DDLogicalPart> &result,
133  bool doRegex = true);
134 // std::maps name to std::vector of namespaces
135 // 2009-2010 re-write...FIX: Understand how this is used by DDSpecifics and FIX
137 void DD_NC(const DDName &);
138 
139 #endif
DDBase.h
DDI
Definition: DDCompactView.h:24
operator<<
std::ostream & operator<<(std::ostream &, const DDLogicalPart &)
Definition: DDLogicalPart.cc:27
DDName
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
eostools.cat
def cat(path)
Definition: eostools.py:401
DDI::Singleton
Definition: Singleton.h:6
DDLogicalPart::material
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
Definition: DDLogicalPart.cc:118
DDPartSelection
Definition: DDPartSelection.h:37
DDEnums.h
DDLogicalPart::DDLogicalPart
DDLogicalPart(void)
The default constructor provides an uninitialzed reference object.
Definition: DDLogicalPart.h:96
DDMaterial
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:45
DDLogicalPart::removeSpecifics
void removeSpecifics(const std::pair< DDPartSelection *, DDsvalues_type * > &)
Definition: DDLogicalPart.cc:192
DDBase< DDName, std::unique_ptr< DDI::LogicalPart > >::name
const DDName & name() const
Definition: DDBase.h:59
DDSpecifics
Interface to attach user specific data to nodes in the expanded-view.
Definition: DDSpecifics.h:41
DDLogicalPart::specifics
std::vector< const DDsvalues_type * > specifics(void) const
returns the specific-data attached to the LogicalPart only (not to a DDExpandedNode)
Definition: DDLogicalPart.cc:175
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DDLogicalPart::category
DDEnums::Category category(void) const
Returns the categorization of the DDLogicalPart (sensitive detector element, cable,...
Definition: DDLogicalPart.cc:116
LPNAMES
DDI::Singleton< std::map< std::string, std::vector< DDName > > > LPNAMES
Definition: DDLogicalPart.h:136
DDEnums::Category
Category
Definition: DDEnums.h:7
DDLogicalPart
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
Definition: DDLogicalPart.h:93
DD_NC
void DD_NC(const DDName &)
Definition: DDLogicalPart.cc:12
DDEnums::unspecified
Definition: DDEnums.h:7
cms::cuda::device::unique_ptr
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
Definition: device_unique_ptr.h:33
Singleton.h
std
Definition: JetResolutionObject.h:76
DDValue
Definition: DDValue.h:21
DDName.h
DDIsValid
std::pair< bool, std::string > DDIsValid(const std::string &ns, const std::string &name, std::vector< DDLogicalPart > &result, bool doRegex=true)
Definition: DDLogicalPart.cc:248
DDLogicalPart::attachedSpecifics
const std::vector< std::pair< const DDPartSelection *, const DDsvalues_type * > > & attachedSpecifics(void) const
Definition: DDLogicalPart.cc:340
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DDSolid
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
DDsvalues.h
DDLogicalPart::mergedSpecifics
DDsvalues_type mergedSpecifics(void) const
returns the merged-specifics, i.e. the last specified specifics of this logical-part
Definition: DDLogicalPart.cc:181
mps_fire.result
result
Definition: mps_fire.py:303
DDBase
Definition: DDBase.h:10
DDLogicalPart::addSpecifics
void addSpecifics(const std::pair< const DDPartSelection *, const DDsvalues_type * > &)
don't use, internal only /todo make it private
Definition: DDLogicalPart.cc:188
DDsvalues_type
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
DDLogicalPart::solid
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
Definition: DDLogicalPart.cc:120
DDLogicalPart::hasDDValue
bool hasDDValue(const DDValue &) const
Definition: DDLogicalPart.cc:194