test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
27 // user include files
28 
29 // forward declarations
30 
31 namespace edm
32 {
33  class ParameterSet;
34  class ActivityRegistry;
35  class Run;
36  class EventSetup;
37 }
38 
39 class DDSolid;
40 class DDMaterial;
41 
42 class TGeoManager;
43 class TGeoShape;
44 class TGeoVolume;
45 class TGeoMaterial;
46 class TGeoMedium;
47 
49 {
50 public:
52  virtual ~TGeoFromDddService();
53 
54  // ---------- const member functions ---------------------
55 
56  // ---------- static member functions --------------------
57 
58  // ---------- member functions ---------------------------
59 
60  void postBeginRun(const edm::Run&, const edm::EventSetup&);
61  void postEndRun (const edm::Run&, const edm::EventSetup&);
62 
63  TGeoManager* getGeoManager();
64 
65 private:
66  TGeoFromDddService(const TGeoFromDddService&); // stop default
67  const TGeoFromDddService& operator=(const TGeoFromDddService&); // stop default
68 
69 
70  TGeoManager* createManager(int level);
71 
72  TGeoShape* createShape(const std::string& iName,
73  const DDSolid& iSolid);
74  TGeoVolume* createVolume(const std::string& iName,
75  const DDSolid& iSolid,
76  const DDMaterial& iMaterial);
77  TGeoMaterial* createMaterial(const DDMaterial& iMaterial);
78 
79  // ---------- member data --------------------------------
80 
81  int m_level;
82  bool m_verbose;
84  TGeoManager *m_geoManager;
85 
86  std::map<std::string, TGeoShape*> nameToShape_;
87  std::map<std::string, TGeoVolume*> nameToVolume_;
88  std::map<std::string, TGeoMaterial*> nameToMaterial_;
89  std::map<std::string, TGeoMedium*> nameToMedium_;
90 };
91 
92 #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:41
TGeoVolume * createVolume(const std::string &iName, const DDSolid &iSolid, const DDMaterial &iMaterial)
const TGeoFromDddService & operator=(const TGeoFromDddService &)
A DDSolid represents the shape of a part.
Definition: DDSolid.h:37
std::map< std::string, TGeoVolume * > nameToVolume_
std::map< std::string, TGeoMedium * > nameToMedium_
void postBeginRun(const edm::Run &, const edm::EventSetup &)
TGeoFromDddService(const edm::ParameterSet &, edm::ActivityRegistry &)
TGeoMaterial * createMaterial(const DDMaterial &iMaterial)
TGeoManager * createManager(int level)
std::map< std::string, TGeoShape * > nameToShape_
tuple level
Definition: testEve_cfg.py:34
TGeoManager * getGeoManager()
void postEndRun(const edm::Run &, const edm::EventSetup &)
TGeoShape * createShape(const std::string &iName, const DDSolid &iSolid)
Definition: Run.h:42