CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 <boost/bind.hpp>
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):
40  FW3DViewBase(slot, typeId),
41  m_calo(0)
42 {
43  viewerGL()->CurrentCamera().SetFixDefCenter(kTRUE);
44 }
45 
47 {
48  m_calo->Destroy();
49 }
50 
51 
52 TEveCaloViz*
54 {
55  return static_cast<TEveCaloViz*>(m_calo);
56 }
57 
59 {
61 
62  TEveCaloData* data = context().getCaloData();
63  m_calo = new TEveCalo3D(data);
64  m_calo->SetElementName("calo barrel");
65 
66  m_calo->SetBarrelRadius(context().caloR1(false));
67  m_calo->SetEndCapPos(context().caloZ1(false));
68  m_calo->SetFrameTransparency(80);
69  m_calo->SetAutoRange(false);
70  m_calo->SetScaleAbs(true);
71  eventScene()->AddElement(m_calo);
72 }
TEveScene * eventScene()
Definition: FWEveView.h:75
FW3DView(TEveWindowSlot *, FWViewType::EType)
Definition: FW3DView.cc:39
virtual void setContext(const fireworks::Context &)
Definition: FW3DView.cc:58
TGLViewer * viewerGL() const
Definition: FWEveView.cc:197
float caloR1()
Definition: FWPFGeom.h:21
virtual void setContext(const fireworks::Context &)
TEveCaloDataHist * getCaloData() const
Definition: Context.h:80
virtual ~FW3DView()
Definition: FW3DView.cc:46
const fireworks::Context & context()
Definition: FWEveView.h:64
float caloZ1()
Definition: FWPFGeom.h:22
virtual TEveCaloViz * getEveCalo() const
Definition: FW3DView.cc:53
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
TEveCalo3D * m_calo
Definition: FW3DView.h:52