CMS 3D CMS Logo

FW3DView.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: cmsShow36
4 // Class : FW3DView
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author:
10 // Created: Wed Apr 7 14:40:47 CEST 2010
11 //
12 
13 // system include files
14 #include <functional>
15 
16 // user include files
17 #include "TGLViewer.h"
18 #include "TGLScenePad.h"
19 #include "TEveCalo.h"
20 #include "TEveScene.h"
21 
27 
28 //
29 // constants, enums and typedefs
30 //
31 
32 //
33 // static data member definitions
34 //
35 
36 //
37 // constructors and destructor
38 //
39 FW3DView::FW3DView(TEveWindowSlot* slot, FWViewType::EType typeId) : FW3DViewBase(slot, typeId), m_calo(nullptr) {
40  viewerGL()->CurrentCamera().SetFixDefCenter(kTRUE);
41 }
42 
43 FW3DView::~FW3DView() { m_calo->Destroy(); }
44 
45 TEveCaloViz* FW3DView::getEveCalo() const { return static_cast<TEveCaloViz*>(m_calo); }
46 
49 
50  TEveCaloData* data = context().getCaloData();
51  m_calo = new TEveCalo3D(data);
52  m_calo->SetElementName("calo barrel");
53 
54  m_calo->SetBarrelRadius(context().caloR1(false));
55  m_calo->SetEndCapPos(context().caloZ1(false));
56  m_calo->SetFrameTransparency(80);
57  m_calo->SetAutoRange(false);
58  m_calo->SetScaleAbs(true);
59  eventScene()->AddElement(m_calo);
60 }
fireworks::Context
Definition: Context.h:41
FW3DView::getEveCalo
TEveCaloViz * getEveCalo() const override
Definition: FW3DView.cc:45
FW3DViewBase::setContext
void setContext(const fireworks::Context &) override
Definition: FW3DViewBase.cc:169
FWViewType::EType
EType
Definition: FWViewType.h:31
FW3DView::m_calo
TEveCalo3D * m_calo
Definition: FW3DView.h:50
FW3DView::~FW3DView
~FW3DView() override
Definition: FW3DView.cc:43
FW3DView::setContext
void setContext(const fireworks::Context &) override
Definition: FW3DView.cc:47
FW3DView::FW3DView
FW3DView(TEveWindowSlot *, FWViewType::EType)
Definition: FW3DView.cc:39
FWEveView::eventScene
TEveScene * eventScene()
Definition: FWEveView.h:79
FWViewContext.h
FWEveView::context
const fireworks::Context & context()
Definition: FWEveView.h:64
FWPFGeom::caloR1
float caloR1()
Definition: FWPFGeom.h:20
FWPFGeom::caloZ1
float caloZ1()
Definition: FWPFGeom.h:21
FW3DViewBase
Definition: FW3DViewBase.h:42
CmsShowViewPopup.h
fireworks::Context::getCaloData
TEveCaloDataHist * getCaloData() const
Definition: Context.h:69
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
FWEveView::viewerGL
TGLViewer * viewerGL() const
Definition: FWEveView.cc:177
FWViewEnergyScale.h
Context.h
FW3DView.h