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);
R__EXTERN TSystem * gSystem
A ROOT file is composed of a header, followed by consecutive data records (TKey instances) with a wel...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
A scoped lock based on files.
~TLockFile() override
Destructor. Releases the lock.
TString fPath
Path to file holding the lock.
TLockFile(const TLockFile &)=delete
Bool_t Lock(const char *path, Int_t timeLimit)
Internal function that locks with the given path.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
const char * Data() const
virtual int Chmod(const char *file, UInt_t mode)
Set the file permission bits. Returns -1 in case or error, 0 otherwise.
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.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
virtual int Unlink(const char *name)
Unlink, i.e.