CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // $Id: TGeoMgrFromDdd.h,v 1.1 2010/07/06 18:42:13 matevz Exp $
20 //
21 
22 // system include files
23 #include <string>
24 #include <map>
25 
26 #include "boost/shared_ptr.hpp"
27 
28 // user include files
30 
31 // forward declarations
32 
33 namespace edm
34 {
35  class ParameterSet;
36 }
37 
38 class DDSolid;
39 class DDMaterial;
40 class DisplayGeomRecord;
41 
42 class TGeoManager;
43 class TGeoShape;
44 class TGeoVolume;
45 class TGeoMaterial;
46 class TGeoMedium;
47 
49 {
50 public:
52  virtual ~TGeoMgrFromDdd();
53 
54  typedef boost::shared_ptr<TGeoManager> ReturnType;
55 
56  // ---------- const member functions ---------------------
57 
58  // ---------- static member functions --------------------
59 
60  // ---------- member functions ---------------------------
61 
63 
64 private:
65  TGeoMgrFromDdd(const TGeoMgrFromDdd&); // stop default
66  const TGeoMgrFromDdd& operator=(const TGeoMgrFromDdd&); // stop default
67 
68 
69  TGeoManager* createManager(int level);
70 
71  TGeoShape* createShape(const std::string& iName,
72  const DDSolid& iSolid);
73  TGeoVolume* createVolume(const std::string& iName,
74  const DDSolid& iSolid,
75  const DDMaterial& iMaterial);
76  TGeoMaterial* createMaterial(const DDMaterial& iMaterial);
77 
78  // ---------- member data --------------------------------
79 
80  int m_level;
81  bool m_verbose;
82 
83  std::map<std::string, TGeoShape*> nameToShape_;
84  std::map<std::string, TGeoVolume*> nameToVolume_;
85  std::map<std::string, TGeoMaterial*> nameToMaterial_;
86  std::map<std::string, TGeoMedium*> nameToMedium_;
87 };
88 
89 #endif
TGeoMaterial * createMaterial(const DDMaterial &iMaterial)
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
const TGeoMgrFromDdd & operator=(const TGeoMgrFromDdd &)
A DDSolid represents the shape of a part.
Definition: DDSolid.h:35
TGeoVolume * createVolume(const std::string &iName, const DDSolid &iSolid, const DDMaterial &iMaterial)
std::map< std::string, TGeoShape * > nameToShape_
ReturnType produce(const DisplayGeomRecord &)
TGeoShape * createShape(const std::string &iName, const DDSolid &iSolid)
TGeoMgrFromDdd(const edm::ParameterSet &)
std::map< std::string, TGeoMaterial * > nameToMaterial_
std::map< std::string, TGeoVolume * > nameToVolume_
boost::shared_ptr< TGeoManager > ReturnType
TGeoManager * createManager(int level)
std::map< std::string, TGeoMedium * > nameToMedium_
tuple level
Definition: testEve_cfg.py:34
virtual ~TGeoMgrFromDdd()