Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-04 02:02:25

0001 #ifndef DDI_LogicalPart_h
0002 #define DDI_LogicalPart_h
0003 
0004 #include <iostream>
0005 #include <map>
0006 #include <utility>
0007 #include <vector>
0008 
0009 #include "DetectorDescription/Core/interface/DDEnums.h"
0010 #include "DetectorDescription/Core/interface/DDMaterial.h"
0011 #include "DetectorDescription/Core/interface/DDSolid.h"
0012 #include "DetectorDescription/Core/interface/DDValue.h"
0013 #include "DetectorDescription/Core/interface/DDsvalues.h"
0014 
0015 class DDPartSelection;
0016 
0017 namespace DDI {
0018   class LogicalPart {
0019   public:
0020     LogicalPart(const DDMaterial &, const DDSolid &, DDEnums::Category = DDEnums::unspecified);
0021     const DDMaterial &material() const;
0022     const DDSolid &solid() const;
0023     DDEnums::Category category() const;
0024     std::vector<const DDsvalues_type *> specifics() const;
0025     void specificsV(std::vector<const DDsvalues_type *> &result) const;
0026     DDsvalues_type mergedSpecifics() const;
0027     void mergedSpecificsV(DDsvalues_type &res) const;
0028     void addSpecifics(const std::pair<const DDPartSelection *, const DDsvalues_type *> &);
0029     void removeSpecifics(const std::pair<const DDPartSelection *, const DDsvalues_type *> &);
0030     const std::vector<std::pair<const DDPartSelection *, const DDsvalues_type *> > &attachedSpecifics() const {
0031       return specifics_;
0032     }
0033     bool hasDDValue(const DDValue &) const;
0034     //const std::vector<DDPartSelection*> & partSelections(const DDValue &) const;
0035     void stream(std::ostream &);
0036 
0037   private:
0038     DDMaterial material_;
0039     DDSolid solid_;
0040     DDEnums::Category cat_;
0041 
0042     std::map<DDValue, std::vector<DDPartSelection *> > valToParsel_;
0043     std::vector<std::pair<const DDPartSelection *, const DDsvalues_type *> > specifics_;
0044     std::vector<bool> hasDDValue_;
0045   };
0046 }  // namespace DDI
0047 #endif