CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EveDisplayPlugin.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: EveDisplayPlugin
4 // Class: EveDisplayPlugin
5 //
13 //
14 // Original Author: Chris D Jones
15 // Created: Wed Sep 26 08:27:23 EDT 2007
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 #include <iostream>
22 #include <sstream>
23 
24 // user include files
28 
30 
33 
34 #include "TGeoManager.h"
35 #include "TEveManager.h"
36 #include "TEveGeoNode.h"
37 
38 //
39 // class decleration
40 //
41 
43 
44  public:
45  explicit EveDisplayPlugin();
47 
48 
49  private:
50  virtual void run(const edm::EventSetup&) override;
51 
52 };
53 
54 //
55 // constants, enums and typedefs
56 //
57 
58 //
59 // static data member definitions
60 //
61 
62 //
63 // constructors and destructor
64 //
66 {
67  //now do what ever initialization is needed
68 
69 }
70 
71 
73 {
74 
75  // do anything here that needs to be done at desctruction time
76  // (e.g. close files, deallocate resources etc.)
77 
78 }
79 
80 
81 //
82 // member functions
83 //
84 // ------------ method called to for each event ------------
85 void
87 {
88  std::cout << "In the EveDisplayPlugin::analyze method..." << std::endl;
89  using namespace edm;
90 
92  iSetup.get<DisplayGeomRecord>().get(geom);
93 
94 
95  TEveManager::Create();
96 
97  TEveGeoTopNode* trk = new TEveGeoTopNode(const_cast<TGeoManager*>(geom.product()),
98  geom->GetTopNode());
99  trk->SetVisLevel(2);
100  gEve->AddGlobalElement(trk);
101 
102 }
103 
104 
105 //define this as a plug-in
DEFINE_FIREWORKS_GEOM_DISPLAY(EveDisplayPlugin)
virtual void run(const edm::EventSetup &) override
const T & get() const
Definition: EventSetup.h:55
tuple cout
Definition: gather_cfg.py:121