CMS 3D CMS Logo

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

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

Inheritance diagram for FWDigitSetProxyBuilder:
FWProxyBuilderBase FWCastorRecHitProxyBuilder FWEcalRecHitProxyBuilder FWHBHERecHitProxyBuilder FWHFRecHitProxyBuilder FWHORecHitProxyBuilder FWPCaloHitProxyBuilder FWPRCaloTowerProxyBuilder FWZDCRecHitProxyBuilder

Classes

struct  BFreeBox_t
 

Public Member Functions

 FWDigitSetProxyBuilder ()
 
virtual bool willHandleInteraction () const
 
virtual ~FWDigitSetProxyBuilder ()
 
- Public Member Functions inherited from FWProxyBuilderBase
void build ()
 
virtual bool canHandle (const FWEventItem &)
 
const fireworks::Contextcontext () const
 
TEveElementList * createProduct (FWViewType::EType, const FWViewContext *)
 
 FWProxyBuilderBase ()
 
bool getHaveWindow () const
 
virtual bool havePerViewProduct (FWViewType::EType) const
 
virtual bool haveSingleProduct () const
 
const FWEventItemitem () const
 
virtual void itemBeingDestroyed (const FWEventItem *)
 
void itemChanged (const FWEventItem *)
 
int layer () const
 
void modelChanges (const FWModelIds &)
 
void removePerViewProduct (FWViewType::EType, const FWViewContext *vc)
 
void scaleChanged (const FWViewContext *)
 
void setHaveWindow (bool iFlag)
 
virtual void setInteractionList (FWInteractionList *, const std::string &)
 
void setItem (const FWEventItem *iItem)
 
void setupAddElement (TEveElement *el, TEveElement *parent, bool set_color=true) const
 
void setupElement (TEveElement *el, bool color=true) const
 
virtual ~FWProxyBuilderBase ()
 

Protected Member Functions

void addBox (TEveBoxSet *set, const float *pnts, const FWDisplayProperties &dp)
 
TEveBoxSet * addBoxSetToProduct (TEveElementList *product)
 
TEveBoxSet * getBoxSet () const
 
- Protected Member Functions inherited from FWProxyBuilderBase
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
virtual void clean ()
 
virtual void cleanLocal ()
 
TEveCompound * createCompound (bool set_color=true, bool propagate_color_to_all_children=false) const
 
 FWProxyBuilderBase (const FWProxyBuilderBase &)
 
void increaseComponentTransparency (unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset)
 
virtual void localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)
 
const FWProxyBuilderBaseoperator= (const FWProxyBuilderBase &)
 
virtual void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
 
virtual bool visibilityModelChanges (const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *)
 

Private Member Functions

TEveDigitSet * digitSet (TEveElement *product)
 
 FWDigitSetProxyBuilder (const FWDigitSetProxyBuilder &)
 
virtual void modelChanges (const FWModelIds &, Product *)
 
const FWDigitSetProxyBuilderoperator= (const FWDigitSetProxyBuilder &)
 

Static Private Member Functions

static TString getTooltip (TEveDigitSet *set, int idx)
 

Private Attributes

TEveBoxSet * m_boxSet
 

Additional Inherited Members

- Static Public Member Functions inherited from FWProxyBuilderBase
static bool representsSubPart ()
 
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 
- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >
::iterator 
Product_it
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 32 of file FWDigitSetProxyBuilder.h.

Constructor & Destructor Documentation

FWDigitSetProxyBuilder::FWDigitSetProxyBuilder ( )

Definition at line 73 of file FWDigitSetProxyBuilder.cc.

73  :
74  m_boxSet(0)
75 {
76 }
FWDigitSetProxyBuilder::~FWDigitSetProxyBuilder ( )
virtual

Definition at line 78 of file FWDigitSetProxyBuilder.cc.

79 {
80 }
FWDigitSetProxyBuilder::FWDigitSetProxyBuilder ( const FWDigitSetProxyBuilder )
private

Member Function Documentation

void FWDigitSetProxyBuilder::addBox ( TEveBoxSet *  set,
const float *  pnts,
const FWDisplayProperties dp 
)
protected
TEveBoxSet * FWDigitSetProxyBuilder::addBoxSetToProduct ( TEveElementList *  product)
protected

Definition at line 89 of file FWDigitSetProxyBuilder.cc.

References getTooltip(), FWProxyBuilderBase::item(), m_boxSet, and runTheMatrix::sel.

Referenced by FWPRCaloTowerProxyBuilder::build(), FWHORecHitProxyBuilder::build(), FWHFRecHitProxyBuilder::build(), FWZDCRecHitProxyBuilder::build(), FWCastorRecHitProxyBuilder::build(), FWHBHERecHitProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), and FWEcalRecHitProxyBuilder::build().

90 {
91  assert(!product->HasChildren());
92 
93  m_boxSet = new TEveBoxSet();
94  m_boxSet->SetTooltipCBFoo(getTooltip);
95  m_boxSet->Reset(TEveBoxSet::kBT_FreeBox, true, 256);
96  FWSecondarySelectableSelector* sel = new FWSecondarySelectableSelector(m_boxSet->RefSelectedSet(), item());
97  m_boxSet->SetUserData(sel);
98  m_boxSet->SetPickable(1);
99  m_boxSet->SetAlwaysSecSelect(1);
100 
101  product->AddElement(m_boxSet);
102 
103  return m_boxSet;
104 }
const FWEventItem * item() const
static TString getTooltip(TEveDigitSet *set, int idx)
TEveDigitSet * FWDigitSetProxyBuilder::digitSet ( TEveElement *  product)
private

Definition at line 106 of file FWDigitSetProxyBuilder.cc.

Referenced by modelChanges().

107 {
108  assert(product->NumChildren() == 1);
109  return static_cast<TEveDigitSet*>(*product->BeginChildren());
110 }
TEveBoxSet* FWDigitSetProxyBuilder::getBoxSet ( ) const
inlineprotected
TString FWDigitSetProxyBuilder::getTooltip ( TEveDigitSet *  set,
int  idx 
)
staticprivate

Definition at line 82 of file FWDigitSetProxyBuilder.cc.

References FWSecondarySelectableSelector::item(), and FWEventItem::modelInterestingValueAsString().

Referenced by addBoxSetToProduct().

83 {
84  TEveElement* el = static_cast<TEveElement*>(set); // tmp-workaround
85  FWSecondarySelectableSelector* ss = static_cast<FWSecondarySelectableSelector*>(el->GetUserData());
86  return ss->item()->modelInterestingValueAsString(idx);
87 }
const std::string & modelInterestingValueAsString(int iIndex) const
Definition: FWEventItem.cc:600
const FWEventItem * item() const
void FWDigitSetProxyBuilder::modelChanges ( const FWModelIds iIds,
Product product 
)
privatevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 124 of file FWDigitSetProxyBuilder.cc.

References FWDisplayProperties::color(), digitSet(), FWEventItem::ModelInfo::displayProperties(), info, FWEventItem::ModelInfo::isSelected(), FWDisplayProperties::isVisible(), FWProxyBuilderBase::item(), FWProxyBuilderBase::Product::m_elements, FWEventItem::modelInfo(), L1TEmulatorMonitor_cff::p, and FWDisplayProperties::transparency().

125 {
126  TEveDigitSet* digits = digitSet(product->m_elements);
127  if (!digits) return;
128 
129  TEveSecondarySelectable::SelectionSet_t& selected = (TEveSecondarySelectable::SelectionSet_t&)(digits->RefSelectedSet());
130 
131  for (std::set<FWModelId>::const_iterator it = iIds.begin(); it != iIds.end(); ++it)
132  {
133  const FWEventItem::ModelInfo& info = item()->modelInfo(it->index());
134 
135  // id display properties
136  const FWDisplayProperties &p = info.displayProperties();
137  digits->SetCurrentDigit(it->index());
138  digits->DigitValue(p.isVisible());
139  if (p.isVisible())
140  digits->DigitColor(p.color(), p.transparency());
141 
142  // id selection
143  TEveSecondarySelectable::SelectionSet_ci si = selected.find(it->index());
144  if (info.isSelected())
145  {
146  if (si == selected.end())
147  selected.insert(it->index());
148  }
149  else
150  {
151  if ( si != selected.end())
152  selected.erase(si);
153  }
154  }
155 
156  if(!selected.empty()) {
157  if(0==digits->GetSelectedLevel()) {
158  gEve->GetSelection()->AddElement(digits);
159  }
160  } else {
161  if(1==digits->GetSelectedLevel()||2==digits->GetSelectedLevel()) {
162  gEve->GetSelection()->RemoveElement(digits);
163  }
164  }
165 
166  digits->StampObjProps();
167 }
const FWDisplayProperties & displayProperties() const
Definition: FWEventItem.h:67
bool isSelected() const
Definition: FWEventItem.h:70
const FWEventItem * item() const
Color_t color() const
Char_t transparency() const
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:535
TEveDigitSet * digitSet(TEveElement *product)
const FWDigitSetProxyBuilder& FWDigitSetProxyBuilder::operator= ( const FWDigitSetProxyBuilder )
private
virtual bool FWDigitSetProxyBuilder::willHandleInteraction ( ) const
inlinevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 41 of file FWDigitSetProxyBuilder.h.

41 { return true; }

Member Data Documentation

TEveBoxSet* FWDigitSetProxyBuilder::m_boxSet
private

Definition at line 77 of file FWDigitSetProxyBuilder.h.

Referenced by addBoxSetToProduct(), and getBoxSet().