Main Page
Namespaces
Classes
Package Documentation
Fireworks
Geometry
plugins
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
31
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
32
#include "
Fireworks/Geometry/interface/DisplayPlugin.h
"
33
#include "
Fireworks/Geometry/interface/DisplayPluginFactory.h
"
34
35
#include "
Fireworks/Geometry/interface/DisplayGeomRecord.h
"
36
37
#include "
FWCore/Framework/interface/ESHandle.h
"
38
#include "
FWCore/Framework/interface/EventSetup.h
"
39
40
#include "TGeoManager.h"
41
#include "TEveManager.h"
42
#include "TEveGeoNode.h"
43
44
//
45
// class decleration
46
//
47
48
class
EveDisplayPlugin
:
public
fireworks::geometry::DisplayPlugin
{
49
50
public
:
51
explicit
EveDisplayPlugin
();
52
~EveDisplayPlugin
()
override
;
53
54
55
private
:
56
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
//
71
EveDisplayPlugin::EveDisplayPlugin
()
72
{
73
//now do what ever initialization is needed
74
75
}
76
77
78
EveDisplayPlugin::~EveDisplayPlugin
()
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
92
EveDisplayPlugin::run
(
const
edm::EventSetup
& iSetup)
93
{
94
std::cout
<<
"In the EveDisplayPlugin::analyze method..."
<< std::endl;
95
using namespace
edm
;
96
97
ESHandle<TGeoManager>
geom
;
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
110
DEFINE_FIREWORKS_GEOM_DISPLAY
(
EveDisplayPlugin
);
EveDisplayPlugin
Definition:
EveDisplayPlugin.cc:48
EventSetup.h
EveDisplayPlugin::~EveDisplayPlugin
~EveDisplayPlugin() override
Definition:
EveDisplayPlugin.cc:78
Frameworkfwd.h
DisplayPluginFactory.h
edm::ESHandle
Definition:
DTSurvey.h:22
DEFINE_FIREWORKS_GEOM_DISPLAY
#define DEFINE_FIREWORKS_GEOM_DISPLAY(type)
Definition:
DisplayPluginFactory.h:34
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:57
EveDisplayPlugin::run
void run(const edm::EventSetup &) override
Definition:
EveDisplayPlugin.cc:92
fireworks::geometry::DisplayPlugin
Definition:
DisplayPlugin.h:30
relativeConstraints.geom
geom
Definition:
relativeConstraints.py:72
DisplayGeomRecord
Definition:
DisplayGeomRecord.h:24
DisplayPlugin.h
edm
HLT enums.
Definition:
AlignableModifier.h:17
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:71
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
DisplayGeomRecord.h
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
EveDisplayPlugin::EveDisplayPlugin
EveDisplayPlugin()
Definition:
EveDisplayPlugin.cc:71
Generated for CMSSW Reference Manual by
1.8.11