CMS 3D CMS Logo

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
TRootXTReq::mName
TString mName
Definition: TRootXTReq.h:32
TRootXTReq::Shutdown
static void Shutdown()
Definition: TRootXTReq.cc:143
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
TRootXTReq::ShootRequest
void ShootRequest()
Definition: TRootXTReq.cc:65
TRootXTReq::ProcessQueue
static void ProcessQueue()
Definition: TRootXTReq.cc:158
TRootXTReq::sSigHandler
static TSignalHandler * sSigHandler
Definition: TRootXTReq.h:26
TRootXTReq::ShootRequestAndWait
void ShootRequestAndWait()
Definition: TRootXTReq.cc:78
TRootXTReq::post_request
void post_request()
Definition: TRootXTReq.cc:54
TRootXTReq::m_return_condition
TCondition * m_return_condition
Definition: TRootXTReq.h:21
TRootXTReq::Bootstrap
static void Bootstrap(pthread_t root_thread)
Definition: TRootXTReq.cc:132
TRootXTReq::sQueueMutex
static TMutex * sQueueMutex
Definition: TRootXTReq.h:25
TRootXTReq::Act
virtual void Act()=0
TRootXTReq::~TRootXTReq
virtual ~TRootXTReq()
Definition: TRootXTReq.cc:50
TRootXTReq::lpXTReq_t
std::list< TRootXTReq * > lpXTReq_t
Definition: TRootXTReq.h:19
TRootXTReq::sSheduled
static bool sSheduled
Definition: TRootXTReq.h:27
TRootXTReq
Definition: TRootXTReq.h:17
TRootXTReq::sRootThread
static pthread_t sRootThread
Definition: TRootXTReq.h:24
TRootXTReq::TRootXTReq
TRootXTReq(const char *n="TRootXTReq")
Definition: TRootXTReq.cc:48
TRootXTReq::sQueue
static lpXTReq_t sQueue
Definition: TRootXTReq.h:23