CMS 3D CMS Logo

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 #include "TROOT.h"
20 #include "TSystem.h"
21 #include "TColor.h"
22 #include "TStyle.h"
23 #include "TEnv.h"
24 
25 // system include files
26 #include <memory>
27 #include <iostream>
28 #include <sstream>
29 
30 // user include files
34 
36 
39 
40 #include "TGeoManager.h"
41 #include "TEveManager.h"
42 #include "TEveGeoNode.h"
43 
44 //
45 // class decleration
46 //
47 
49 public:
50  explicit EveDisplayPlugin();
51  ~EveDisplayPlugin() override;
52 
53 private:
54  void run(const edm::EventSetup&) override;
55 };
56 
57 //
58 // constants, enums and typedefs
59 //
60 
61 //
62 // static data member definitions
63 //
64 
65 //
66 // constructors and destructor
67 //
69  //now do what ever initialization is needed
70 }
71 
73  // do anything here that needs to be done at desctruction time
74  // (e.g. close files, deallocate resources etc.)
75 }
76 
77 //
78 // member functions
79 //
80 // ------------ method called to for each event ------------
82  std::cout << "In the EveDisplayPlugin::analyze method..." << std::endl;
83  using namespace edm;
84 
86  iSetup.get<DisplayGeomRecord>().get(geom);
87 
88  TEveManager::Create();
89 
90  TEveGeoTopNode* trk = new TEveGeoTopNode(const_cast<TGeoManager*>(geom.product()), geom->GetTopNode());
91  trk->SetVisLevel(2);
92  gEve->AddGlobalElement(trk);
93 }
94 
95 //define this as a plug-in
ESHandle.h
fireworks::geometry::DisplayPlugin
Definition: DisplayPlugin.h:32
edm
HLT enums.
Definition: AlignableModifier.h:19
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DEFINE_FIREWORKS_GEOM_DISPLAY
#define DEFINE_FIREWORKS_GEOM_DISPLAY(type)
Definition: DisplayPluginFactory.h:34
DisplayPlugin.h
EveDisplayPlugin::run
void run(const edm::EventSetup &) override
Definition: EveDisplayPlugin.cc:81
EveDisplayPlugin::EveDisplayPlugin
EveDisplayPlugin()
Definition: EveDisplayPlugin.cc:68
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
edm::ESHandle
Definition: DTSurvey.h:22
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
EveDisplayPlugin::~EveDisplayPlugin
~EveDisplayPlugin() override
Definition: EveDisplayPlugin.cc:72
EveDisplayPlugin
Definition: EveDisplayPlugin.cc:48
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
DisplayGeomRecord.h
Frameworkfwd.h
EventSetup.h
DisplayPluginFactory.h
DisplayGeomRecord
Definition: DisplayGeomRecord.h:24