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
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
//
68
EveDisplayPlugin::EveDisplayPlugin
() {
69
//now do what ever initialization is needed
70
}
71
72
EveDisplayPlugin::~EveDisplayPlugin
() {
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 ------------
81
void
EveDisplayPlugin::run
(
const
edm::EventSetup
& iSetup) {
82
std::cout
<<
"In the EveDisplayPlugin::analyze method..."
<< std::endl;
83
using namespace
edm
;
84
85
ESHandle<TGeoManager>
geom
;
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
96
DEFINE_FIREWORKS_GEOM_DISPLAY
(
EveDisplayPlugin
);
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:80
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
Generated for CMSSW Reference Manual by
1.8.16