CMS 3D CMS Logo

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