CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TRootXTReq.h
Go to the documentation of this file.
1 
2 #ifndef Fireworks_Core_TRootXTReq_h
3 #define Fireworks_Core_TRootXTReq_h
4 
5 class TMutex;
6 class TCondition;
7 class TThread;
8 
9 class TTimer;
10 class TSignalHandler;
11 
12 #include <TString.h>
13 
14 #include <list>
15 #include <pthread.h>
16 
17 class TRootXTReq {
18 private:
19  typedef std::list<TRootXTReq *> lpXTReq_t;
20 
21  TCondition *m_return_condition;
22 
23  static lpXTReq_t sQueue;
24  static pthread_t sRootThread;
25  static TMutex *sQueueMutex;
26  static TSignalHandler *sSigHandler;
27  static bool sSheduled;
28 
29  virtual void Act() = 0;
30 
31 protected:
32  TString mName;
33 
34  void post_request();
35 
36 public:
37  TRootXTReq(const char *n = "TRootXTReq");
38  virtual ~TRootXTReq();
39 
40  void ShootRequest();
41  void ShootRequestAndWait();
42 
43  // --- Static interface ---
44 
45  static void Bootstrap(pthread_t root_thread);
46  static void Shutdown();
47 
48  static void ProcessQueue();
49 };
50 
51 #endif
TCondition * m_return_condition
Definition: TRootXTReq.h:21
static void Bootstrap(pthread_t root_thread)
Definition: TRootXTReq.cc:132
void post_request()
Definition: TRootXTReq.cc:54
virtual ~TRootXTReq()
Definition: TRootXTReq.cc:50
virtual void Act()=0
static pthread_t sRootThread
Definition: TRootXTReq.h:24
std::list< TRootXTReq * > lpXTReq_t
Definition: TRootXTReq.h:19
static lpXTReq_t sQueue
Definition: TRootXTReq.h:23
static bool sSheduled
Definition: TRootXTReq.h:27
TString mName
Definition: TRootXTReq.h:32
TRootXTReq(const char *n="TRootXTReq")
Definition: TRootXTReq.cc:48
static void Shutdown()
Definition: TRootXTReq.cc:143
static TSignalHandler * sSigHandler
Definition: TRootXTReq.h:26
void ShootRequest()
Definition: TRootXTReq.cc:65
static void ProcessQueue()
Definition: TRootXTReq.cc:158
void ShootRequestAndWait()
Definition: TRootXTReq.cc:78
static TMutex * sQueueMutex
Definition: TRootXTReq.h:25