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 FWCaloRecHitDigitSetProxyBuilder FWPCaloHitProxyBuilder FWPRCaloTowerProxyBuilder FWCastorRecHitProxyBuilder FWEcalRecHitProxyBuilder FWHBHERecHitProxyBuilder FWHFRecHitProxyBuilder FWHORecHitProxyBuilder 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 &)
 
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 &)
 
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 31 of file FWDigitSetProxyBuilder.h.

Constructor & Destructor Documentation

FWDigitSetProxyBuilder::FWDigitSetProxyBuilder ( )

Definition at line 72 of file FWDigitSetProxyBuilder.cc.

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

Definition at line 77 of file FWDigitSetProxyBuilder.cc.

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

Member Function Documentation

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

Definition at line 111 of file FWDigitSetProxyBuilder.cc.

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

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

112 {
113  boxSet->AddBox(pnts);
114  boxSet->DigitValue(dp.isVisible());
115 
116  if (dp.isVisible())
117  boxSet->DigitColor(dp.color(), dp.transparency());
118 
119  if (dp.transparency())
120  boxSet->SetMainTransparency(dp.transparency());
121 }
Color_t color() const
Char_t transparency() const
TEveBoxSet * FWDigitSetProxyBuilder::addBoxSetToProduct ( TEveElementList *  product)
protected

Definition at line 88 of file FWDigitSetProxyBuilder.cc.

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

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

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

Definition at line 105 of file FWDigitSetProxyBuilder.cc.

References assert().

Referenced by modelChanges().

106 {
107  assert(product->NumChildren() == 1);
108  return static_cast<TEveDigitSet*>(*product->BeginChildren());
109 }
assert(m_qm.get())
TEveBoxSet* FWDigitSetProxyBuilder::getBoxSet ( ) const
inlineprotected

Definition at line 61 of file FWDigitSetProxyBuilder.h.

References m_boxSet.

61 { return m_boxSet; }
TString FWDigitSetProxyBuilder::getTooltip ( TEveDigitSet *  set,
int  idx 
)
staticprivate

Definition at line 81 of file FWDigitSetProxyBuilder.cc.

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

Referenced by addBoxSetToProduct().

82 {
83  TEveElement* el = static_cast<TEveElement*>(set); // tmp-workaround
84  FWSecondarySelectableSelector* ss = static_cast<FWSecondarySelectableSelector*>(el->GetUserData());
85  return TString::Format("%d %s %s", idx, ss->item()->name().c_str(), ss->item()->modelInterestingValueAsString(idx).c_str());
86 }
const std::string & name() const
Definition: FWEventItem.cc:500
const std::string & modelInterestingValueAsString(int iIndex) const
Definition: FWEventItem.cc:594
const FWEventItem * item() const
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
void FWDigitSetProxyBuilder::modelChanges ( const FWModelIds iIds,
Product product 
)
privatevirtual

Reimplemented from FWProxyBuilderBase.

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

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

40 { return true; }

Member Data Documentation

TEveBoxSet* FWDigitSetProxyBuilder::m_boxSet
private

Definition at line 76 of file FWDigitSetProxyBuilder.h.

Referenced by addBoxSetToProduct(), and getBoxSet().