CMS 3D CMS Logo

TGeoMgrFromDdd.h
Go to the documentation of this file.
1 #ifndef Fireworks_Geometry_TGeoMgrFromDdd_h
2 #define Fireworks_Geometry_TGeoMgrFromDdd_h
3 // -*- C++ -*-
4 //
5 // Package: Geometry
6 // Class : TGeoMgrFromDdd
7 //
16 //
17 // Original Author:
18 // Created: Fri Jul 2 16:11:33 CEST 2010
19 //
20 
21 // system include files
22 #include <string>
23 #include <map>
24 
25 #include <memory>
26 
27 // user include files
29 
30 // forward declarations
31 
32 namespace edm
33 {
34  class ParameterSet;
35 }
36 
37 class DDSolid;
38 class DDMaterial;
39 class DisplayGeomRecord;
40 
41 class TGeoManager;
42 class TGeoShape;
43 class TGeoVolume;
44 class TGeoMaterial;
45 class TGeoMedium;
46 
48 {
49 public:
51  virtual ~TGeoMgrFromDdd();
52 
53  typedef std::shared_ptr<TGeoManager> ReturnType;
54 
55  // ---------- const member functions ---------------------
56 
57  // ---------- static member functions --------------------
58 
59  // ---------- member functions ---------------------------
60 
61  ReturnType produce(const DisplayGeomRecord&);
62 
63 private:
64  TGeoMgrFromDdd(const TGeoMgrFromDdd&); // stop default
65  const TGeoMgrFromDdd& operator=(const TGeoMgrFromDdd&); // stop default
66 
67 
68  TGeoManager* createManager(int level);
69 
70  TGeoShape* createShape(const std::string& iName,
71  const DDSolid& iSolid);
72  TGeoVolume* createVolume(const std::string& iName,
73  const DDSolid& iSolid,
74  const DDMaterial& iMaterial);
75  TGeoMaterial* createMaterial(const DDMaterial& iMaterial);
76 
77  // ---------- member data --------------------------------
78 
79  int m_level;
80  bool m_verbose;
81 
82  std::map<std::string, TGeoShape*> nameToShape_;
83  std::map<std::string, TGeoVolume*> nameToVolume_;
84  std::map<std::string, TGeoMaterial*> nameToMaterial_;
85  std::map<std::string, TGeoMedium*> nameToMedium_;
86 };
87 
88 #endif
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
A DDSolid represents the shape of a part.
Definition: DDSolid.h:37
std::map< std::string, TGeoShape * > nameToShape_
std::map< std::string, TGeoMaterial * > nameToMaterial_
std::map< std::string, TGeoVolume * > nameToVolume_
HLT enums.
std::map< std::string, TGeoMedium * > nameToMedium_
std::shared_ptr< TGeoManager > ReturnType