CMS 3D CMS Logo

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 FWCaloRecHitDigitSetProxyBuilder FWPCaloHitProxyBuilder FWPRCaloTowerProxyBuilder FWCastorRecHitProxyBuilder FWEcalRecHitProxyBuilder FWFTLRecHitProxyBuilder FWHBHERecHitProxyBuilder FWHFRecHitProxyBuilder FWHORecHitProxyBuilder FWZDCRecHitProxyBuilder

Classes

struct  BFreeBox_t
 

Public Member Functions

 FWDigitSetProxyBuilder ()
 
bool willHandleInteraction () const override
 
 ~FWDigitSetProxyBuilder () override
 
- 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 &)
 
virtual 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 &)=delete
 
void modelChanges (const FWModelIds &, Product *) override
 
const FWDigitSetProxyBuilderoperator= (const FWDigitSetProxyBuilder &)=delete
 

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 31 of file FWDigitSetProxyBuilder.h.

Constructor & Destructor Documentation

FWDigitSetProxyBuilder::FWDigitSetProxyBuilder ( )

Definition at line 62 of file FWDigitSetProxyBuilder.cc.

Referenced by getBoxSet().

62 : m_boxSet(nullptr) {}
FWDigitSetProxyBuilder::~FWDigitSetProxyBuilder ( )
override

Definition at line 64 of file FWDigitSetProxyBuilder.cc.

64 {}
FWDigitSetProxyBuilder::FWDigitSetProxyBuilder ( const FWDigitSetProxyBuilder )
privatedelete

Member Function Documentation

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

Definition at line 94 of file FWDigitSetProxyBuilder.cc.

References FWDisplayProperties::color(), FWDisplayProperties::isVisible(), and FWDisplayProperties::transparency().

Referenced by FWDigitSetProxyBuilder::BFreeBox_t::BFreeBox_t(), FWCaloRecHitDigitSetProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), and FWPCaloHitProxyBuilder::build().

94  {
95  boxSet->AddBox(pnts);
96  boxSet->DigitValue(dp.isVisible());
97 
98  if (dp.isVisible())
99  boxSet->DigitColor(dp.color(), dp.transparency());
100 
101  if (dp.transparency())
102  boxSet->SetMainTransparency(dp.transparency());
103 }
Color_t color() const
Char_t transparency() const
TEveBoxSet * FWDigitSetProxyBuilder::addBoxSetToProduct ( TEveElementList *  product)
protected

Definition at line 73 of file FWDigitSetProxyBuilder.cc.

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

Referenced by FWDigitSetProxyBuilder::BFreeBox_t::BFreeBox_t(), FWCaloRecHitDigitSetProxyBuilder::build(), FWPRCaloTowerProxyBuilder::build(), and FWPCaloHitProxyBuilder::build().

73  {
74  assert(!product->HasChildren());
75 
76  m_boxSet = new TEveBoxSet();
77  m_boxSet->SetTooltipCBFoo(getTooltip);
78  m_boxSet->Reset(TEveBoxSet::kBT_FreeBox, true, 256);
79  FWSecondarySelectableSelector* sel = new FWSecondarySelectableSelector(m_boxSet->RefSelectedSet(), item());
80  m_boxSet->SetUserData(sel);
81  m_boxSet->SetPickable(true);
82  m_boxSet->SetAlwaysSecSelect(true);
83 
84  product->AddElement(m_boxSet);
85 
86  return m_boxSet;
87 }
const FWEventItem * item() const
static TString getTooltip(TEveDigitSet *set, int idx)
TEveDigitSet * FWDigitSetProxyBuilder::digitSet ( TEveElement *  product)
private

Definition at line 89 of file FWDigitSetProxyBuilder.cc.

Referenced by getBoxSet(), and modelChanges().

89  {
90  assert(product->NumChildren() == 1);
91  return static_cast<TEveDigitSet*>(*product->BeginChildren());
92 }
TEveBoxSet* FWDigitSetProxyBuilder::getBoxSet ( ) const
inlineprotected
TString FWDigitSetProxyBuilder::getTooltip ( TEveDigitSet *  set,
int  idx 
)
staticprivate

Definition at line 66 of file FWDigitSetProxyBuilder.cc.

References FWSecondarySelectableSelector::item(), FWEventItem::modelInterestingValueAsString(), FWEventItem::name(), and contentValuesCheck::ss.

Referenced by addBoxSetToProduct(), and getBoxSet().

66  {
67  TEveElement* el = static_cast<TEveElement*>(set); // tmp-workaround
68  FWSecondarySelectableSelector* ss = static_cast<FWSecondarySelectableSelector*>(el->GetUserData());
69  return TString::Format(
70  "%d %s %s", idx, ss->item()->name().c_str(), ss->item()->modelInterestingValueAsString(idx).c_str());
71 }
const std::string & name() const
Definition: FWEventItem.cc:435
const std::string & modelInterestingValueAsString(int iIndex) const
Definition: FWEventItem.cc:486
const FWEventItem * item() const
void FWDigitSetProxyBuilder::modelChanges ( const FWModelIds iIds,
Product product 
)
overrideprivatevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 105 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().

Referenced by getBoxSet().

105  {
106  TEveDigitSet* digits = digitSet(product->m_elements);
107  if (!digits)
108  return;
109 
110  TEveSecondarySelectable::SelectionSet_t& selected =
111  (TEveSecondarySelectable::SelectionSet_t&)(digits->RefSelectedSet());
112 
113  for (std::set<FWModelId>::const_iterator it = iIds.begin(); it != iIds.end(); ++it) {
114  const FWEventItem::ModelInfo& info = item()->modelInfo(it->index());
115 
116  // id display properties
117  const FWDisplayProperties& p = info.displayProperties();
118  digits->SetCurrentDigit(it->index());
119  digits->DigitValue(p.isVisible());
120  if (p.isVisible())
121  digits->DigitColor(p.color(), p.transparency());
122 
123  // id selection
124  TEveSecondarySelectable::SelectionSet_ci si = selected.find(it->index());
125  if (info.isSelected()) {
126  if (si == selected.end())
127  selected.insert(it->index());
128  } else {
129  if (si != selected.end())
130  selected.erase(si);
131  }
132  }
133 
134  if (!selected.empty()) {
135  if (0 == digits->GetSelectedLevel()) {
136  gEve->GetSelection()->AddElement(digits);
137  }
138  } else {
139  if (1 == digits->GetSelectedLevel() || 2 == digits->GetSelectedLevel()) {
140  gEve->GetSelection()->RemoveElement(digits);
141  }
142  }
143 
144  digits->StampObjProps();
145 }
static const TGPicture * info(bool iBackgroundIsBlack)
const FWDisplayProperties & displayProperties() const
Definition: FWEventItem.h:64
bool isSelected() const
Definition: FWEventItem.h:65
const FWEventItem * item() const
Color_t color() const
Char_t transparency() const
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
TEveDigitSet * digitSet(TEveElement *product)
const FWDigitSetProxyBuilder& FWDigitSetProxyBuilder::operator= ( const FWDigitSetProxyBuilder )
privatedelete

Referenced by getBoxSet().

bool FWDigitSetProxyBuilder::willHandleInteraction ( ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 38 of file FWDigitSetProxyBuilder.h.

38 { return true; }

Member Data Documentation

TEveBoxSet* FWDigitSetProxyBuilder::m_boxSet
private

Definition at line 71 of file FWDigitSetProxyBuilder.h.

Referenced by addBoxSetToProduct(), and getBoxSet().