HGCal Test Beam  03a93d6239a951948e06fb3ef8dae4cbdebfad30
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Pickable.h
Go to the documentation of this file.
1 #ifndef PICKABLE_H
2 #define PICKABLE_H
3 //-----------------------------------------------------------------------------
4 // Package: PhysicsTools/PyGui
5 // Created: Created: April 2016 HBP
6 //-----------------------------------------------------------------------------
7 #include <iostream>
8 #include <vector>
9 #include <string>
10 //-----------------------------------------------------------------------------
11 #include "TQObject.h"
12 #include "TEveSelection.h"
13 //-----------------------------------------------------------------------------
14 class Pickable : public TQObject
15 {
16  public:
17  Pickable();
18  virtual ~Pickable();
19 
20  void AddElement(TEveElement* element);
21  void Selected(TEveElement* element);
22  void Clear();
23  TEveElement* operator[](int id);
24 
25  void Selected(int id); //*SIGNAL*
26  void Cleared(); //*SIGNAL*
27 
28  private:
29  TEveSelection* _selection;
30  std::map<TEveElement*, int> _element2id;
31  std::map<int, TEveElement*> _id2element;
32  int _id;
33 
34  public:
35  ClassDef(Pickable,0) // Needed to get signals to work
36 };
37 
38 #endif
TEveElement * operator[](int id)
Definition: Pickable.cc:60
void Selected(TEveElement *element)
Definition: Pickable.cc:87
Pickable()
Definition: Pickable.cc:21
void Cleared()
Definition: Pickable.cc:81
virtual ~Pickable()
Definition: Pickable.cc:34
void AddElement(TEveElement *element)
Definition: Pickable.cc:44
void Clear()
Definition: Pickable.cc:52