CMS 3D CMS Logo

LogicalPart.h

Go to the documentation of this file.
00001 #ifndef DDI_LogicalPart_h
00002 #define DDI_LogicalPart_h
00003 
00004 #include <iostream>
00005 #include <vector>
00006 #include <utility>
00007 #include <map>
00008 
00009 #include "DetectorDescription/Core/interface/DDMaterial.h"
00010 #include "DetectorDescription/Core/interface/DDSolid.h"
00011 #include "DetectorDescription/Core/interface/DDEnums.h"
00012 #include "DetectorDescription/Core/interface/DDsvalues.h"
00013 
00014 //class DDsvalues_type;
00015 class DDPartSelection;
00016 
00017 namespace DDI {
00018   class LogicalPart 
00019   {
00020   public:
00021     LogicalPart(const DDMaterial &,
00022                 const DDSolid &,
00023                 DDEnums::Category  =  DDEnums::unspecified);
00024     const DDMaterial & material() const;
00025     const DDSolid & solid() const;
00026     DDEnums::Category category() const; 
00027     std::vector<const DDsvalues_type*> specifics() const;
00028     void specificsV(std::vector<const DDsvalues_type*> & result) const;
00029     DDsvalues_type mergedSpecifics() const;
00030     void mergedSpecificsV(DDsvalues_type & res) const;
00031     void addSpecifics(const std::pair<DDPartSelection*,DDsvalues_type*> &);
00032     void removeSpecifics(const std::pair<DDPartSelection*,DDsvalues_type*> &);
00033     const std::vector<std::pair< DDPartSelection*, DDsvalues_type* > > &
00034          attachedSpecifics() const { return specifics_; }
00035     bool hasDDValue(const DDValue &) const;
00036     //const std::vector<DDPartSelection*> & partSelections(const DDValue &) const;       
00037     void stream(std::ostream &);
00038     double & weight();
00039   private:
00040     DDMaterial material_;
00041     DDSolid solid_;
00042     DDEnums::Category cat_;      
00043     double weight_;             
00044 
00045     //std::vector<DDSpecifics> specifics_;
00046     std::map<DDValue, std::vector<DDPartSelection*> > valToParsel_;
00047     std::vector<std::pair<DDPartSelection*,DDsvalues_type* > > specifics_;
00048     std::vector<bool> hasDDValue_;
00049   };
00050 }
00051 #endif

Generated on Tue Jun 9 17:32:19 2009 for CMSSW by  doxygen 1.5.4