CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
FWDetailViewBase Class Referenceabstract

#include <Fireworks/Core/interface/FWDetailViewBase.h>

Inheritance diagram for FWDetailViewBase:
FWDetailView< T > FWDetailView< CaloTower > FWDetailView< reco::Conversion > FWDetailView< reco::GsfElectron > FWDetailView< reco::Muon > FWDetailView< reco::Photon > FWDetailView< reco::Track > FWDetailViewCanvas< T > FWDetailViewGL< T > FWDetailViewGL< CaloTower > FWDetailViewGL< reco::Conversion > FWDetailViewGL< reco::GsfElectron > FWDetailViewGL< reco::Muon > FWDetailViewGL< reco::Photon > FWDetailViewCanvas< reco::Track > FWDetailViewGL< reco::Track >

Public Member Functions

void build (const FWModelId &)
 
const fireworks::Contextcontext () const
 
virtual void init (TEveWindowSlot *)=0
 
const FWEventItemitem ()
 
virtual void setBackgroundColor (Color_t col)
 
void setItem (const FWEventItem *x)
 
virtual ~FWDetailViewBase ()
 

Static Public Member Functions

static void drawCanvasBox (Double_t *pos, Color_t fillCol, Int_t fillType=0, bool bg=kTRUE)
 
static void drawCanvasDot (Float_t x, Float_t y, Float_t r, Color_t)
 

Protected Member Functions

 FWDetailViewBase (const std::type_info &)
 

Private Member Functions

virtual void build (const FWModelId &, const void *)=0
 
 FWDetailViewBase (const FWDetailViewBase &)
 
const FWDetailViewBaseoperator= (const FWDetailViewBase &)
 

Private Attributes

FWSimpleProxyHelper m_helper
 
const FWEventItemm_item
 

Detailed Description

Description: Base class for detailed views

Usage: <usage>

Definition at line 32 of file FWDetailViewBase.h.

Constructor & Destructor Documentation

FWDetailViewBase::~FWDetailViewBase ( )
virtual

Definition at line 30 of file FWDetailViewBase.cc.

31 {
32 }
FWDetailViewBase::FWDetailViewBase ( const std::type_info &  iInfo)
protected

Definition at line 24 of file FWDetailViewBase.cc.

24  :
25  m_item(0),
26  m_helper(iInfo)
27 {
28 }
FWSimpleProxyHelper m_helper
const FWEventItem * m_item
FWDetailViewBase::FWDetailViewBase ( const FWDetailViewBase )
private

Member Function Documentation

void FWDetailViewBase::build ( const FWModelId iID)

Definition at line 36 of file FWDetailViewBase.cc.

References FWModelId::index(), FWModelId::item(), FWSimpleProxyHelper::itemChanged(), m_helper, FWEventItem::modelData(), and FWSimpleProxyHelper::offsetObject().

37 {
38  m_helper.itemChanged(iID.item());
39  build(iID, m_helper.offsetObject(iID.item()->modelData(iID.index())));
40 }
FWSimpleProxyHelper m_helper
const void * offsetObject(const void *iObj) const
void build(const FWModelId &)
int index() const
Definition: FWModelId.h:50
const void * modelData(int iIndex) const
Definition: FWEventItem.cc:567
const FWEventItem * item() const
Definition: FWModelId.h:45
void itemChanged(const FWEventItem *)
virtual void FWDetailViewBase::build ( const FWModelId ,
const void *   
)
privatepure virtual
const fireworks::Context & FWDetailViewBase::context ( ) const

Definition at line 43 of file FWDetailViewBase.cc.

References FWEventItem::context(), and m_item.

Referenced by FWTrackHitsDetailView::build(), and FWConvTrackHitsDetailView::build().

43  {
44  return m_item->context();
45 }
const fireworks::Context & context() const
Definition: FWEventItem.h:127
const FWEventItem * m_item
void FWDetailViewBase::drawCanvasBox ( Double_t *  pos,
Color_t  fillCol,
Int_t  fillType = 0,
bool  bg = kTRUE 
)
static

Definition at line 69 of file FWDetailViewBase.cc.

Referenced by FWTrackResidualDetailView::build(), FWECALDetailViewBuilder::makeLegend(), FWTrackHitsDetailView::setTextInfo(), and FWTrackResidualDetailView::setTextInfo().

70 {
71  // utility function to draw outline box
72 
73  // background
74  if (bg)
75  {
76  TBox *b1 = new TBox(pos[0], pos[1], pos[2], pos[3]);
77  b1->SetFillColor(fillCol);
78  b1->Draw();
79  }
80 
81  // fill (top layer)
82  TBox *b2 = new TBox(pos[0], pos[1], pos[2], pos[3]);
83  b2->SetFillStyle(fillType);
84  b2->SetFillColor(kBlack);
85  b2->Draw();
86 
87  //outline
88  TBox *b3 = new TBox(pos[0], pos[1], pos[2], pos[3]);
89  b3->SetFillStyle(0);
90  b3->SetLineWidth(2);
91  b3->Draw();
92 }
void FWDetailViewBase::drawCanvasDot ( Float_t  x,
Float_t  y,
Float_t  r,
Color_t  fillColor 
)
static

Definition at line 50 of file FWDetailViewBase.cc.

Referenced by FWTrackHitsDetailView::setTextInfo().

51 {
52  // utility function to draw outline cricle
53 
54  Float_t ratio = 0.5;
55  // fill
56  TEllipse *b2 = new TEllipse(x, y, r, r*ratio);
57  b2->SetFillStyle(1001);
58  b2->SetFillColor(fillColor);
59  b2->Draw();
60 
61  // outline
62  TEllipse *b1 = new TEllipse(x, y, r, r*ratio);
63  b1->SetFillStyle(0);
64  b1->SetLineWidth(2);
65  b1->Draw();
66 }
Definition: DDAxes.h:10
virtual void FWDetailViewBase::init ( TEveWindowSlot *  )
pure virtual
const FWEventItem* FWDetailViewBase::item ( )
inline
const FWDetailViewBase& FWDetailViewBase::operator= ( const FWDetailViewBase )
private
virtual void FWDetailViewBase::setBackgroundColor ( Color_t  col)
inlinevirtual
void FWDetailViewBase::setItem ( const FWEventItem x)
inline

Member Data Documentation

FWSimpleProxyHelper FWDetailViewBase::m_helper
private

Definition at line 60 of file FWDetailViewBase.h.

Referenced by build().

const FWEventItem* FWDetailViewBase::m_item
private

Definition at line 59 of file FWDetailViewBase.h.

Referenced by context(), item(), and setItem().