test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWCaloTowerProxyBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Calo
4 // Class : FWCaloTowerProxyBuilderBase
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Chris Jones
10 // Created: Wed Dec 3 11:28:28 EST 2008
11 //
12 
13 // system includes
14 #include <math.h>
15 
16 // user includes
17 #include "TEveCaloData.h"
18 #include "TEveCalo.h"
19 #include "TH2F.h"
20 
24 
28 
30 
31 
32 
33 //
34 // constructors , dectructors
35 //
38  m_towers(0)
39 {
40 }
41 
43 {
44 }
45 
46 
47 void
49  TEveElementList* el, const FWViewContext* ctx)
50 {
51  m_towers=0;
52  if (iItem)
53  {
54  iItem->get(m_towers);
55  FWCaloDataProxyBuilderBase::build(iItem, el, ctx);
56  }
57 }
58 
59 
62 {
63  return new FWCaloTowerSliceSelector(m_hist, item());
64 }
65 
66 
67 void
69 {
70  m_hist->Reset();
71 
72  if (m_towers)
73  {
74  if(item()->defaultDisplayProperties().isVisible()) {
75  unsigned int index=0;
76  for(CaloTowerCollection::const_iterator tower = m_towers->begin(); tower != m_towers->end(); ++tower,++index) {
77  const FWEventItem::ModelInfo& info = item()->modelInfo(index);
78  if(info.displayProperties().isVisible()) {
79  addEntryToTEveCaloData(tower->eta(), tower->phi(), getEt(*tower), info.isSelected());
80  }
81  }
82  }
83  }
84 }
85 
86 
87 
91 
92 
93 
static const TGPicture * info(bool iBackgroundIsBlack)
const FWDisplayProperties & displayProperties() const
Definition: FWEventItem.h:68
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
Definition: FWViewType.h:58
bool isSelected() const
Definition: FWEventItem.h:71
void get(const T *&oData) const
Definition: FWEventItem.h:85
std::vector< CaloTower >::const_iterator const_iterator
const FWEventItem * item() const
const CaloTowerCollection * m_towers
void addEntryToTEveCaloData(float eta, float phi, float Et, bool isSelected)
const_iterator end() const
static const int kAllLegoBits
Definition: FWViewType.h:60
virtual double getEt(const CaloTower &) const =0
virtual FWHistSliceSelector * instantiateSliceSelector()
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:537
const_iterator begin() const