Logo ROOT  
Reference Guide
TLockFile.h
Go to the documentation of this file.
1 // @(#)root/io:$Id$
2 // Author: Jan Fiete Grosse-Oetringhaus, 04.06.07
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TLockFile
13 #define ROOT_TLockFile
14 
15 #include "TObject.h"
16 #include "TString.h"
17 
18 
19 class TLockFile : public TObject {
20 
21 private:
22  TLockFile(const TLockFile&) = delete; // not implemented
23  TLockFile& operator=(const TLockFile&) = delete; // not implemented
24 
25 protected:
26  TString fPath; ///< Path to file holding the lock
27 
28  Bool_t Lock(const char *path, Int_t timeLimit);
29 
30 public:
31  TLockFile(const char *path, Int_t timeLimit = 0);
32  virtual ~TLockFile();
33 
34  ClassDef(TLockFile, 0) //Lock an object using a file
35 };
36 
37 #endif
TLockFile::~TLockFile
virtual ~TLockFile()
Destructor. Releases the lock.
Definition: TLockFile.cxx:58
TString
Basic string class.
Definition: TString.h:136
TString.h
bool
TLockFile::Lock
Bool_t Lock(const char *path, Int_t timeLimit)
Internal function that locks with the given path.
Definition: TLockFile.cxx:69
TLockFile::fPath
TString fPath
Path to file holding the lock.
Definition: TLockFile.h:26
TLockFile::TLockFile
TLockFile(const TLockFile &)=delete
TLockFile::operator=
TLockFile & operator=(const TLockFile &)=delete
TLockFile
A scoped lock based on files.
Definition: TLockFile.h:19
TObject.h
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
int