CMS 3D CMS Logo

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