Belle II Software
release-08-01-10
|
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? More... | |
const TObject * | getDataStoreObject (TEveElement *elem) const |
Get object represented by given visual representation. More... | |
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. More... | |
void | add (const TObject *dataStoreObject, TEveElement *visualRepresentation) |
Generic function to keep track of which objects have which visual representation. More... | |
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.
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 clear | ( | void | ) |
Remove all contents in map.
(call this after each event)
Definition at line 46 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.
|
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.