64 if (!
p.BeginsWith(
"root:"))
70 Warning(
"IsStaged",
"TXNetSystem not initialized");
85 if (opt &&
strlen(opt) > 0) {
88 while (
xo.Tokenize(
io,
from,
"[ ,|]")) {
89 if (
io.Contains(
"option=")) {
90 io.ReplaceAll(
"option=",
"");
93 if (i >= 0 && i <= 255)
97 if (
io.Contains(
"priority=")) {
98 io.ReplaceAll(
"priority=",
"");
101 if (i >= 0 && i <= 255)
112 Warning(
"Stage",
"TXNetSystem not initialized");
135 while (
xo.Tokenize(
io,
from,
"[ ,|]")) {
136 if (
io.Contains(
"option=")) {
137 io.ReplaceAll(
"option=",
"");
140 if (i >= 0 && i <= 255)
144 if (
io.Contains(
"priority=")) {
145 io.ReplaceAll(
"priority=",
"");
148 if (i >= 0 && i <= 255)
161 Warning(
"Stage",
"TXNetSystem not initialized");
171 ::Info(
"TXNetFileStager::GetPrefix",
"enter: %s",
url);
174 pfx =
Form(
"%s://",
u.GetProtocol());
178 if (
u.GetPort() !=
TUrl(
"root://host").GetPort())
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)",
263 surl =
fi->GetCurrentUrl()->GetUrl();
268 Info(
"Locate",
"Stager non initialized, doing it now for %s",
280 fi->AddUrl(
"noop://none",
kTRUE);
283 Info(
"Locate",
"Not found: %s",
surl.Data());
295 fi->AddUrl(
"noop://redir",
kTRUE);
299 Info(
"Locate",
"Found: %s --> %s",
surl.Data(),
endp.Data());
307 Info(
"Locate",
"All locates finished in %.1lfs",
ts.RealTime());
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
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.
const char * GetName() const override
Returns name of object.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
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.
TString & Insert(Ssiz_t pos, const char *s)
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
This class represents a WWW compatible URL.
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.