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 // constructors and destructor
31 //
32 FWEveLegoView::FWEveLegoView(TEveWindowSlot* slot, FWViewType::EType typeId)
33  : FWLegoViewBase(slot, typeId), m_boundaries(nullptr) {}
34 
36 
39 
40  // add calorimeter boundaries
41  m_boundaries = new TEveStraightLineSet("m_boundaries");
42  m_boundaries->SetPickable(kFALSE);
43  m_boundaries->SetLineWidth(2);
44  m_boundaries->SetLineStyle(7);
45  m_boundaries->AddLine(-1.479, -3.1416, 0.001, -1.479, 3.1416, 0.001);
46  m_boundaries->AddLine(1.479, -3.1416, 0.001, 1.479, 3.1416, 0.001);
47  m_boundaries->AddLine(-2.964, -3.1416, 0.001, -2.964, 3.1416, 0.001);
48  m_boundaries->AddLine(2.964, -3.1416, 0.001, 2.964, 3.1416, 0.001);
49  m_boundaries->SetLineColor(ctx.colorManager()->isColorSetDark() ? kGray + 2 : kGray + 1);
50  m_lego->AddElement(m_boundaries);
51 }
52 
54  m_boundaries->SetLineColor(context().colorManager()->isColorSetDark() ? kGray + 2 : kGray + 1);
56 }
fireworks::Context
Definition: Context.h:41
FWViewType::EType
EType
Definition: FWViewType.h:31
fireworks::Context::colorManager
FWColorManager * colorManager() const
Definition: Context.h:58
FWColorManager::isColorSetDark
Bool_t isColorSetDark() const
Definition: FWColorManager.h:57
FWEveLegoView::~FWEveLegoView
~FWEveLegoView() override
Definition: FWEveLegoView.cc:35
FWEveLegoView::FWEveLegoView
FWEveLegoView(TEveWindowSlot *, FWViewType::EType)
Definition: FWEveLegoView.cc:32
FWLegoViewBase
Definition: FWLegoViewBase.h:39
FWViewContext.h
FWEveView::context
const fireworks::Context & context()
Definition: FWEveView.h:64
FWColorManager.h
FWEveLegoView::setContext
void setContext(const fireworks::Context &) override
Definition: FWEveLegoView.cc:37
FWEveView::setBackgroundColor
virtual void setBackgroundColor(Color_t)
Definition: FWEveView.cc:222
FWLegoViewBase::m_lego
TEveCaloLego * m_lego
Definition: FWLegoViewBase.h:58
fwLog.h
FWEveLegoView::setBackgroundColor
void setBackgroundColor(Color_t) override
Definition: FWEveLegoView.cc:53
FWEveLegoView.h
FWLegoViewBase::setContext
void setContext(const fireworks::Context &) override
Definition: FWLegoViewBase.cc:88
FWViewEnergyScale.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
FWGUIManager.h
Context.h
FWEveLegoView::m_boundaries
TEveStraightLineSet * m_boundaries
Definition: FWEveLegoView.h:45