22#include "RConfigure.h"
149 ::Warning(
"THttpServer::THttpServer",
"problems resolving '%s', set JSROOTSYS to proper JavaScript ROOT location",
177 ::Warning(
"THttpServer::THttpServer",
"Fail to load TRootSnifferFull class, use basic functionality");
183 sniff->CreateOwnTopFolder();
191 if (
strchr(engine,
';') == 0) {
197 const char *opt =
lst->At(
n)->GetName();
198 if ((
strcmp(opt,
"readonly") == 0) || (
strcmp(opt,
"ro") == 0)) {
200 }
else if ((
strcmp(opt,
"readwrite") == 0) || (
strcmp(opt,
"rw") == 0)) {
202 }
else if (
strcmp(opt,
"global") == 0) {
204 }
else if (
strcmp(opt,
"noglobal") == 0) {
206 }
else if (
strncmp(opt,
"cors=", 5) == 0) {
208 }
else if (
strcmp(opt,
"cors") == 0) {
229 while (
auto engine =
dynamic_cast<THttpEngine *
>(iter()))
337 if (!prefix || (*prefix == 0))
360 fJSROOT = location ? location :
"";
427 const char *arg =
strchr(engine,
':');
433 clname.Append(engine, arg - engine);
441 }
else if (
clname ==
"socket") {
447 }
else if (
clname ==
"https") {
449 }
else if (
clname ==
"fastcgi") {
464 eng->SetServer(
this);
466 if (!
eng->Create(arg)) {
501 Error(
"SetTimer",
"Server runs already in special thread, therefore no any timer can be created");
527 std::thread
thrd([
this] {
537 std::this_thread::sleep_for(std::chrono::milliseconds(1));
617 if (!uri || (*uri == 0))
626 fname.Remove(0, pos + (
entry.first.length() - 1));
629 res =
entry.second.c_str();
630 if ((
fname[0] ==
'/') && (res[res.
Length() - 1] ==
'/'))
659 std::unique_lock<std::mutex>
lk(
fMutex);
660 arg->fNotifyFlag =
kFALSE;
689 arg->NotifyCondition();
694 std::unique_lock<std::mutex>
lk(
fMutex);
715 Warning(
"ProcessRequests",
"Changing main thread to %ld", (
long)
id);
735 std::unique_lock<std::mutex>
lk(
fMutex, std::defer_lock);
739 std::shared_ptr<THttpCallArg> arg;
742 if (!
fArgs.empty()) {
751 if (arg->fFileName ==
"root_batch_holder.js") {
756 auto prev =
fSniffer->SetCurrentCallArg(arg.get());
766 arg->NotifyCondition();
771 while (
auto engine =
static_cast<THttpEngine *
>(iter())) {
804 if (!
wsptr || !
wsptr->ProcessBatchHolder(arg)) {
806 arg->NotifyCondition();
816 std::string
arr =
"[";
821 if (
arr.length() > 1)
824 arr.append(
TString::Format(
"{ name: \"%s\", title: \"%s\" }", ws->GetName(), ws->GetTitle()).Data());
832 std::string arg =
"\"$$$wslist$$$\"";
834 auto pos = res.find(arg);
835 if (pos != std::string::npos)
836 res.replace(pos, arg.length(),
arr);
850 const std::string
place_holder =
"<!--jsroot_importmap-->";
858 if (arg->fPathName.Length() > 0)
860 for (
Int_t n = 1;
n < arg->fPathName.Length()-1; ++
n)
861 if (arg->fPathName[
n] ==
'/') {
862 if (arg->fPathName[
n-1] !=
'/') {
876 std::string
search =
"from './jsrootsys/";
877 std::string replace =
"from './" +
version +
"/jsrootsys/";
878 arg->ReplaceAllinContent(
search, replace);
880 search =
"from './rootui5sys/";
881 replace =
"from './" +
version +
"/rootui5sys/";
882 arg->ReplaceAllinContent(
search, replace);
884 search =
"jsrootsys/scripts/JSRoot.core.";
885 replace =
version +
"/jsrootsys/scripts/JSRoot.core.";
886 arg->ReplaceAllinContent(
search, replace,
true);
887 arg->AddNoCacheHeader();
895 if (
repl.back() !=
'/')
901 repl.append(
"jsrootsys/");
906 arg->ReplaceAllinContent(
"=\"jsrootsys/",
repl);
907 arg->ReplaceAllinContent(
"from './jsrootsys/",
TString::Format(
"from '%s",
repl.substr(2).c_str()).Data());
932 static std::map<std::string, std::string>
modules = {
933 {
"jsroot",
"main.mjs"}, {
"jsroot/core",
"core.mjs"},
934 {
"jsroot/io",
"io.mjs"}, {
"jsroot/tree",
"tree.mjs"},
935 {
"jsroot/draw",
"draw.mjs"}, {
"jsroot/gui",
"gui.mjs"},
936 {
"jsroot/d3",
"d3.mjs"}, {
"jsroot/three",
"three.mjs"}, {
"jsroot/three_addons",
"three_addons.mjs"},
937 {
"jsroot/geom",
"geom/TGeoPainter.mjs"}, {
"jsroot/hpainter",
"gui/HierarchyPainter.mjs"},
938 {
"jsroot/webwindow",
"webwindow.mjs"}
957 if (
entry.first !=
"jsrootsys/")
983 if ((arg->fFileName ==
"root.websocket") || (arg->fFileName ==
"root.longpoll")) {
988 if (arg->fFileName.IsNull() || (arg->fFileName ==
"index.htm") || (arg->fFileName ==
"default.htm")) {
992 if (arg->fFileName ==
"default.htm") {
1000 auto handler =
wsptr.get();
1007 arg->fContent = handler->GetDefaultPageContent().Data();
1009 if (arg->fContent.find(
"file:") == 0) {
1010 const char *
fname = arg->fContent.c_str() + 5;
1016 version = handler->GetCodeVersion();
1018 handler->VerifyDefaultPageContent(arg);
1022 if (arg->fContent.empty() && arg->fFileName.IsNull() && arg->fPathName.IsNull() &&
IsWSOnly()) {
1027 arg->SetContent(
"refused");
1031 if (arg->fContent.empty() && !
IsWSOnly()) {
1039 if (arg->fContent.empty()) {
1042 }
else if (!arg->Is404()) {
1046 const char *
hjsontag =
"\"$$$h.json$$$\"";
1049 if (arg->fContent.find(
hjsontag) != std::string::npos) {
1053 if (arg->fTopName.Length() > 0)
1054 topname = arg->fTopName.Data();
1059 arg->AddNoCacheHeader();
1061 if (arg->fQuery.Index(
"nozip") ==
kNPOS)
1064 arg->SetContentType(
"text/html");
1069 if ((arg->fFileName ==
"draw.htm") && !
IsWSOnly()) {
1077 const char *
hjsontag =
"\"$$$h.json$$$\"";
1083 if ((arg->fQuery.Index(
"no_h_json") ==
kNPOS) && (arg->fQuery.Index(
"webcanvas") ==
kNPOS) &&
1084 (arg->fContent.find(
hjsontag) != std::string::npos)) {
1088 if (arg->fTopName.Length() > 0)
1089 topname = arg->fTopName.Data();
1095 if ((arg->fQuery.Index(
"no_root_json") ==
kNPOS) && (arg->fQuery.Index(
"webcanvas") ==
kNPOS) &&
1096 (arg->fContent.find(
rootjsontag) != std::string::npos)) {
1098 if (
fSniffer->Produce(arg->fPathName.Data(),
"root.json",
"compact=23", str))
1101 arg->AddNoCacheHeader();
1102 if (arg->fQuery.Index(
"nozip") ==
kNPOS)
1104 arg->SetContentType(
"text/html");
1109 if ((arg->fFileName ==
"favicon.ico") && arg->fPathName.IsNull()) {
1110 arg->SetFile(
fJSROOTSYS +
"/img/RootIcon.ico");
1121 if (!arg->fPathName.IsNull() && !arg->fFileName.IsNull()) {
1123 auto pos =
wsname.First(
'/');
1127 wsname = arg->fPathName(0, pos);
1128 fname = arg->fPathName(pos + 1, arg->fPathName.Length() - pos);
1132 fname.Append(arg->fFileName);
1138 if (ws && ws->CanServeFiles()) {
1139 TString fdir = ws->GetDefaultPageContent();
1141 if (fdir.
Index(
"file:") == 0) {
1166 if (arg->fContent.empty())
1174 res.
Form(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
1184 if (arg->fTopName.Length() > 0)
1185 topname = arg->fTopName.Data();
1193 arg->SetContent(std::string(res.
Data()));
1200 if (arg->fTopName.Length() > 0)
1201 topname = arg->fTopName.Data();
1203 arg->SetContent(std::string(res.
Data()));
1205 }
else if (
fSniffer->Produce(arg->fPathName.Data(),
filename.Data(), arg->fQuery.Data(), arg->fContent)) {
1222 const char *
parname =
fSniffer->IsStreamerInfoItem(arg->fPathName.Data()) ?
"BVersion" :
"MVersion";
1227 arg->AddNoCacheHeader();
1231 arg->AddHeader(
"Access-Control-Allow-Origin",
GetCors());
1234 arg->AddHeader(
"Access-Control-Expose-Headers",
"Content-Range, Content-Length, Date");
1235 arg->AddHeader(
"Access-Control-Allow-Methods",
"GET, HEAD, OPTIONS");
1256 return fSniffer->UnregisterObject(obj);
1309 auto handler =
wsptr.get();
1314 if (
external_thrd && (!handler || !handler->AllowMTProcess())) {
1316 std::unique_lock<std::mutex>
lk(
fMutex);
1320 arg->fCond.wait(
lk);
1332 if (arg->fFileName ==
"root.websocket") {
1334 process = handler->HandleWS(arg);
1335 }
else if (arg->fFileName ==
"root.longpoll") {
1337 if (arg->fQuery.BeginsWith(
"raw_connect") || arg->fQuery.BeginsWith(
"txt_connect")) {
1340 arg->SetMethod(
"WS_CONNECT");
1342 bool israw = arg->fQuery.BeginsWith(
"raw_connect");
1347 if (handler->HandleWS(arg)) {
1348 arg->SetMethod(
"WS_READY");
1350 if (handler->HandleWS(arg))
1351 arg->SetTextContent(std::string(
israw ?
"txt:" :
"") + std::to_string(arg->GetWSId()));
1353 arg->TakeWSEngine();
1356 process = arg->IsText();
1359 url.SetOptions(arg->fQuery);
1361 const char *connid =
url.GetValueFromOptions(
"connection");
1363 arg->SetWSId(std::stoul(connid));
1364 if (
url.HasOption(
"close")) {
1365 arg->SetMethod(
"WS_CLOSE");
1366 arg->SetTextContent(
"OK");
1368 arg->SetMethod(
"WS_DATA");
1371 process = handler->HandleWS(arg);
1457 return fSniffer->CreateItem(fullname, title);
1481 static const struct {
1486 {
".json", 5,
"application/json"},
1487 {
".bin", 4,
"application/x-binary"},
1488 {
".gif", 4,
"image/gif"},
1489 {
".jpg", 4,
"image/jpeg"},
1490 {
".png", 4,
"image/png"},
1491 {
".html", 5,
"text/html"},
1492 {
".htm", 4,
"text/html"},
1493 {
".shtm", 5,
"text/html"},
1494 {
".shtml", 6,
"text/html"},
1495 {
".css", 4,
"text/css"},
1496 {
".js", 3,
"application/x-javascript"},
1497 {
".mjs", 4,
"text/javascript"},
1498 {
".ico", 4,
"image/x-icon"},
1499 {
".jpeg", 5,
"image/jpeg"},
1500 {
".svg", 4,
"image/svg+xml"},
1501 {
".txt", 4,
"text/plain"},
1502 {
".torrent", 8,
"application/x-bittorrent"},
1503 {
".wav", 4,
"audio/x-wav"},
1504 {
".mp3", 4,
"audio/x-mp3"},
1505 {
".mid", 4,
"audio/mid"},
1506 {
".m3u", 4,
"audio/x-mpegurl"},
1507 {
".ogg", 4,
"application/ogg"},
1508 {
".ram", 4,
"audio/x-pn-realaudio"},
1509 {
".xslt", 5,
"application/xml"},
1510 {
".xsl", 4,
"application/xml"},
1511 {
".ra", 3,
"audio/x-pn-realaudio"},
1512 {
".doc", 4,
"application/msword"},
1513 {
".exe", 4,
"application/octet-stream"},
1514 {
".zip", 4,
"application/x-zip-compressed"},
1515 {
".xls", 4,
"application/excel"},
1516 {
".tgz", 4,
"application/x-tar-gz"},
1517 {
".tar", 4,
"application/x-tar"},
1518 {
".gz", 3,
"application/x-gunzip"},
1519 {
".arj", 4,
"application/x-arj-compressed"},
1520 {
".rar", 4,
"application/x-arj-compressed"},
1521 {
".rtf", 4,
"application/rtf"},
1522 {
".pdf", 4,
"application/pdf"},
1523 {
".swf", 4,
"application/x-shockwave-flash"},
1524 {
".mpg", 4,
"video/mpeg"},
1525 {
".webm", 5,
"video/webm"},
1526 {
".mpeg", 5,
"video/mpeg"},
1527 {
".mov", 4,
"video/quicktime"},
1528 {
".mp4", 4,
"video/mp4"},
1529 {
".m4v", 4,
"video/x-m4v"},
1530 {
".asf", 4,
"video/x-ms-asf"},
1531 {
".avi", 4,
"video/x-msvideo"},
1532 {
".bmp", 4,
"image/bmp"},
1533 {
".ttf", 4,
"application/x-font-ttf"},
1534 {
".woff", 5,
"font/woff"},
1535 {
".woff2", 6,
"font/woff2"},
1549 return "text/plain";
1561 std::ifstream
is(
filename, std::ios::in | std::ios::binary);
1567 is.seekg(0,
is.beg);
1585 std::ifstream
is(
filename, std::ios::in | std::ios::binary);
1588 is.seekg(0, std::ios::end);
1589 res.resize(
is.tellg());
1590 is.seekg(0, std::ios::beg);
1591 is.read((
char *)res.data(), res.length());
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char mode
Int_t gDebug
Global variable setting the debug level. Set to 0 to disable, increase it in steps of 1 to increase t...
R__EXTERN TSystem * gSystem
static const struct @140 builtin_mime_types[]
const_iterator end() const
THttpEngine implementation, based on civetweb embedded server.
TClass instances represent classes, structs and namespaces in the ROOT type system.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
THttpEngine implementation, based on fastcgi package.
Contains arguments for single HTTP call.
void Set404()
mark reply as 404 error - page/request not exists or refused
Abstract class for implementing http protocol for THttpServer.
Emulation of websocket with long poll requests.
Online http server for arbitrary ROOT application.
Bool_t IsReadOnly() const
returns read-only mode
Bool_t RegisterCommand(const char *cmdname, const char *method, const char *icon=nullptr)
Register command which can be executed from web interface.
TString fJSROOT
! location of external JSROOT files
virtual void ProcessRequest(std::shared_ptr< THttpCallArg > arg)
Process single http request.
std::shared_ptr< THttpWSHandler > FindWS(const char *name)
Find web-socket handler with given name.
std::unique_ptr< TRootSniffer > fSniffer
! sniffer provides access to ROOT objects hierarchy
void SetTimer(Long_t milliSec=100, Bool_t mode=kTRUE)
Create timer which will invoke ProcessRequests() function periodically.
virtual void ProcessBatchHolder(std::shared_ptr< THttpCallArg > &arg)
Process special http request for root_batch_holder.js script.
std::vector< std::shared_ptr< THttpWSHandler > > fWSHandlers
! list of WS handlers
virtual ~THttpServer()
destructor
void SetTerminate()
set termination flag, no any further requests will be processed
virtual void MissedRequest(THttpCallArg *arg)
Method called when THttpServer cannot process request.
Bool_t fOwnThread
! true when specialized thread allocated for processing requests
void SetSniffer(TRootSniffer *sniff)
Set TRootSniffer to the server.
Bool_t IsFileRequested(const char *uri, TString &res) const
Check if file is requested, thread safe.
void SetReadOnly(Bool_t readonly=kTRUE)
Set read-only mode for the server (default on)
const char * GetItemField(const char *fullname, const char *name)
Get item field from sniffer.
const char * GetCors() const
Returns specified CORS domain.
std::thread fThrd
! own thread
void StopServerThread()
Stop server thread.
Int_t ProcessRequests()
Process submitted requests, must be called from appropriate thread.
Bool_t ExecuteWS(std::shared_ptr< THttpCallArg > &arg, Bool_t external_thrd=kFALSE, Bool_t wait_process=kFALSE)
Execute WS request.
void RegisterWS(std::shared_ptr< THttpWSHandler > ws)
Register WS handler.
Long_t fProcessingThrdId
! id of the thread where events are recently processing
TString fTopName
! name of top folder, default - "ROOT"
void SetDrawPage(const std::string &filename="")
Set drawing HTML page.
Bool_t CreateItem(const char *fullname, const char *title)
Create item in sniffer.
Bool_t ExecuteHttp(std::shared_ptr< THttpCallArg > arg)
Execute HTTP request.
Bool_t Hide(const char *fullname, Bool_t hide=kTRUE)
Hides folder or element from web gui.
Bool_t IsCorsCredentials() const
Returns kTRUE if Access-Control-Allow-Credentials header should be used.
void AddLocation(const char *prefix, const char *path)
Add files location, which could be used in the server.
std::map< std::string, std::string > fLocations
! list of local directories, which could be accessed via server
Bool_t SubmitHttp(std::shared_ptr< THttpCallArg > arg, Bool_t can_run_immediately=kFALSE)
Submit HTTP request.
Long_t fMainThrdId
! id of the thread for processing requests
TString fJSROOTSYS
! location of local JSROOT files
std::unique_ptr< THttpTimer > fTimer
! timer used to access main thread
Bool_t fWSOnly
! when true, handle only websockets / longpoll engine
Bool_t Register(const char *subfolder, TObject *obj)
Register object in subfolder.
TList fEngines
! engines which runs http server
void SetCors(const std::string &domain="*")
Enable CORS header to ProcessRequests() responses Specified location (typically "*") add as "Access-C...
Bool_t IsCors() const
Returns kTRUE if CORS was configured.
const char * GetCorsCredentials() const
Returns specified CORS credentials value - if any.
std::queue< std::shared_ptr< THttpCallArg > > fArgs
! submitted arguments
void SetDefaultPage(const std::string &filename="")
Set default HTML page.
THttpServer(const THttpServer &)=delete
static char * ReadFileContent(const char *filename, Int_t &len)
Reads content of file from the disk.
void CreateServerThread()
Creates special thread to process all requests, directed to http server.
std::string fDrawPageCont
! content of draw html page
Bool_t Unregister(TObject *obj)
Unregister object.
void SetWSOnly(Bool_t on=kTRUE)
Set websocket-only mode.
std::string BuildWSEntryPage()
Create summary page with active WS handlers.
Bool_t IsWSOnly() const
returns true if only websockets are handled by the server
std::mutex fWSMutex
! mutex to protect WS handler lists
virtual Bool_t CreateEngine(const char *engine)
Factory method to create different http engines.
Bool_t SetIcon(const char *fullname, const char *iconname)
Set name of icon, used in browser together with the item.
std::string fDrawPage
! file name for drawing of single element
std::string fDefaultPageCont
! content of default html page
static Bool_t VerifyFilePath(const char *fname)
Checked that filename does not contains relative path below current directory.
Bool_t IsAllowPostObject() const
Returns true if server accept object content in POST reequests.
Bool_t SetItemField(const char *fullname, const char *name, const char *value)
Set item field in sniffer.
void SetAllowPostObject(Bool_t allow_post_obj)
Set flag to allow receive and desereilize objects in POST requests.
void SetJSROOT(const char *location)
Set location of JSROOT to use with the server.
std::mutex fMutex
! mutex to protect list with arguments
std::string fDefaultPage
! file name for default page name
void UnregisterWS(std::shared_ptr< THttpWSHandler > ws)
Unregister WS handler.
static const char * GetMimeType(const char *path)
Guess mime type base on file extension.
TRootSniffer * GetSniffer() const
returns pointer on objects sniffer
void ReplaceJSROOTLinks(std::shared_ptr< THttpCallArg > &arg, const std::string &version="")
Replaces all references like "jsrootsys/..." or other pre-configured pathes.
Bool_t fTerminated
! termination flag, disables all requests processing
void Restrict(const char *path, const char *options)
Restrict access to specified object.
void Timeout() override
timeout handler used to process http requests in main ROOT thread
THttpTimer(Long_t milliSec, Bool_t mode, THttpServer &serv)
!< server processing requests
Class for user-side handling of websocket with THttpServer.
void Add(TObject *obj) override
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
The TNamed class is the base class for all named ROOT classes.
Mother of all ROOT objects.
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.
static const TString & GetRootSys()
Get the rootsys directory in the installation. Static utility function.
static const TString & GetDataDir()
Get the data directory in the installation. Static utility function.
Storage of hierarchy scan in TRootSniffer in JSON format.
Storage of hierarchy scan in TRootSniffer in XML format.
Sniffer of ROOT objects, data provider for THttpServer.
void SetReadOnly(Bool_t on=kTRUE)
When readonly on (default), sniffer is not allowed to change ROOT structures For instance,...
void SetScanGlobalDir(Bool_t on=kTRUE)
When enabled (default), sniffer scans gROOT for files, canvases, histograms.
const char * Data() const
void Resize(Ssiz_t n)
Resize the string. Truncate or add blanks as necessary.
Ssiz_t Last(char c) const
Find last occurrence of a character c.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
TString & Remove(Ssiz_t pos)
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
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.
static Long_t SelfId()
Static method returning the id for the current thread.
Handles synchronous and a-synchronous timer events.
This class represents a WWW compatible URL.