50 Info(
"TLockFile",
"did not aquire lock %s, sleeping...",
fPath.
Data());
75 Info(
"Lock",
"%s modification time %ld, %ld seconds ago", path, modTime, time(0) - modTime);
76 if (time(0) - modTime > timeLimit){
79 Info(
"Lock",
"time expired, removed %s", path);
87 spath +=
"?filetype=raw";
100 Info(
"Lock",
"obtained lock %s", path);
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
TLockFile(const TLockFile &)
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
virtual int Unlink(const char *name)
Unlink, i.e. remove, a file.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
R__EXTERN TSystem * gSystem
virtual int Chmod(const char *file, UInt_t mode)
Set the file permission bits. Returns -1 in case or error, 0 otherwise.
A scoped lock based on files.
virtual ~TLockFile()
Destructor. Releases the lock.
Bool_t Lock(const char *path, Int_t timeLimit)
Internal function that locks with the given path.
TString fPath
Path to file holding the lock.
virtual void Close(Option_t *option="")
Close a file.
const char * Data() const