HGCal Test Beam  03a93d6239a951948e06fb3ef8dae4cbdebfad30
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Slot.h
Go to the documentation of this file.
1 #ifndef SLOT_H
2 #define SLOT_H
3 /////////////////////////////////////////////////////////////////////////
4 // File: Slot.h
5 // Purpose: Model a Slot for use in Signal/Slot communication.
6 // Created: Summer-2002 Harrison B. Prosper
7 // Updated: 05-Jun-2008 HBP Adapt to CMS
8 // 14-Apr-2011 HBP changed unsigned long
9 /////////////////////////////////////////////////////////////////////////
10 //$Revision: 1.2 $
11 
12 #include "TQObject.h"
13 #include <string>
14 #include <vector>
15 #include <Python.h>
16 
17 /**
18  */
19 class Slot : public TQObject
20 {
21 private:
22  PyObject* _object;
23  std::string _mstr;
24  std::vector<char> _method;
25 
26 public:
27 
28  /** RootCint requires a default constructor
29  */
30 
31  Slot();
32 
33  /**
34  */
35  Slot(PyObject* object, const char* method);
36 
37  /**
38  */
39  ~Slot();
40 
41  /**
42  */
43  void handleSignal(int id);
44 
45  /**
46  */
47  void handleSignal();
48 
49  PyObject* receiver() const {return _object;}
50 
51  const char* method() const {return _mstr.c_str();}
52 
53 };
54 
55 #endif
PyObject * receiver() const
Definition: Slot.h:49
void handleSignal()
Definition: Slot.cc:46
~Slot()
Definition: Slot.cc:28
Definition: Slot.h:19
Slot()
Definition: Slot.cc:18
const char * method() const
Definition: Slot.h:51