Go to the documentation of this file.00001 #ifndef DDLogicalPart_h
00002 #define DDLogicalPart_h
00003
00004
00005
00006
00007
00008
00009
00010 #include <iosfwd>
00011 #include <vector>
00012 #include <string>
00013 #include <map>
00014 #include "DetectorDescription/Core/interface/DDName.h"
00015 #include "DetectorDescription/Core/interface/DDBase.h"
00016 #include "DetectorDescription/Core/interface/DDEnums.h"
00017 #include "DetectorDescription/Base/interface/Singleton.h"
00018 #include "DetectorDescription/Core/interface/DDsvalues.h"
00019
00020
00021 namespace DDI { class LogicalPart; }
00022 class DDMaterial;
00023 class DDSolid;
00024 class DDSpecifics;
00025 class DDLogicalPart;
00026
00027 class DDPartSelection;
00028
00029 std::ostream & operator<<( std::ostream &, const DDLogicalPart &);
00030
00032
00095 class DDLogicalPart : public DDBase<DDName,DDI::LogicalPart*>
00096 {
00097 friend std::ostream & operator<<( std::ostream &, const DDLogicalPart &);
00098
00099
00100 public:
00102 DDLogicalPart() : DDBase<DDName,DDI::LogicalPart*>(){ }
00103
00105 DDLogicalPart(const DDName & name);
00106
00108 DDLogicalPart(const DDName & name,
00109 const DDMaterial & material,
00110 const DDSolid & solid,
00111 DDEnums::Category cat=DDEnums::unspecified);
00112
00114 DDEnums::Category category() const;
00115
00116
00117
00119 const DDMaterial & material() const;
00120
00122 const DDSolid & solid() const;
00123
00125 double & weight();
00126
00128 std::vector<const DDsvalues_type *> specifics() const;
00129
00131 DDsvalues_type mergedSpecifics() const;
00132
00134 void addSpecifics(const std::pair<DDPartSelection*,DDsvalues_type*> &);
00135 void removeSpecifics(const std::pair<DDPartSelection*,DDsvalues_type*> &);
00136 const std::vector< std::pair<DDPartSelection*,DDsvalues_type*> > & attachedSpecifics() const;
00137 bool hasDDValue(const DDValue &) const;
00138
00140
00141
00142
00143
00144
00145 private:
00146
00147
00148
00149
00150 };
00151
00152
00153
00154 std::pair<bool,std::string> DDIsValid(const std::string & ns, const std::string & name, std::vector<DDLogicalPart> & result,bool doRegex=true);
00155
00156
00157 typedef DDI::Singleton<std::map<std::string,std::vector<DDName> > > LPNAMES;
00158 void DD_NC(const DDName &);
00159
00160 #endif