test
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 #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 
50  public:
51  explicit EveDisplayPlugin();
53 
54 
55  private:
56  virtual void run(const edm::EventSetup&) override;
57 
58 };
59 
60 //
61 // constants, enums and typedefs
62 //
63 
64 //
65 // static data member definitions
66 //
67 
68 //
69 // constructors and destructor
70 //
72 {
73  //now do what ever initialization is needed
74 
75 }
76 
77 
79 {
80 
81  // do anything here that needs to be done at desctruction time
82  // (e.g. close files, deallocate resources etc.)
83 
84 }
85 
86 
87 //
88 // member functions
89 //
90 // ------------ method called to for each event ------------
91 void
93 {
94  std::cout << "In the EveDisplayPlugin::analyze method..." << std::endl;
95  using namespace edm;
96 
98  iSetup.get<DisplayGeomRecord>().get(geom);
99 
100  TEveManager::Create();
101 
102  TEveGeoTopNode* trk = new TEveGeoTopNode(const_cast<TGeoManager*>(geom.product()),
103  geom->GetTopNode());
104  trk->SetVisLevel(2);
105  gEve->AddGlobalElement(trk);
106 }
107 
108 
109 //define this as a plug-in
#define DEFINE_FIREWORKS_GEOM_DISPLAY(type)
virtual void run(const edm::EventSetup &) override
const T & get() const
Definition: EventSetup.h:56
tuple cout
Definition: gather_cfg.py:145