Belle II Software development
EveTower Class Reference

handles selection of individual ECLClusters (getting them out of TEve is hard). More...

#include <EveTower.h>

Inheritance diagram for EveTower:

Public Member Functions

 EveTower (TEveCaloData *calodata, int towerID)
 Construct from given ECLCluster representation.
 
int getID () const
 returns tower ID.
 
virtual void SelectElement (Bool_t state)
 Overrides TEveElement::SelectElement(), performs magic to select a single cluster.
 

Private Member Functions

 ClassDef (EveTower, 0)
 handles selection of individual ECLClusters (getting them out of TEve is hard).
 

Private Attributes

TEveCaloData * m_caloData
 Calo data object containing the tower.
 
int m_id
 id of tower.
 

Detailed Description

handles selection of individual ECLClusters (getting them out of TEve is hard).

Definition at line 20 of file EveTower.h.

Constructor & Destructor Documentation

◆ EveTower()

EveTower ( TEveCaloData *  calodata,
int  towerID 
)
inline

Construct from given ECLCluster representation.

(id = AddTower() return value)

Definition at line 23 of file EveTower.h.

23: TEveElement(), TObject(), m_caloData(calodata), m_id(towerID) { }
int m_id
id of tower.
Definition: EveTower.h:33
TEveCaloData * m_caloData
Calo data object containing the tower.
Definition: EveTower.h:32

Member Function Documentation

◆ getID()

int getID ( ) const
inline

returns tower ID.

Definition at line 26 of file EveTower.h.

26{ return m_id; }

◆ SelectElement()

void SelectElement ( Bool_t  state)
virtual

Overrides TEveElement::SelectElement(), performs magic to select a single cluster.

Definition at line 17 of file EveTower.cc.

18{
19 auto& cellVector = m_caloData->GetCellsSelected();
20 if (state)
21 cellVector.emplace_back(m_id, 0); //tower id, slice 0
22 else
23 cellVector.clear();
24 m_caloData->CellSelectionChanged();
25
26 //to emulate a user click, also select the parent ECLData object
27 //otherwise there will be no SelectionRepeated() signal if the
28 //user clicks on another cluster after we're done here.
29 //Note: also needs to be done without generating a selection event
30 if (!gEve->GetSelection()->HasChild(m_caloData))
31 gEve->GetSelection()->AddElement(m_caloData);
32
33 //without selecting the visualisation objects, there is no highlighting, so lets do that, too.
34 TEveElement::Set_t vizset;
35 m_caloData->FillImpliedSelectedSet(vizset);
36 for (TEveElement* viz : vizset)
37 viz->SelectElement(state);
38}

Member Data Documentation

◆ m_caloData

TEveCaloData* m_caloData
private

Calo data object containing the tower.

Definition at line 32 of file EveTower.h.

◆ m_id

int m_id
private

id of tower.

Definition at line 33 of file EveTower.h.


The documentation for this class was generated from the following files: