Main Page
Namespaces
Classes
Package Documentation
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
// $Id: EveDisplayPlugin.cc,v 1.21 2010/01/17 09:00:30 innocent Exp $
17
//
18
//
19
20
// system include files
21
#include <memory>
22
#include <iostream>
23
#include <sstream>
24
25
// user include files
26
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
27
#include "
Fireworks/Geometry/interface/DisplayPlugin.h
"
28
#include "
Fireworks/Geometry/interface/DisplayPluginFactory.h
"
29
30
#include "
Fireworks/Geometry/interface/DisplayGeomRecord.h
"
31
32
#include "
FWCore/Framework/interface/ESHandle.h
"
33
#include "
FWCore/Framework/interface/EventSetup.h
"
34
35
#include "TGeoManager.h"
36
#include "TEveManager.h"
37
#include "TEveGeoNode.h"
38
39
//
40
// class decleration
41
//
42
43
class
EveDisplayPlugin
:
public
fireworks::geometry::DisplayPlugin
{
44
45
public
:
46
explicit
EveDisplayPlugin
();
47
~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
//
66
EveDisplayPlugin::EveDisplayPlugin
()
67
{
68
//now do what ever initialization is needed
69
70
}
71
72
73
EveDisplayPlugin::~EveDisplayPlugin
()
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
87
EveDisplayPlugin::run
(
const
edm::EventSetup
& iSetup)
88
{
89
std::cout
<<
"In the EveDisplayPlugin::analyze method..."
<< std::endl;
90
using namespace
edm;
91
92
ESHandle<TGeoManager>
geom
;
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
107
DEFINE_FIREWORKS_GEOM_DISPLAY
(
EveDisplayPlugin
);
EveDisplayPlugin
Definition:
EveDisplayPlugin.cc:43
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
EveDisplayPlugin::run
virtual void run(const edm::EventSetup &)
Definition:
EveDisplayPlugin.cc:87
edm::EventSetup
Definition:
EventSetup.h:44
fireworks::geometry::DisplayPlugin
Definition:
DisplayPlugin.h:31
EveDisplayPlugin::~EveDisplayPlugin
~EveDisplayPlugin()
Definition:
EveDisplayPlugin.cc:73
DisplayGeomRecord
Definition:
DisplayGeomRecord.h:25
edm::EventSetup::get
const T & get() const
Definition:
EventSetup.h:55
DisplayPlugin.h
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:41
DisplayGeomRecord.h
EveDisplayPlugin::EveDisplayPlugin
EveDisplayPlugin()
Definition:
EveDisplayPlugin.cc:66
Generated for CMSSW Reference Manual by
1.8.5