Main Page
Namespaces
Classes
Package Documentation
GIT Directory
WorkBook
Offline Guide
Release schedule
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
// system include files
20
#include <memory>
21
#include <iostream>
22
#include <sstream>
23
24
// user include files
25
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
26
#include "
Fireworks/Geometry/interface/DisplayPlugin.h
"
27
#include "
Fireworks/Geometry/interface/DisplayPluginFactory.h
"
28
29
#include "
Fireworks/Geometry/interface/DisplayGeomRecord.h
"
30
31
#include "
FWCore/Framework/interface/ESHandle.h
"
32
#include "
FWCore/Framework/interface/EventSetup.h
"
33
34
#include "TGeoManager.h"
35
#include "TEveManager.h"
36
#include "TEveGeoNode.h"
37
38
//
39
// class decleration
40
//
41
42
class
EveDisplayPlugin
:
public
fireworks::geometry::DisplayPlugin
{
43
44
public
:
45
explicit
EveDisplayPlugin
();
46
~EveDisplayPlugin
();
47
48
49
private
:
50
virtual
void
run
(
const
edm::EventSetup
&)
override
;
51
52
};
53
54
//
55
// constants, enums and typedefs
56
//
57
58
//
59
// static data member definitions
60
//
61
62
//
63
// constructors and destructor
64
//
65
EveDisplayPlugin::EveDisplayPlugin
()
66
{
67
//now do what ever initialization is needed
68
69
}
70
71
72
EveDisplayPlugin::~EveDisplayPlugin
()
73
{
74
75
// do anything here that needs to be done at desctruction time
76
// (e.g. close files, deallocate resources etc.)
77
78
}
79
80
81
//
82
// member functions
83
//
84
// ------------ method called to for each event ------------
85
void
86
EveDisplayPlugin::run
(
const
edm::EventSetup
& iSetup)
87
{
88
std::cout
<<
"In the EveDisplayPlugin::analyze method..."
<< std::endl;
89
using namespace
edm;
90
91
ESHandle<TGeoManager>
geom
;
92
iSetup.
get
<
DisplayGeomRecord
>().
get
(
geom
);
93
94
95
TEveManager::Create();
96
97
TEveGeoTopNode* trk =
new
TEveGeoTopNode(const_cast<TGeoManager*>(
geom
.product()),
98
geom
->GetTopNode());
99
trk->SetVisLevel(2);
100
gEve->AddGlobalElement(trk);
101
102
}
103
104
105
//define this as a plug-in
106
DEFINE_FIREWORKS_GEOM_DISPLAY
(
EveDisplayPlugin
);
EveDisplayPlugin
Definition:
EveDisplayPlugin.cc:42
DEFINE_FIREWORKS_GEOM_DISPLAY
DEFINE_FIREWORKS_GEOM_DISPLAY(EveDisplayPlugin)
EventSetup.h
Frameworkfwd.h
DisplayPluginFactory.h
edm::ESHandle
Definition:
DTSurvey.h:22
relativeConstraints.geom
list geom
Definition:
relativeConstraints.py:71
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:44
EveDisplayPlugin::run
virtual void run(const edm::EventSetup &) override
Definition:
EveDisplayPlugin.cc:86
fireworks::geometry::DisplayPlugin
Definition:
DisplayPlugin.h:30
EveDisplayPlugin::~EveDisplayPlugin
~EveDisplayPlugin()
Definition:
EveDisplayPlugin.cc:72
DisplayGeomRecord
Definition:
DisplayGeomRecord.h:24
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:55
DisplayPlugin.h
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:121
DisplayGeomRecord.h
EveDisplayPlugin::EveDisplayPlugin
EveDisplayPlugin()
Definition:
EveDisplayPlugin.cc:65
Generated for CMSSW Reference Manual by
1.8.5