Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
();
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
//
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
Frameworkfwd.h
DisplayPluginFactory.h
edm::ESHandle
Definition:
DTSurvey.h:22
relativeConstraints.geom
list geom
Definition:
relativeConstraints.py:71
DEFINE_FIREWORKS_GEOM_DISPLAY
#define DEFINE_FIREWORKS_GEOM_DISPLAY(type)
Definition:
DisplayPluginFactory.h:34
ESHandle.h
edm::EventSetup
Definition:
EventSetup.h:45
EveDisplayPlugin::run
virtual void run(const edm::EventSetup &) override
Definition:
EveDisplayPlugin.cc:92
fireworks::geometry::DisplayPlugin
Definition:
DisplayPlugin.h:30
EveDisplayPlugin::~EveDisplayPlugin
~EveDisplayPlugin()
Definition:
EveDisplayPlugin.cc:78
DisplayGeomRecord
Definition:
DisplayGeomRecord.h:24
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:56
DisplayPlugin.h
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:145
DisplayGeomRecord.h
EveDisplayPlugin::EveDisplayPlugin
EveDisplayPlugin()
Definition:
EveDisplayPlugin.cc:71
Generated for CMSSW Reference Manual by
1.8.5