28 std::string
locate (
const std::string& locations)
30 std::deque<std::string>
files;
32 std::string::size_type pos = 0, pos2 = 0;
33 while ((pos2 = locations.find (
"::", pos)) != std::string::npos)
35 files.push_back (locations.substr (pos, pos2 - pos));
38 files.push_back (locations.substr (pos));
42 for (std::deque<std::string>::const_iterator
file =
files.begin(),
45 std::string::size_type
split =
file->rfind (
'/');
46 if (
split == std::string::npos)
48 std::string myname =
file->substr (
split + 1);
52 name = std::move(myname);
53 else if (name != myname)
54 RCU_THROW_MSG (
"inconsistent file names " + name +
" and " + myname);
59 files.push_front (
"$ROOTCOREBIN/data/RootCoreUtils/download/" + name);
60 for (std::deque<std::string>::iterator
file =
files.begin(),
63 TString myfile = *
file;
64 gSystem->ExpandPathName (myfile);
65 *
file = myfile.Data();
68 for (std::deque<std::string>::const_iterator
file =
files.begin(),
71 if (
file->find (
"http://") == 0)
84 if (gSystem->AccessPathName (
file->c_str()) == 0)