CMS 3D CMS Logo

FWEveLegoView.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Core
4 // Class : FWEveLegoView
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author:
10 // Created: Mon May 31 13:09:53 CEST 2010
11 //
12 
13 // system include files
14 #include "TEveManager.h"
15 
16 // user include files
17 #include "TEveCalo.h"
18 #include "TEveStraightLineSet.h"
25 
28 
29 
30 
31 
32 //
33 // constructors and destructor
34 //
35 FWEveLegoView::FWEveLegoView(TEveWindowSlot* slot, FWViewType::EType typeId):
36  FWLegoViewBase(slot, typeId),
37  m_boundaries(nullptr)
38 {
39 }
40 
41 
43 {
44 }
45 
46 void
48 {
50 
51  // add calorimeter boundaries
52  m_boundaries = new TEveStraightLineSet("m_boundaries");
53  m_boundaries->SetPickable(kFALSE);
54  m_boundaries->SetLineWidth(2);
55  m_boundaries->SetLineStyle(7);
56  m_boundaries->AddLine(-1.479,-3.1416,0.001,-1.479,3.1416,0.001);
57  m_boundaries->AddLine(1.479,-3.1416,0.001,1.479,3.1416,0.001);
58  m_boundaries->AddLine(-2.964,-3.1416,0.001,-2.964,3.1416,0.001);
59  m_boundaries->AddLine(2.964,-3.1416,0.001,2.964,3.1416,0.001);
60  m_boundaries->SetLineColor(ctx.colorManager()->isColorSetDark() ? kGray+2 : kGray+1);
61  m_lego->AddElement(m_boundaries);
62 }
63 
64 void
66 {
67  m_boundaries->SetLineColor(context().colorManager()->isColorSetDark() ? kGray+2 : kGray+1);
69 }
void setContext(const fireworks::Context &) override
FWEveLegoView(TEveWindowSlot *, FWViewType::EType)
void setBackgroundColor(Color_t) override
FWColorManager * colorManager() const
Definition: Context.h:65
#define nullptr
~FWEveLegoView() override
Bool_t isColorSetDark() const
TEveCaloLego * m_lego
void setContext(const fireworks::Context &) override
const fireworks::Context & context()
Definition: FWEveView.h:67
TEveStraightLineSet * m_boundaries
Definition: FWEveLegoView.h:46
virtual void setBackgroundColor(Color_t)
Definition: FWEveView.cc:258