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 // $Id: EveDisplayPlugin.cc,v 1.1 2010/04/01 21:58:00 chrjones Exp $
17 //
18 //
19 
20 // system include files
21 #include <memory>
22 #include <iostream>
23 #include <sstream>
24 
25 // user include files
29 
31 
34 
35 #include "TGeoManager.h"
36 #include "TEveManager.h"
37 #include "TEveGeoNode.h"
38 
39 //
40 // class decleration
41 //
42 
44 
45  public:
46  explicit EveDisplayPlugin();
48 
49 
50  private:
51  virtual void run(const edm::EventSetup&);
52 
53 };
54 
55 //
56 // constants, enums and typedefs
57 //
58 
59 //
60 // static data member definitions
61 //
62 
63 //
64 // constructors and destructor
65 //
67 {
68  //now do what ever initialization is needed
69 
70 }
71 
72 
74 {
75 
76  // do anything here that needs to be done at desctruction time
77  // (e.g. close files, deallocate resources etc.)
78 
79 }
80 
81 
82 //
83 // member functions
84 //
85 // ------------ method called to for each event ------------
86 void
88 {
89  std::cout << "In the EveDisplayPlugin::analyze method..." << std::endl;
90  using namespace edm;
91 
93  iSetup.get<DisplayGeomRecord>().get(geom);
94 
95 
96  TEveManager::Create();
97 
98  TEveGeoTopNode* trk = new TEveGeoTopNode(const_cast<TGeoManager*>(geom.product()),
99  geom->GetTopNode());
100  trk->SetVisLevel(2);
101  gEve->AddGlobalElement(trk);
102 
103 }
104 
105 
106 //define this as a plug-in
DEFINE_FIREWORKS_GEOM_DISPLAY(EveDisplayPlugin)
virtual void run(const edm::EventSetup &)
const T & get() const
Definition: EventSetup.h:55
tuple cout
Definition: gather_cfg.py:121