GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4LockGuard.h
Go to the documentation of this file.
1 // $Id: TGo4LockGuard.h 2627 2019-10-01 08:02:45Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4LOCKGUARD_H
15 #define TGO4LOCKGUARD_H
16 
36 #include "Rtypes.h"
37 
38 class TMutex;
39 
41  public:
42 
43  TGo4LockGuard(TMutex* mutex=0, Bool_t = kFALSE);
44 
45  virtual ~TGo4LockGuard();
46 
47  static void LockMainMutex();
48 
49  static void UnLockMainMutex();
50 
51  static Int_t MainMutexLockCount();
52 
53  private:
54 
56  TMutex *fxMutex;
57 
59  Bool_t fbIsLocked;
60 
63  Bool_t fbIsMainMutex;
64 
69  static TMutex* fgxMainMutex;
70 
72  static Int_t fgiLockCount;
73 
74  ClassDef(TGo4LockGuard,1)
75 };
76 
77 #endif
static Int_t MainMutexLockCount()
Bool_t fbIsMainMutex
Definition: TGo4LockGuard.h:63
Bool_t fbIsLocked
Definition: TGo4LockGuard.h:59
TMutex * fxMutex
Definition: TGo4LockGuard.h:56
static TMutex * fgxMainMutex
Definition: TGo4LockGuard.h:69
static void UnLockMainMutex()
static Int_t fgiLockCount
Definition: TGo4LockGuard.h:72
virtual ~TGo4LockGuard()
static void LockMainMutex()