50 static std::vector<REveAssetDir *> s_instances;
68 v.erase(std::remove(
v.begin(),
v.end(),
this),
v.end());
76 if (dir.empty() || dir.back() ==
'/')
141 for (
auto &dir : *dirs) {
142 std::string path = dir + file;
158 for (
auto &dir : *dirs) {
162 return has1 && has2 ? dir : std::string();
195 std::vector<std::string> dirs;
197 for (
auto &dir : *
src) {
198 if (std::find(dirs.begin(), dirs.end(), dir) == dirs.end())
205 serv->AddLocation(
fPrefix.c_str(), dirs.front().c_str());
206 for (
size_t i = 1; i < dirs.size(); ++i)
207 serv->AppendLocation(
fPrefix.c_str(), dirs[i].c_str());
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
R__EXTERN TSystem * gSystem
static std::string NormalizeDir(const std::string &dir)
Return dir with a trailing slash; an empty dir stays empty.
void SetUserDir(const std::string &dir)
Replace the user directories with dir.
void AddUserDir(const std::string &dir)
Append dir to the user directories.
std::vector< std::string > fUserDirs
set by the user, searched first, in order
~REveAssetDir()
Destructor.
std::string WritePath(const std::string &file) const
Return the path to write file to, creating the write directory if it does not exist.
std::string fWriteDir
where new files are written; empty if none
void AddFallbackDir(const std::string &dir)
Append dir to the fallback directories.
static void RegisterAll()
Register all instances. Called from the REveManager constructor.
std::string fPrefix
http location prefix, such as "sdf-fonts/"
std::string Find(const std::string &file) const
Return the path of file in the first directory that has it, user directories first,...
static std::vector< REveAssetDir * > & Instances()
All existing instances, for RegisterAll().
REveAssetDir(const std::string &prefix)
Constructor. prefix is the http location prefix, with a trailing slash.
static std::string GetUi5Dir()
Return the directory the server maps to "rootui5sys/", found as RWebWindowsManager finds it: $ROOTUI5...
void Register() const
Pass the directories to the server, user directories first, then fallback directories,...
static std::string GetAssetsDir()
Return eve7/assets/ in the ui5 directory, where the build installs the RenderCore assets tarball.
std::string FindPair(const std::string &file1, const std::string &file2) const
Return the first directory that has file1 or file2 if it has both, else an empty string.
std::vector< std::string > fFallbackDirs
shipped with ROOT, read-only, searched after fUserDirs
std::shared_ptr< ROOT::RWebWindow > GetWebWindow() const
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
static const TString & GetDataDir()
Get the data directory in the installation. Static utility function.
const char * Data() const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Namespace for ROOT features in testing.
R__EXTERN REveManager * gEve