34 if (url && strlen(url) > 0) {
70 Warning(
"IsStaged",
"TXNetSystem not initialized");
85 if (opt && strlen(opt) > 0) {
88 while (xo.Tokenize(io, from,
"[ ,|]")) {
93 if (i >= 0 && i <= 255)
101 if (i >= 0 && i <= 255)
112 Warning(
"Stage",
"TXNetSystem not initialized");
135 while (xo.Tokenize(io, from,
"[ ,|]")) {
140 if (i >= 0 && i <= 255)
148 if (i >= 0 && i <= 255)
161 Warning(
"Stage",
"TXNetSystem not initialized");
171 ::Info(
"TXNetFileStager::GetPrefix",
"enter: %s", url);
183 ::Info(
"TXNetFileStager::GetPrefix",
"found prefix: %s", pfx.
Data());
233 Error(
"Locate",
"No input collection given!");
254 Info(
"Locate",
"Bulk xprep done in %.1lfs (returned %d)",
261 while ((fi =
dynamic_cast<TFileInfo *
>(it.
Next())) != NULL) {
268 Info(
"Locate",
"Stager non initialized, doing it now for %s",
283 Info(
"Locate",
"Not found: %s", surl.
Data());
293 else if (addDummyUrl) {
299 Info(
"Locate",
"Found: %s --> %s", surl.
Data(), endp.
Data());
307 Info(
"Locate",
"All locates finished in %.1lfs", ts.
RealTime());
308 Info(
"Locate",
"Mass prepare and locates took %.1lfs", timeTaken_s);
char * Form(const char *fmt,...)
void Printf(const char *fmt,...)
static struct mg_connection * fc(struct mg_context *ctx)
Collection abstract base class.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries.
Class describing a generic file including meta information.
Bool_t AddUrl(const char *url, Bool_t infront=kFALSE)
Add a new URL.
TUrl * GetCurrentUrl() const
Return the current url.
virtual const char * GetName() const
Returns name of object.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
TString & Insert(Ssiz_t pos, const char *s)
Int_t Atoi() const
Return integer value of string.
const char * Data() const
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
This class represents a WWW compatible URL.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
const char * GetUser() const
const char * GetHost() const
const char * GetProtocol() const
Bool_t IsStaged(const char *path)
Check if the file defined by 'path' is ready to be used.
Bool_t Matches(const char *s)
Returns kTRUE if stager 's' is compatible with current stager.
Int_t LocateCollection(TFileCollection *fc, Bool_t addDummyUrl=kFALSE)
Bulk locate request for a collection of files.
static void GetPrefix(const char *url, TString &pfx)
Isolate prefix in url.
void Print(Option_t *option="") const
Print basic info about this stager.
virtual ~TXNetFileStager()
Destructor.
Bool_t Stage(const char *path, Option_t *opt=0)
Issue a stage request for file defined by 'path'.
TXNetFileStager(const char *stager="")
Constructor. Init a TXNetSystem instance to the XRD system.
Int_t Locate(const char *path, TString &endpath)
Get actual end-point url for a path Returns 0 in case of success and 1 if any error occured.
Bool_t IsOnline(const char *path)
Check if the file defined by 'path' is ready to be used.
Bool_t Prepare(const char *path, UChar_t opt=8, UChar_t prio=0)
Issue a prepare request for file defined by 'path'.
virtual Int_t Locate(const char *path, TString &endurl)
Get end-point url of a file.
static constexpr double s