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
 
 FWDetailViewBase (const FWDetailViewBase &)=delete
 
virtual void init (TEveWindowSlot *)=0
 
const FWEventItemitem ()
 
const FWDetailViewBaseoperator= (const FWDetailViewBase &)=delete
 
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
 

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::~FWDetailViewBase ( )
virtual

Definition at line 25 of file FWDetailViewBase.cc.

25 {}

◆ FWDetailViewBase() [1/2]

FWDetailViewBase::FWDetailViewBase ( const FWDetailViewBase )
delete

◆ FWDetailViewBase() [2/2]

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

Member Function Documentation

◆ build() [1/2]

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 }
const void * modelData(int iIndex) const
Definition: FWEventItem.cc:466
FWSimpleProxyHelper m_helper
int index() const
Definition: FWModelId.h:41
void build(const FWModelId &)
const FWEventItem * item() const
Definition: FWModelId.h:39
const void * offsetObject(const void *iObj) const
void itemChanged(const FWEventItem *)

◆ build() [2/2]

virtual void FWDetailViewBase::build ( const FWModelId ,
const void *   
)
privatepure virtual

◆ context()

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

◆ drawCanvasBox()

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 b1, b2, and 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 }
weight_default_t b3[10]
Definition: b3.h:9
weight_default_t b1[25]
Definition: b1.h:9
weight_default_t b2[10]
Definition: b2.h:9

◆ drawCanvasDot()

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 b1, b2, RecoTauValidation_cfi::fillColor, alignCSCRings::r, particleFlowDisplacedVertex_cfi::ratio, x, and y.

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 }
weight_default_t b1[25]
Definition: b1.h:9
weight_default_t b2[10]
Definition: b2.h:9

◆ init()

virtual void FWDetailViewBase::init ( TEveWindowSlot *  )
pure virtual

◆ item()

const FWEventItem* FWDetailViewBase::item ( )
inline

◆ operator=()

const FWDetailViewBase& FWDetailViewBase::operator= ( const FWDetailViewBase )
delete

◆ setBackgroundColor()

virtual void FWDetailViewBase::setBackgroundColor ( Color_t  col)
inlinevirtual

◆ setItem()

void FWDetailViewBase::setItem ( const FWEventItem x)
inline

Definition at line 49 of file FWDetailViewBase.h.

References m_item, and x.

Referenced by FWDetailView< reco::Muon >::build().

49 { m_item = x; }
const FWEventItem * m_item

Member Data Documentation

◆ m_helper

FWSimpleProxyHelper FWDetailViewBase::m_helper
private

Definition at line 62 of file FWDetailViewBase.h.

Referenced by build().

◆ m_item

const FWEventItem* FWDetailViewBase::m_item
private

Definition at line 61 of file FWDetailViewBase.h.

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