#include <Fireworks/Core/interface/FWDigitSetProxyBuilder.h>
Classes | |
struct | BFreeBox_t |
Public Member Functions | |
FWDigitSetProxyBuilder () | |
virtual bool | willHandleInteraction () const |
virtual | ~FWDigitSetProxyBuilder () |
Protected Member Functions | |
void | addBox (TEveBoxSet *set, const float *pnts, const FWDisplayProperties &dp) |
TEveBoxSet * | addBoxSetToProduct (TEveElementList *product) |
TEveBoxSet * | getBoxSet () const |
Private Member Functions | |
TEveDigitSet * | digitSet (TEveElement *product) |
FWDigitSetProxyBuilder (const FWDigitSetProxyBuilder &) | |
virtual void | modelChanges (const FWModelIds &, Product *) |
const FWDigitSetProxyBuilder & | operator= (const FWDigitSetProxyBuilder &) |
Static Private Member Functions | |
static TString | getTooltip (TEveDigitSet *set, int idx) |
Private Attributes | |
TEveBoxSet * | m_boxSet |
Description: [one line class summary]
Usage: <usage>
Definition at line 32 of file FWDigitSetProxyBuilder.h.
FWDigitSetProxyBuilder::FWDigitSetProxyBuilder | ( | ) |
Definition at line 73 of file FWDigitSetProxyBuilder.cc.
: m_boxSet(0) { }
FWDigitSetProxyBuilder::~FWDigitSetProxyBuilder | ( | ) | [virtual] |
Definition at line 78 of file FWDigitSetProxyBuilder.cc.
{ }
FWDigitSetProxyBuilder::FWDigitSetProxyBuilder | ( | const FWDigitSetProxyBuilder & | ) | [private] |
void FWDigitSetProxyBuilder::addBox | ( | TEveBoxSet * | set, |
const float * | pnts, | ||
const FWDisplayProperties & | dp | ||
) | [protected] |
Definition at line 112 of file FWDigitSetProxyBuilder.cc.
References FWDisplayProperties::color(), FWDisplayProperties::isVisible(), and FWDisplayProperties::transparency().
Referenced by FWCastorRecHitProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), FWZDCRecHitProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWHBHERecHitProxyBuilder::build(), FWHFRecHitProxyBuilder::build(), FWEcalRecHitProxyBuilder::build(), and FWHORecHitProxyBuilder::build().
{ boxSet->AddBox(pnts); boxSet->DigitValue(dp.isVisible()); if (dp.isVisible()) boxSet->DigitColor(dp.color(), dp.transparency()); if (dp.transparency()) boxSet->SetMainTransparency(dp.transparency()); }
TEveBoxSet * FWDigitSetProxyBuilder::addBoxSetToProduct | ( | TEveElementList * | product | ) | [protected] |
Definition at line 89 of file FWDigitSetProxyBuilder.cc.
References getTooltip(), FWProxyBuilderBase::item(), m_boxSet, and EgammaValidation_Wenu_cff::sel.
Referenced by FWCastorRecHitProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), FWZDCRecHitProxyBuilder::build(), FWPCaloHitProxyBuilder::build(), FWHBHERecHitProxyBuilder::build(), FWHFRecHitProxyBuilder::build(), FWEcalRecHitProxyBuilder::build(), and FWHORecHitProxyBuilder::build().
{ assert(!product->HasChildren()); m_boxSet = new TEveBoxSet(); m_boxSet->SetTooltipCBFoo(getTooltip); m_boxSet->Reset(TEveBoxSet::kBT_FreeBox, true, 256); FWSecondarySelectableSelector* sel = new FWSecondarySelectableSelector(m_boxSet->RefSelectedSet(), item()); m_boxSet->SetUserData(sel); m_boxSet->SetPickable(1); m_boxSet->SetAlwaysSecSelect(1); product->AddElement(m_boxSet); return m_boxSet; }
TEveDigitSet * FWDigitSetProxyBuilder::digitSet | ( | TEveElement * | product | ) | [private] |
Definition at line 106 of file FWDigitSetProxyBuilder.cc.
Referenced by modelChanges().
{ assert(product->NumChildren() == 1); return static_cast<TEveDigitSet*>(*product->BeginChildren()); }
TEveBoxSet* FWDigitSetProxyBuilder::getBoxSet | ( | ) | const [inline, protected] |
Definition at line 62 of file FWDigitSetProxyBuilder.h.
References m_boxSet.
Referenced by FWEcalRecHitProxyBuilder::scaleProduct(), and FWHBHERecHitProxyBuilder::scaleProduct().
{ return m_boxSet; }
TString FWDigitSetProxyBuilder::getTooltip | ( | TEveDigitSet * | set, |
int | idx | ||
) | [static, private] |
Definition at line 82 of file FWDigitSetProxyBuilder.cc.
References FWSecondarySelectableSelector::item(), FWEventItem::modelInterestingValueAsString(), and FWEventItem::name().
Referenced by addBoxSetToProduct().
{ TEveElement* el = static_cast<TEveElement*>(set); // tmp-workaround FWSecondarySelectableSelector* ss = static_cast<FWSecondarySelectableSelector*>(el->GetUserData()); return TString::Format("%d %s %s", idx, ss->item()->name().c_str(), ss->item()->modelInterestingValueAsString(idx).c_str()); }
void FWDigitSetProxyBuilder::modelChanges | ( | const FWModelIds & | iIds, |
Product * | product | ||
) | [private, virtual] |
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(), AlCaHLTBitMon_ParallelJobs::p, and FWDisplayProperties::transparency().
{ TEveDigitSet* digits = digitSet(product->m_elements); if (!digits) return; TEveSecondarySelectable::SelectionSet_t& selected = (TEveSecondarySelectable::SelectionSet_t&)(digits->RefSelectedSet()); for (std::set<FWModelId>::const_iterator it = iIds.begin(); it != iIds.end(); ++it) { const FWEventItem::ModelInfo& info = item()->modelInfo(it->index()); // id display properties const FWDisplayProperties &p = info.displayProperties(); digits->SetCurrentDigit(it->index()); digits->DigitValue(p.isVisible()); if (p.isVisible()) digits->DigitColor(p.color(), p.transparency()); // id selection TEveSecondarySelectable::SelectionSet_ci si = selected.find(it->index()); if (info.isSelected()) { if (si == selected.end()) selected.insert(it->index()); } else { if ( si != selected.end()) selected.erase(si); } } if(!selected.empty()) { if(0==digits->GetSelectedLevel()) { gEve->GetSelection()->AddElement(digits); } } else { if(1==digits->GetSelectedLevel()||2==digits->GetSelectedLevel()) { gEve->GetSelection()->RemoveElement(digits); } } digits->StampObjProps(); }
const FWDigitSetProxyBuilder& FWDigitSetProxyBuilder::operator= | ( | const FWDigitSetProxyBuilder & | ) | [private] |
virtual bool FWDigitSetProxyBuilder::willHandleInteraction | ( | ) | const [inline, virtual] |
Reimplemented from FWProxyBuilderBase.
Definition at line 41 of file FWDigitSetProxyBuilder.h.
{ return true; }
TEveBoxSet* FWDigitSetProxyBuilder::m_boxSet [private] |
Definition at line 77 of file FWDigitSetProxyBuilder.h.
Referenced by addBoxSetToProduct(), and getBoxSet().