CMS 3D CMS Logo

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::Candidate > FWDetailView< reco::Conversion > FWDetailView< reco::GsfElectron > FWDetailView< reco::Muon > FWDetailView< reco::PFCandidate > FWDetailView< reco::Photon > FWDetailView< reco::Track > FWDetailView< reco::TrackBase >

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 29 of file FWDetailViewBase.cc.

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

Definition at line 23 of file FWDetailViewBase.cc.

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

Member Function Documentation

void FWDetailViewBase::build ( const FWModelId iID)

Definition at line 35 of file FWDetailViewBase.cc.

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

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

Definition at line 42 of file FWDetailViewBase.cc.

References FWEventItem::context(), and m_item.

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

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

Definition at line 68 of file FWDetailViewBase.cc.

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

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

Definition at line 49 of file FWDetailViewBase.cc.

References particleFlowDisplacedVertex_cfi::ratio.

Referenced by FWTrackHitsDetailView::setTextInfo().

50 {
51  // utility function to draw outline cricle
52 
53  Float_t ratio = 0.5;
54  // fill
55  TEllipse *b2 = new TEllipse(x, y, r, r*ratio);
56  b2->SetFillStyle(1001);
57  b2->SetFillColor(fillColor);
58  b2->Draw();
59 
60  // outline
61  TEllipse *b1 = new TEllipse(x, y, r, r*ratio);
62  b1->SetFillStyle(0);
63  b1->SetLineWidth(2);
64  b1->Draw();
65 }
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().