CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // $Id: FWEveLegoView.cc,v 1.89 2011/11/18 02:57:07 amraktad Exp $
12 //
13 
14 // system include files
15 #include "TEveManager.h"
16 
17 // user include files
18 #include "TEveCalo.h"
19 #include "TEveStraightLineSet.h"
26 
29 
30 
31 
32 
33 //
34 // constructors and destructor
35 //
36 FWEveLegoView::FWEveLegoView(TEveWindowSlot* slot, FWViewType::EType typeId):
37  FWLegoViewBase(slot, typeId),
38  m_boundaries(0)
39 {
40 }
41 
42 
44 {
45 }
46 
47 void
49 {
51 
52  // add calorimeter boundaries
53  m_boundaries = new TEveStraightLineSet("m_boundaries");
54  m_boundaries->SetPickable(kFALSE);
55  m_boundaries->SetLineWidth(2);
56  m_boundaries->SetLineStyle(7);
57  m_boundaries->AddLine(-1.479,-3.1416,0.001,-1.479,3.1416,0.001);
58  m_boundaries->AddLine(1.479,-3.1416,0.001,1.479,3.1416,0.001);
59  m_boundaries->AddLine(-2.964,-3.1416,0.001,-2.964,3.1416,0.001);
60  m_boundaries->AddLine(2.964,-3.1416,0.001,2.964,3.1416,0.001);
61  m_boundaries->SetLineColor(ctx.colorManager()->isColorSetDark() ? kGray+2 : kGray+1);
62  m_lego->AddElement(m_boundaries);
63 }
64 
65 void
67 {
68  m_boundaries->SetLineColor(context().colorManager()->isColorSetDark() ? kGray+2 : kGray+1);
70 }
FWEveLegoView(TEveWindowSlot *, FWViewType::EType)
FWColorManager * colorManager() const
Definition: Context.h:66
Bool_t isColorSetDark() const
virtual void setContext(const fireworks::Context &)
virtual void setBackgroundColor(Color_t)
virtual void setContext(const fireworks::Context &)
TEveCaloLego * m_lego
const fireworks::Context & context()
Definition: FWEveView.h:65
TEveStraightLineSet * m_boundaries
Definition: FWEveLegoView.h:47
virtual ~FWEveLegoView()
virtual void setBackgroundColor(Color_t)
Definition: FWEveView.cc:254