Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TLockFile.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/io:$Id$
0002 // Author: Jan Fiete Grosse-Oetringhaus, 04.06.07
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TLockFile
0013 #define ROOT_TLockFile
0014 
0015 #include "TObject.h"
0016 #include "TString.h"
0017 
0018 
0019 class TLockFile : public TObject {
0020 
0021 private:
0022    TLockFile(const TLockFile&) = delete;             // not implemented
0023    TLockFile& operator=(const TLockFile&) = delete;  // not implemented
0024 
0025 protected:
0026    TString fPath;         ///< Path to file holding the lock
0027 
0028    Bool_t Lock(const char *path, Int_t timeLimit);
0029 
0030 public:
0031    TLockFile(const char *path, Int_t timeLimit = 0);
0032    ~TLockFile() override;
0033 
0034    ClassDefOverride(TLockFile, 0) //Lock an object using a file
0035 };
0036 
0037 #endif