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 &)=delete
 
const FWDetailViewBaseoperator= (const FWDetailViewBase &)=delete
 

Private Attributes

FWSimpleProxyHelper m_helper
 
const FWEventItemm_item
 

Detailed Description

Description: Base class for detailed views

Usage: <usage>

Definition at line 35 of file FWDetailViewBase.h.

Constructor & Destructor Documentation

FWDetailViewBase::~FWDetailViewBase ( )
virtual

Definition at line 25 of file FWDetailViewBase.cc.

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

Definition at line 23 of file FWDetailViewBase.cc.

23 : m_item(nullptr), m_helper(iInfo) {}
FWSimpleProxyHelper m_helper
const FWEventItem * m_item
FWDetailViewBase::FWDetailViewBase ( const FWDetailViewBase )
privatedelete

Member Function Documentation

void FWDetailViewBase::build ( const FWModelId iID)

Definition at line 27 of file FWDetailViewBase.cc.

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

27  {
28  m_helper.itemChanged(iID.item());
29  build(iID, m_helper.offsetObject(iID.item()->modelData(iID.index())));
30 }
FWSimpleProxyHelper m_helper
const void * offsetObject(const void *iObj) const
void build(const FWModelId &)
int index() const
Definition: FWModelId.h:41
const void * modelData(int iIndex) const
Definition: FWEventItem.cc:466
const FWEventItem * item() const
Definition: FWModelId.h:39
void itemChanged(const FWEventItem *)
virtual void FWDetailViewBase::build ( const FWModelId ,
const void *   
)
privatepure virtual
const fireworks::Context & FWDetailViewBase::context ( ) const

Definition at line 32 of file FWDetailViewBase.cc.

References FWEventItem::context(), and m_item.

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

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

Definition at line 53 of file FWDetailViewBase.cc.

References testProducerWithPsetDescEmpty_cfi::b3.

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

53  {
54  // utility function to draw outline box
55 
56  // background
57  if (bg) {
58  TBox *b1 = new TBox(pos[0], pos[1], pos[2], pos[3]);
59  b1->SetFillColor(fillCol);
60  b1->Draw();
61  }
62 
63  // fill (top layer)
64  TBox *b2 = new TBox(pos[0], pos[1], pos[2], pos[3]);
65  b2->SetFillStyle(fillType);
66  b2->SetFillColor(kBlack);
67  b2->Draw();
68 
69  //outline
70  TBox *b3 = new TBox(pos[0], pos[1], pos[2], pos[3]);
71  b3->SetFillStyle(0);
72  b3->SetLineWidth(2);
73  b3->Draw();
74 }
void FWDetailViewBase::drawCanvasDot ( Float_t  x,
Float_t  y,
Float_t  r,
Color_t  fillColor 
)
static

Definition at line 36 of file FWDetailViewBase.cc.

References particleFlowDisplacedVertex_cfi::ratio.

Referenced by FWTrackHitsDetailView::setTextInfo().

36  {
37  // utility function to draw outline cricle
38 
39  Float_t ratio = 0.5;
40  // fill
41  TEllipse *b2 = new TEllipse(x, y, r, r * ratio);
42  b2->SetFillStyle(1001);
43  b2->SetFillColor(fillColor);
44  b2->Draw();
45 
46  // outline
47  TEllipse *b1 = new TEllipse(x, y, r, r * ratio);
48  b1->SetFillStyle(0);
49  b1->SetLineWidth(2);
50  b1->Draw();
51 }
virtual void FWDetailViewBase::init ( TEveWindowSlot *  )
pure virtual
const FWEventItem* FWDetailViewBase::item ( )
inline
const FWDetailViewBase& FWDetailViewBase::operator= ( const FWDetailViewBase )
privatedelete
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 62 of file FWDetailViewBase.h.

Referenced by build().

const FWEventItem* FWDetailViewBase::m_item
private

Definition at line 61 of file FWDetailViewBase.h.

Referenced by context().