CMS 3D CMS Logo

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 <cmath>
15 
16 // user includes
17 #include "TEveCaloData.h"
18 #include "TEveCalo.h"
19 #include "TH2F.h"
20 
24 
28 
30 
31 //
32 // constructors , dectructors
33 //
35 
37 
38 void FWCaloTowerProxyBuilderBase::build(const FWEventItem* iItem, TEveElementList* el, const FWViewContext* ctx) {
39  m_towers = nullptr;
40  if (iItem) {
41  iItem->get(m_towers);
42  FWCaloDataProxyBuilderBase::build(iItem, el, ctx);
43  }
44 }
45 
47  return new FWCaloTowerSliceSelector(m_hist, item());
48 }
49 
51  m_hist->Reset();
52 
53  if (m_towers) {
54  if (item()->defaultDisplayProperties().isVisible()) {
55  unsigned int index = 0;
58  if (info.displayProperties().isVisible()) {
59  addEntryToTEveCaloData(tower->eta(), tower->phi(), getEt(*tower), info.isSelected());
60  }
61  }
62  }
63  }
64 }
65 
68  "ECal",
72  "HCal",
76  "HCal Outer",
static const TGPicture * info(bool iBackgroundIsBlack)
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
Definition: FWViewType.h:57
FWHistSliceSelector * instantiateSliceSelector() override
void get(const T *&oData) const
Definition: FWEventItem.h:78
std::vector< CaloTower >::const_iterator const_iterator
const CaloTowerCollection * m_towers
const_iterator begin() const
void addEntryToTEveCaloData(float eta, float phi, float Et, bool isSelected)
const_iterator end() const
static constexpr unsigned int k3DBit
Definition: FWViewType.h:49
static const int kAllLegoBits
Definition: FWViewType.h:59
virtual double getEt(const CaloTower &) const =0
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
const FWEventItem * item() const