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 
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 
18 {
19 private:
20  typedef std::list<TRootXTReq*> lpXTReq_t;
21 
22  TCondition *m_return_condition;
23 
24  static lpXTReq_t sQueue;
25  static pthread_t sRootThread;
26  static TMutex *sQueueMutex;
27  static TSignalHandler *sSigHandler;
28  static bool sSheduled;
29 
30  virtual void Act() = 0;
31 
32 protected:
33  TString mName;
34 
35  void post_request();
36 
37 public:
38  TRootXTReq(const char* n="TRootXTReq");
39  virtual ~TRootXTReq();
40 
41  void ShootRequest();
42  void ShootRequestAndWait();
43 
44  // --- Static interface ---
45 
46  static void Bootstrap(pthread_t root_thread);
47  static void Shutdown();
48 
49  static void ProcessQueue();
50 
51 };
52 
53 #endif
TCondition * m_return_condition
Definition: TRootXTReq.h:22
static void Bootstrap(pthread_t root_thread)
Definition: TRootXTReq.cc:151
void post_request()
Definition: TRootXTReq.cc:62
virtual ~TRootXTReq()
Definition: TRootXTReq.cc:55
virtual void Act()=0
static pthread_t sRootThread
Definition: TRootXTReq.h:25
static lpXTReq_t sQueue
Definition: TRootXTReq.h:24
static bool sSheduled
Definition: TRootXTReq.h:28
TString mName
Definition: TRootXTReq.h:33
TRootXTReq(const char *n="TRootXTReq")
Definition: TRootXTReq.cc:50
static void Shutdown()
Definition: TRootXTReq.cc:163
std::list< TRootXTReq * > lpXTReq_t
Definition: TRootXTReq.h:20
static TSignalHandler * sSigHandler
Definition: TRootXTReq.h:27
void ShootRequest()
Definition: TRootXTReq.cc:75
static void ProcessQueue()
Definition: TRootXTReq.cc:177
void ShootRequestAndWait()
Definition: TRootXTReq.cc:90
static TMutex * sQueueMutex
Definition: TRootXTReq.h:26