49 Info(
"TLockFile",
"did not aquire lock %s, sleeping...",
fPath.Data());
60 Info(
"~TLockFile",
"releasing lock %s",
fPath.Data());
71 if (
gSystem->GetPathInfo(path, 0, (
Long_t*) 0, 0, &modTime) == 0) {
74 Info(
"Lock",
"%s modification time %ld, %ld seconds ago", path, modTime, time(0) - modTime);
75 if (time(0) - modTime > timeLimit){
78 Info(
"Lock",
"time expired, removed %s", path);
86 spath +=
"?filetype=raw";
99 Info(
"Lock",
"obtained lock %s", path);
int Int_t
Signed integer 4 bytes (int).
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
bool Bool_t
Boolean (0=false, 1=true) (bool).
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
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.
void Close(Option_t *option="") override
Close a file.
~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.