35 if (url && strlen(url) > 0) {
71 Warning(
"IsStaged",
"TXNetSystem not initialized");
86 if (opt && strlen(opt) > 0) {
89 while (xo.Tokenize(io, from,
"[ ,|]")) {
94 if (i >= 0 && i <= 255)
102 if (i >= 0 && i <= 255)
113 Warning(
"Stage",
"TXNetSystem not initialized");
136 while (xo.Tokenize(io, from,
"[ ,|]")) {
141 if (i >= 0 && i <= 255)
149 if (i >= 0 && i <= 255)
162 Warning(
"Stage",
"TXNetSystem not initialized");
172 ::Info(
"TXNetFileStager::GetPrefix",
"enter: %s", url);
184 ::Info(
"TXNetFileStager::GetPrefix",
"found prefix: %s", pfx.Data());
234 Error(
"Locate",
"No input collection given!");
255 Info(
"Locate",
"Bulk xprep done in %.1lfs (returned %d)",
262 while ((fi = dynamic_cast<TFileInfo *>(it.Next())) !=
NULL) {
269 Info(
"Locate",
"Stager non initialized, doing it now for %s",
284 Info(
"Locate",
"Not found: %s", surl.
Data());
294 else if (addDummyUrl) {
300 Info(
"Locate",
"Found: %s --> %s", surl.
Data(), endp.
Data());
308 Info(
"Locate",
"All locates finished in %.1lfs", ts.
RealTime());
309 Info(
"Locate",
"Mass prepare and locates took %.1lfs", timeTaken_s);
const char * GetHost() const
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...
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.
Bool_t IsOnline(const char *path)
Check if the file defined by 'path' is ready to be used.
This class represents a WWW compatible URL.
TString & ReplaceAll(const TString &s1, const TString &s2)
const char * GetProtocol() const
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Bool_t AddUrl(const char *url, Bool_t infront=kFALSE)
Add a new URL.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Insert(Ssiz_t pos, const char *s)
void Print(Option_t *option="") const
Print basic info about this stager.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
const char * Data() const
static struct mg_connection * fc(struct mg_context *ctx)
virtual Int_t Locate(const char *path, TString &endurl)
Get end-point url of a file.
Int_t Atoi() const
Return integer value of string.
Bool_t Matches(const char *s)
Returns kTRUE if stager 's' is compatible with current stager.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Collection abstract base class.
char * Form(const char *fmt,...)
virtual const char * GetName() const
Returns name of object.
virtual ~TXNetFileStager()
Destructor.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
Bool_t Prepare(const char *path, UChar_t opt=8, UChar_t prio=0)
Issue a prepare request for file defined by 'path'.
Bool_t IsStaged(const char *path)
Check if the file defined by 'path' is ready to be used.
Bool_t Stage(const char *path, Option_t *opt=0)
Issue a stage request for file defined by 'path'.
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
TUrl * GetCurrentUrl() const
Return the current url.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries...
Int_t LocateCollection(TFileCollection *fc, Bool_t addDummyUrl=kFALSE)
Bulk locate request for a collection of files.
TXNetFileStager(const char *stager="")
Constructor. Init a TXNetSystem instance to the XRD system.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Class describing a generic file including meta information.
static void GetPrefix(const char *url, TString &pfx)
Isolate prefix in url.
const char * GetUser() const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.