Belle II Software development
|
defines a bidirectional (many to many) mapping between TObjects in DataStore and their visual representation. More...
#include <VisualRepMap.h>
Classes | |
class | DataStoreEveElementMap |
Hide implementation in private class. More... | |
Public Member Functions | |
void | select (const TObject *object) const |
Select the representation of the given object. | |
void | selectOnly (const TEveElement *eveObj) const |
Deselect all other objects. | |
void | selectRelated (TEveElement *eveObj) const |
Select related objects. | |
void | clearSelection () const |
Clear existing selection in Eve Browser. | |
bool | isCurrentlySelecting () const |
are we currently in a select() call? | |
const TObject * | getDataStoreObject (TEveElement *elem) const |
Get object represented by given visual representation. | |
TEveElement * | getEveElement (const TObject *obj) const |
Get (first) visual representation of given object. | |
bool | isVisualized (const TObject *obj) |
Does obj have a visualization? | |
void | clear () |
Remove all contents in map. | |
void | add (const TObject *dataStoreObject, TEveElement *visualRepresentation) |
Generic function to keep track of which objects have which visual representation. | |
void | addCluster (const TObject *dataStoreObject, TEveCaloData *caloData, int towerID) |
Selection inside TEveCalo* is complicated, use this to keep track of ECL clusters. | |
Static Public Member Functions | |
static VisualRepMap * | getInstance () |
get instance pointer. | |
Private Member Functions | |
VisualRepMap () | |
default constructor | |
VisualRepMap (const VisualRepMap &)=delete | |
no copy ctor | |
VisualRepMap & | operator= (const VisualRepMap &)=delete |
no assignment | |
~VisualRepMap () | |
destructor | |
Private Attributes | |
bool | m_currentlySelecting |
are we currently in a select() call? | |
DataStoreEveElementMap * | m_dataStoreEveElementMap |
Map DataStore contents in current event with their visual representation. | |
std::vector< EveTower * > | m_eclTowers |
individual ECL towers (getting them out of TEve is hard). | |
defines a bidirectional (many to many) mapping between TObjects in DataStore and their visual representation.
This is used to allow retrieving the original objects for a given TEveElement (to show additional info), and vice versa.
Definition at line 28 of file VisualRepMap.h.
|
private |
default constructor
Definition at line 42 of file VisualRepMap.cc.
|
private |
void add | ( | const TObject * | dataStoreObject, |
TEveElement * | visualRepresentation | ||
) |
Generic function to keep track of which objects have which visual representation.
Should be called by functions adding TEveElements to the event scene (Hits are currently excluded).
Does not take ownership of given objects, just stores mapping between pointers.
Definition at line 134 of file VisualRepMap.cc.
void addCluster | ( | const TObject * | dataStoreObject, |
TEveCaloData * | caloData, | ||
int | towerID | ||
) |
Selection inside TEveCalo* is complicated, use this to keep track of ECL clusters.
Definition at line 146 of file VisualRepMap.cc.
void clear | ( | ) |
Remove all contents in map.
(call this after each event)
Definition at line 46 of file VisualRepMap.cc.
void clearSelection | ( | ) | const |
Clear existing selection in Eve Browser.
Definition at line 127 of file VisualRepMap.cc.
const TObject * getDataStoreObject | ( | TEveElement * | elem | ) | const |
Get object represented by given visual representation.
(elem is pretty much const, but boost refuses to search for it then. )
Definition at line 56 of file VisualRepMap.cc.
TEveElement * getEveElement | ( | const TObject * | obj | ) | const |
Get (first) visual representation of given object.
Definition at line 78 of file VisualRepMap.cc.
|
static |
get instance pointer.
Definition at line 36 of file VisualRepMap.cc.
|
inline |
are we currently in a select() call?
Call this in your selection handler and abort if true. (otherwise we end up recursively calling ourselves).
Definition at line 50 of file VisualRepMap.h.
|
inline |
Does obj have a visualization?
Definition at line 62 of file VisualRepMap.h.
void select | ( | const TObject * | object | ) | const |
Select the representation of the given object.
Definition at line 87 of file VisualRepMap.cc.
void selectOnly | ( | const TEveElement * | eveObj | ) | const |
Deselect all other objects.
Definition at line 103 of file VisualRepMap.cc.
void selectRelated | ( | TEveElement * | eveObj | ) | const |
Select related objects.
Definition at line 114 of file VisualRepMap.cc.
|
mutableprivate |
are we currently in a select() call?
Definition at line 90 of file VisualRepMap.h.
|
private |
Map DataStore contents in current event with their visual representation.
Definition at line 93 of file VisualRepMap.h.
|
private |
individual ECL towers (getting them out of TEve is hard).
Definition at line 96 of file VisualRepMap.h.