Belle II Software prerelease-10-00-00a
VisualRepMap.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <vector>
12
13class TEveElement;
14class TEveCaloData;
15class TObject;
16
17namespace Belle2 {
22 class EveTower;
29 public:
31 static VisualRepMap* getInstance();
32
34 void select(const TObject* object) const;
35
37 void selectOnly(const TEveElement* eveObj) const;
38
40 void selectRelated(TEveElement* eveObj) const;
41
43 void clearSelection() const;
44
51
56 const TObject* getDataStoreObject(TEveElement* elem) const;
57
59 TEveElement* getEveElement(const TObject* obj) const;
60
62 bool isVisualized(const TObject* obj) { return getEveElement(obj) != nullptr; }
63
65 void clear();
66
74 void add(const TObject* dataStoreObject, TEveElement* visualRepresentation);
75
77 void addCluster(const TObject* dataStoreObject, TEveCaloData* caloData, int towerID);
78 private:
82 VisualRepMap(const VisualRepMap&) = delete;
87
89
90 mutable bool m_currentlySelecting;
91
94
96 std::vector<EveTower*> m_eclTowers;
97
98 };
99
100}
handles selection of individual ECLClusters (getting them out of TEve is hard).
Definition EveTower.h:20
~VisualRepMap()
destructor
void addCluster(const TObject *dataStoreObject, TEveCaloData *caloData, int towerID)
Selection inside TEveCalo* is complicated, use this to keep track of ECL clusters.
const TObject * getDataStoreObject(TEveElement *elem) const
Get object represented by given visual representation.
bool m_currentlySelecting
are we currently in a select() call?
bool isCurrentlySelecting() const
are we currently in a select() call?
void clearSelection() const
Clear existing selection in Eve Browser.
static VisualRepMap * getInstance()
get instance pointer.
void selectRelated(TEveElement *eveObj) const
Select related objects.
TEveElement * getEveElement(const TObject *obj) const
Get (first) visual representation of given object.
std::vector< EveTower * > m_eclTowers
individual ECL towers (getting them out of TEve is hard).
void selectOnly(const TEveElement *eveObj) const
Deselect all other objects.
void select(const TObject *object) const
Select the representation of the given object.
DataStoreEveElementMap * m_dataStoreEveElementMap
Map DataStore contents in current event with their visual representation.
void clear()
Remove all contents in map.
VisualRepMap & operator=(const VisualRepMap &)=delete
no assignment
VisualRepMap(const VisualRepMap &)=delete
no copy ctor
VisualRepMap()
default constructor
void add(const TObject *dataStoreObject, TEveElement *visualRepresentation)
Generic function to keep track of which objects have which visual representation.
bool isVisualized(const TObject *obj)
Does obj have a visualization?
Hide implementation in private class.
Abstract base class for different kinds of events.