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

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() [1/2]

FWDigitSetProxyBuilder::FWDigitSetProxyBuilder ( )

Definition at line 62 of file FWDigitSetProxyBuilder.cc.

62 : m_boxSet(nullptr) {}

◆ ~FWDigitSetProxyBuilder()

FWDigitSetProxyBuilder::~FWDigitSetProxyBuilder ( )
override

Definition at line 64 of file FWDigitSetProxyBuilder.cc.

64 {}

◆ FWDigitSetProxyBuilder() [2/2]

FWDigitSetProxyBuilder::FWDigitSetProxyBuilder ( const FWDigitSetProxyBuilder )
delete

Member Function Documentation

◆ addBox()

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

Definition at line 94 of file FWDigitSetProxyBuilder.cc.

References Calorimetry_cff::dp.

Referenced by 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 }

◆ addBoxSetToProduct()

TEveBoxSet * FWDigitSetProxyBuilder::addBoxSetToProduct ( TEveElementList *  product)
protected

Definition at line 73 of file FWDigitSetProxyBuilder.cc.

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

Referenced by 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);
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 }
assert(be >=bs)
static TString getTooltip(TEveDigitSet *set, int idx)
const FWEventItem * item() const

◆ digitSet()

TEveDigitSet * FWDigitSetProxyBuilder::digitSet ( TEveElement *  product)
private

Definition at line 89 of file FWDigitSetProxyBuilder.cc.

References cms::cuda::assert().

Referenced by modelChanges().

89  {
90  assert(product->NumChildren() == 1);
91  return static_cast<TEveDigitSet*>(*product->BeginChildren());
92 }
assert(be >=bs)

◆ getBoxSet()

TEveBoxSet* FWDigitSetProxyBuilder::getBoxSet ( ) const
inlineprotected

Definition at line 60 of file FWDigitSetProxyBuilder.h.

References m_boxSet.

60 { return m_boxSet; }

◆ getTooltip()

TString FWDigitSetProxyBuilder::getTooltip ( TEveDigitSet *  set,
int  idx 
)
staticprivate

Definition at line 66 of file FWDigitSetProxyBuilder.cc.

References heavyIonCSV_trainingSettings::idx, and contentValuesCheck::ss.

Referenced by addBoxSetToProduct().

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 }

◆ modelChanges()

void FWDigitSetProxyBuilder::modelChanges ( const FWModelIds iIds,
Product product 
)
overrideprivatevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 105 of file FWDigitSetProxyBuilder.cc.

References digitSet(), info(), FWProxyBuilderBase::item(), FWProxyBuilderBase::Product::m_elements, FWEventItem::modelInfo(), and AlCaHLTBitMon_ParallelJobs::p.

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)
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
TEveDigitSet * digitSet(TEveElement *product)
const FWEventItem * item() const

◆ operator=()

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

◆ willHandleInteraction()

bool FWDigitSetProxyBuilder::willHandleInteraction ( ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 38 of file FWDigitSetProxyBuilder.h.

38 { return true; }

Member Data Documentation

◆ m_boxSet

TEveBoxSet* FWDigitSetProxyBuilder::m_boxSet
private

Definition at line 71 of file FWDigitSetProxyBuilder.h.

Referenced by addBoxSetToProduct(), and getBoxSet().