CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
FWHeatmapProxyBuilderTemplate< T > Class Template Reference

#include <Fireworks/Calo/interface/FWHeatmapProxyBuilderTemplate.h>

Inheritance diagram for FWHeatmapProxyBuilderTemplate< T >:
FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

 FWHeatmapProxyBuilderTemplate ()
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
 ~FWSimpleProxyBuilder () 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 &)
 
void setupAddElement (TEveElement *el, TEveElement *parent, bool set_color=true) const
 
void setupElement (TEveElement *el, bool color=true) const
 
virtual bool willHandleInteraction () const
 
virtual ~FWProxyBuilderBase ()
 

Protected Member Functions

void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *vc) override
 
void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context) override
 
virtual void build (const T &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 
void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context) override
 
virtual void buildViewType (const T &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *)
 
const TmodelData (int index)
 
void setItem (const FWEventItem *iItem) override
 
- Protected Member Functions inherited from FWSimpleProxyBuilder
void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *) override
 
void clean () override
 
- Protected Member Functions inherited from FWProxyBuilderBase
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)
 
virtual void modelChanges (const FWModelIds &, Product *)
 
const FWProxyBuilderBaseoperator= (const FWProxyBuilderBase &)
 
virtual void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
 

Protected Attributes

std::map< DetId, const HGCRecHit * > hitmap
 
- Protected Attributes inherited from FWSimpleProxyBuilder
FWSimpleProxyHelper m_helper
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Static Protected Attributes

static uint8_t gradient [3][gradient_steps]
 
static uint8_t gradient_steps = 9
 

Private Member Functions

 FWHeatmapProxyBuilderTemplate (const FWHeatmapProxyBuilderTemplate &)=delete
 
const FWHeatmapProxyBuilderTemplateoperator= (const FWHeatmapProxyBuilderTemplate &)=delete
 

Additional Inherited Members

- Static Public Member Functions inherited from FWSimpleProxyBuilder
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 
- 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
 

Detailed Description

template<typename T>
class FWHeatmapProxyBuilderTemplate< T >

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 34 of file FWHeatmapProxyBuilderTemplate.h.

Constructor & Destructor Documentation

template<typename T>
FWHeatmapProxyBuilderTemplate< T >::FWHeatmapProxyBuilderTemplate ( )
inline

Definition at line 37 of file FWHeatmapProxyBuilderTemplate.h.

Referenced by FWHeatmapProxyBuilderTemplate< reco::CaloCluster >::buildViewType().

37  :
38  FWSimpleProxyBuilder(typeid(T)) {
39  }
FWSimpleProxyBuilder(const std::type_info &iType)
long double T
template<typename T>
FWHeatmapProxyBuilderTemplate< T >::FWHeatmapProxyBuilderTemplate ( const FWHeatmapProxyBuilderTemplate< T > &  )
privatedelete

Member Function Documentation

template<typename T>
void FWHeatmapProxyBuilderTemplate< T >::build ( const FWEventItem iItem,
TEveElementList *  product,
const FWViewContext vc 
)
inlineoverrideprotectedvirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 83 of file FWHeatmapProxyBuilderTemplate.h.

84  {
85  if (item()->getConfig()->template value<bool>("Heatmap"))
86  {
87  hitmap.clear();
88 
89  const edm::EventBase *event = iItem->getEvent();
90 
91  edm::Handle<HGCRecHitCollection> recHitHandleEE;
92  edm::Handle<HGCRecHitCollection> recHitHandleFH;
93  edm::Handle<HGCRecHitCollection> recHitHandleBH;
94 
95  event->getByLabel( edm::InputTag( "HGCalRecHit", "HGCEERecHits" ), recHitHandleEE );
96  event->getByLabel( edm::InputTag( "HGCalRecHit", "HGCHEFRecHits" ), recHitHandleFH );
97  event->getByLabel( edm::InputTag( "HGCalRecHit", "HGCHEBRecHits" ), recHitHandleBH );
98 
99  const auto& rechitsEE = *recHitHandleEE;
100  const auto& rechitsFH = *recHitHandleFH;
101  const auto& rechitsBH = *recHitHandleBH;
102 
103  for (unsigned int i = 0; i < rechitsEE.size(); ++i) {
104  hitmap[rechitsEE[i].detid().rawId()] = &rechitsEE[i];
105  }
106  for (unsigned int i = 0; i < rechitsFH.size(); ++i) {
107  hitmap[rechitsFH[i].detid().rawId()] = &rechitsFH[i];
108  }
109  for (unsigned int i = 0; i < rechitsBH.size(); ++i) {
110  hitmap[rechitsBH[i].detid().rawId()] = &rechitsBH[i];
111  }
112  }
113 
114  FWSimpleProxyBuilder::build(iItem, product, vc);
115  }
std::map< DetId, const HGCRecHit * > hitmap
const FWEventItem * item() const
const edm::EventBase * getEvent() const
Definition: FWEventItem.h:148
template<typename T>
void FWHeatmapProxyBuilderTemplate< T >::build ( const void *  iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext context 
)
inlineoverrideprotectedvirtual

Implements FWSimpleProxyBuilder.

Definition at line 118 of file FWHeatmapProxyBuilderTemplate.h.

119  {
120  if(nullptr!=iData) {
121  build(*reinterpret_cast<const T*> (iData), iIndex, oItemHolder, context);
122  }
123  }
template<typename T>
virtual void FWHeatmapProxyBuilderTemplate< T >::build ( const T iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
)
inlineprotectedvirtual

iIndex is the index where iData is found in the container from which it came iItemHolder is the object to which you add your own objects which inherit from TEveElement

Reimplemented in FWCaloClusterProxyBuilder, FWCaloParticleProxyBuilder, and FWHGCalMultiClusterProxyBuilder.

Definition at line 135 of file FWHeatmapProxyBuilderTemplate.h.

136  {
137  throw std::runtime_error("virtual build(const T&, unsigned int, TEveElement&, const FWViewContext*) not implemented by inherited class.");
138  }
template<typename T>
void FWHeatmapProxyBuilderTemplate< T >::buildViewType ( const void *  iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
FWViewType::EType  viewType,
const FWViewContext context 
)
inlineoverrideprotectedvirtual

Implements FWSimpleProxyBuilder.

Definition at line 126 of file FWHeatmapProxyBuilderTemplate.h.

Referenced by FWHeatmapProxyBuilderTemplate< reco::CaloCluster >::buildViewType().

127  {
128  if(nullptr!=iData) {
129  buildViewType(*reinterpret_cast<const T*> (iData), iIndex, oItemHolder, viewType, context);
130  }
131  }
void buildViewType(const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context) override
template<typename T>
virtual void FWHeatmapProxyBuilderTemplate< T >::buildViewType ( const T iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
FWViewType::EType  viewType,
const FWViewContext  
)
inlineprotectedvirtual

Definition at line 140 of file FWHeatmapProxyBuilderTemplate.h.

141  {
142  throw std::runtime_error("virtual buildViewType(const T&, unsigned int, TEveElement&, FWViewType::EType, const FWViewContext*) not implemented by inherited class");
143  };
template<typename T>
const T& FWHeatmapProxyBuilderTemplate< T >::modelData ( int  index)
inlineprotected

Definition at line 67 of file FWHeatmapProxyBuilderTemplate.h.

Referenced by FWHeatmapProxyBuilderTemplate< reco::CaloCluster >::modelData().

67 { return *reinterpret_cast<const T*>(m_helper.offsetObject(item()->modelData(index))); }
const void * offsetObject(const void *iObj) const
const FWEventItem * item() const
FWSimpleProxyHelper m_helper
long double T
template<typename T>
const FWHeatmapProxyBuilderTemplate& FWHeatmapProxyBuilderTemplate< T >::operator= ( const FWHeatmapProxyBuilderTemplate< T > &  )
privatedelete
template<typename T>
void FWHeatmapProxyBuilderTemplate< T >::setItem ( const FWEventItem iItem)
inlineoverrideprotectedvirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 69 of file FWHeatmapProxyBuilderTemplate.h.

Referenced by Vispa.Plugins.EdmBrowser.EventContentView.EventContentView::_addRow(), Vispa.Views.TableView.TableView::_createItem(), Vispa.Views.PropertyView.PropertyView::addCategory(), Vispa.Views.PropertyView.PropertyView::append(), and FWCaloClusterProxyBuilder::setItem().

70  {
72  if (iItem)
73  {
74  iItem->getConfig()->keepEntries(true);
75  iItem->getConfig()->assertParam("Layer", 0L, 0L, 52L);
76  iItem->getConfig()->assertParam("EnergyCutOff", 0.5, 0.2, 5.0);
77  iItem->getConfig()->assertParam("Heatmap", true);
78  iItem->getConfig()->assertParam("Z+", true);
79  iItem->getConfig()->assertParam("Z-", true);
80  }
81  }
FWProxyBuilderConfiguration * getConfig() const
Definition: FWEventItem.h:169
virtual void setItem(const FWEventItem *iItem)
FWGenericParameter< T > * assertParam(const std::string &name, T def)

Member Data Documentation

template<typename T>
uint8_t FWHeatmapProxyBuilderTemplate< T >::gradient[3][gradient_steps]
staticprotected
Initial value:
= {
{static_cast<uint8_t>(0.2082*255), static_cast<uint8_t>(0.0592*255), static_cast<uint8_t>(0.0780*255),
static_cast<uint8_t>(0.0232*255), static_cast<uint8_t>(0.1802*255), static_cast<uint8_t>(0.5301*255),
static_cast<uint8_t>(0.8186*255), static_cast<uint8_t>(0.9956*255), static_cast<uint8_t>(0.9764*255)},
{static_cast<uint8_t>(0.1664*255), static_cast<uint8_t>(0.3599*255), static_cast<uint8_t>(0.5041*255),
static_cast<uint8_t>(0.6419*255), static_cast<uint8_t>(0.7178*255), static_cast<uint8_t>(0.7492*255),
static_cast<uint8_t>(0.7328*255), static_cast<uint8_t>(0.7862*255), static_cast<uint8_t>(0.9832*255)},
{static_cast<uint8_t>(0.5293*255), static_cast<uint8_t>(0.8684*255), static_cast<uint8_t>(0.8385*255),
static_cast<uint8_t>(0.7914*255), static_cast<uint8_t>(0.6425*255), static_cast<uint8_t>(0.4662*255),
static_cast<uint8_t>(0.3499*255), static_cast<uint8_t>(0.1968*255), static_cast<uint8_t>(0.0539*255)}
}

Definition at line 53 of file FWHeatmapProxyBuilderTemplate.h.

template<typename T>
uint8_t FWHeatmapProxyBuilderTemplate< T >::gradient_steps = 9
staticprotected

Definition at line 52 of file FWHeatmapProxyBuilderTemplate.h.

template<typename T>
std::map<DetId, const HGCRecHit*> FWHeatmapProxyBuilderTemplate< T >::hitmap
protected

Definition at line 50 of file FWHeatmapProxyBuilderTemplate.h.