Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:32

0001 #ifndef DDL_LogicalPart_H
0002 #define DDL_LogicalPart_H
0003 
0004 #include <map>
0005 #include <string>
0006 
0007 #include "DDXMLElement.h"
0008 #include "DetectorDescription/Core/interface/DDEnums.h"
0009 #include "DetectorDescription/Core/interface/DDLogicalPart.h"
0010 
0011 class DDCompactView;
0012 class DDLElementRegistry;
0013 
0014 /// DDLLogicalPart processes LogicalPart elements.
0015 /** @class DDLLogicalPart
0016  * @author Michael Case
0017  *
0018  *  DDLLogicalPart.h  -  description
0019  *  -------------------
0020  *  begin: Tue Oct 31 2001
0021  *  email: case@ucdhep.ucdavis.edu
0022  *
0023  *  LogicalPart elements simply have the name attribute.  However, they
0024  *  also contain elements rSolid and rMaterial.  These come together in
0025  *  implementation, but as an XML element the only relevant information to
0026  *  the DDCore is the name attribute.   Optionally, they can have instead
0027  *  any Solid or Material elements.  To handle the fact that those
0028  *  elements must "stand alone" and also work within LogicalParts, each 
0029  *  of those must create a reference (rMaterial or rSolid) to the most
0030  *  recently processed such element.
0031  *
0032  */
0033 
0034 class DDLLogicalPart final : public DDXMLElement {
0035 public:
0036   DDLLogicalPart(DDLElementRegistry* myreg);
0037 
0038   void preProcessElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) override;
0039   void processElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) override;
0040 
0041 private:
0042   std::map<std::string, DDEnums::Category> catMap_;
0043 };
0044 
0045 #endif