14 #include "HGCal/TBEventDisplay/interface/Pickable.h"
15 #include "TEveManager.h"
22 : _selection(gEve->GetSelection()),
23 _element2id(map<TEveElement*, int>()),
24 _id2element(map<int, TEveElement*>()),
27 _selection->Connect(
"SelectionAdded(TEveElement*)",
"Pickable",
28 this,
"Selected(TEveElement*)");
30 _selection->Connect(
"SelectionCleared()",
"Pickable",
36 _selection->Disconnect(
"SelectionAdded(TEveElement*)",
37 this,
"Selected(TEveElement*)");
39 _selection->Disconnect(
"SelectionCleared()",
46 _element2id[element] = _id;
47 _id2element[_id] = element;
54 _selection->RemoveElements();
62 TEveElement* element=0;
65 element = _id2element[id];
77 this->Emit(
"Selected(int)",
id);
83 this->Emit(
"Cleared()");
92 int id = _element2id[element];
TEveElement * operator[](int id)
void Selected(TEveElement *element)
void AddElement(TEveElement *element)