25 std::string
locate (
const std::string& locations)
27 std::deque<std::string>
files;
29 std::string::size_type pos = 0, pos2 = 0;
30 while ((pos2 = locations.find (
"::", pos)) != std::string::npos)
32 files.push_back (locations.substr (pos, pos2 - pos));
35 files.push_back (locations.substr (pos));
39 for (std::deque<std::string>::const_iterator
file =
files.begin(),
42 std::string::size_type
split =
file->rfind (
'/');
43 if (
split == std::string::npos)
45 std::string myname =
file->substr (
split + 1);
49 name = std::move(myname);
50 else if (name != myname)
51 RCU_THROW_MSG (
"inconsistent file names " + name +
" and " + myname);
56 files.push_front (
"$ROOTCOREBIN/data/RootCoreUtils/download/" + name);
57 for (std::deque<std::string>::iterator
file =
files.begin(),
60 TString myfile = *
file;
61 gSystem->ExpandPathName (myfile);
62 *
file = myfile.Data();
65 for (std::deque<std::string>::const_iterator
file =
files.begin(),
68 if (
file->find (
"http://") == 0)
81 if (gSystem->AccessPathName (
file->c_str()) == 0)