47#define DSM_ONE_GB (1073741824)
62 fUser(user), fCommonUser(), fCommonGroup(),
63 fGroupQuota(), fGroupUsed(),
64 fUserUsed(), fNTouchedFiles(0), fNOpenedFiles(0),
65 fNDisappearedFiles(0), fMTimeGroupConfig(-1)
109 if (!(srvmapsenv.
IsNull())) {
111 if (!(srvmaps.
IsNull())) srvmaps +=
",";
112 srvmaps += srvmapsenv(1,srvmapsenv.
Length());
114 srvmaps = srvmapsenv;
118 Warning(
"TDataSetManager",
"problems parsing DataSet.SrvMaps input info (%s)"
119 " - ignoring", srvmaps.
Data());
161 if (opts && strlen(opts) > 0) {
215 Info(
"ReadGroupConfig",
"path to config file undefined - nothing to do");
225 Info(
"ReadGroupConfig",
"file has not changed - do nothing");
231 if (cf && (strlen(cf) > 0)) {
234 Error(
"ReadGroupConfig",
"could not stat %s", cf);
238 Error(
"ReadGroupConfig",
"cannot read %s", cf);
247 Info(
"ReadGroupConfig",
"reading group config from %s", cf);
253 Error(
"ReadGroupConfig",
"could not open config file %s", cf);
266 if (
line[0] ==
'#')
continue;
270 if (!
line.Tokenize(key, from,
" "))
273 if (key ==
"property") {
276 if (!
line.Tokenize(grp, from,
" ")) {
278 Info(
"ReadGroupConfig",
"incomplete line: '%s'",
line.Data());
283 if (!
line.Tokenize(
type, from,
" "))
285 if (
type ==
"diskquota") {
288 if (!
line.Tokenize(sdq, from,
" "))
298 "problems parsing string: wrong or unsupported suffix? %s",
301 }
else if (
type ==
"commonuser") {
304 if (!
line.Tokenize(comusr, from,
" "))
309 }
else if (key ==
"dataset") {
312 if (!
line.Tokenize(
type, from,
" ")) {
314 Info(
"ReadGroupConfig",
"incomplete line: '%s'",
line.Data());
317 if (
type ==
"commonuser") {
320 if (!
line.Tokenize(comusr, from,
" "))
323 }
else if (
type ==
"commongroup") {
326 if (!
line.Tokenize(comgrp, from,
" "))
329 }
else if (
type ==
"diskquota") {
332 if (!
line.Tokenize(on, from,
" "))
336 }
else if (on ==
"off") {
341 }
else if (key ==
"averagefilesize") {
345 if (!
line.Tokenize(avgsize, from,
" ")) {
347 Info(
"ReadGroupConfig",
"incomplete line: '%s'",
line.Data());
355 "problems parsing string: wrong or unsupported suffix? %s",
358 }
else if (key ==
"include") {
362 if (!
line.Tokenize(subfn, from,
" ")) {
364 Info(
"ReadGroupConfig",
"incomplete line: '%s'",
line.Data());
369 Error(
"ReadGroupConfig",
"request to parse file '%s' which is not readable",
374 Error(
"ReadGroupConfig",
"problems parsing include file '%s'", subfn.
Data());
393 if (!size || strlen(size) <= 0)
return lsize;
399 const char *unit[5] = {
"k",
"M",
"G",
"T",
"P"};
404 s.Remove(
s.Length()-1);
413 lsize =
s.Atoi() * fact;
502 if (opts && strlen(opts) > 0) {
504 if (strstr(opts,
"allfiles:") || strchr(opts,
'A'))
506 else if (strstr(opts,
"staged:") || strchr(opts,
'D'))
509 if (strstr(opts,
"open:") || strchr(opts,
'O'))
511 if (strstr(opts,
"touch:") || strchr(opts,
'T'))
513 if (strstr(opts,
"nostagedcheck:") || strchr(opts,
'I'))
516 if (strstr(opts,
"noaction:") || strchr(opts,
'N'))
518 if (strstr(opts,
"locateonly:") || strchr(opts,
'L'))
520 if (strstr(opts,
"stageonly:") || strchr(opts,
'S'))
523 if (strstr(opts,
"verbose:") || strchr(opts,
'V'))
555 Info(
"GetQuota",
"processing dataset %s %s %s",
group, user, dsName);
592 if (!groupQuotaMap || !userUsedMap)
596 TIter iter(groupQuotaMap);
603 Printf(
" +++ Group %s uses %.1f GB out of %.1f GB",
group->String().Data(),
615 TIter iter2(userMap);
627 Printf(
"------------------------------------------------------");
631 Printf(
" +++ Quota check enabled but no quota info available +++ ");
641 Info(
"PrintUsedSpace",
"listing used space");
651 if (userMap && size) {
655 TIter iter2(userMap);
665 Printf(
"------------------------------------------------------");
676 Info(
"MonitorUsedSpace",
"sending used space to monitoring server");
685 if (!userMap || !size)
692 if (groupQuota != -1)
695 TIter iter2(userMap);
706 Warning(
"MonitorUsedSpace",
"problems sending monitoring parameters");
724 Info(
"GetGroupUsed",
"group %s not found",
group);
744 Info(
"GetGroupQuota",
"group %s not found",
group);
807 const char *dsName,
const char *dsObjPath)
811 if (dsGroup && strlen(dsGroup) > 0) {
812 if (dsUser && strlen(dsUser) > 0) {
813 uri +=
Form(
"/%s/%s/", dsGroup, dsUser);
815 uri +=
Form(
"/%s/*/", dsGroup);
817 }
else if (dsUser && strlen(dsUser) > 0) {
818 uri +=
Form(
"%s/", dsUser);
820 if (dsName && strlen(dsName) > 0)
822 if (dsObjPath && strlen(dsObjPath) > 0)
823 uri +=
Form(
"#%s", dsObjPath);
852 if ((uristr.
Index(
'=') >= 0) && (uristr.
Index(
';') >= 0)) {
858 "Dataset URI looks like a virtual URI, treating it as such. "
859 "No group and user will be parsed!");
865 if (dsGroup) *dsGroup =
"";
866 if (dsUser) *dsUser =
"";
867 if (dsName) *dsName = reVirtualUri[1];
869 if (
nm == 4) *dsTree = reVirtualUri[3];
880 if (wildcards && uristr.
Length() > 0) {
885 if (
pc == 1) uristr +=
"/*/";
886 if (
pc == 2 && endsl) uristr +=
"*/";
887 if (
pc == 2 && !endsl) uristr +=
"/";
894 Info (
"ParseUri",
"URI query part <%s> ignored", resolved.
GetQuery().
Data());
900 Error (
"ParseUri",
"illegal dataset path: '%s'", uri);
902 }
else if (
pc >= 0 &&
pc < 3) {
907 }
else if (
pc == 1) {
909 }
else if (
pc == 0) {
916 Info(
"ParseUri",
"path: '%s'", path.
Data());
922 if (path.
Tokenize(user, from,
"/")) {
924 if (
gDebug > 0)
Info(
"ParseUri",
"'name' missing");
926 if (
gDebug > 0)
Info(
"ParseUri",
"'user' missing");
929 if (
gDebug > 1)
Info(
"ParseUri",
"'group' missing");
934 if (
tree.EndsWith(
"/"))
938 Info(
"ParseUri",
"group: '%s', user: '%s', dsname:'%s', seg: '%s'",
942 if ((user ==
"*" ||
group ==
"*") && !wildcards) {
943 Error (
"ParseUri",
"no wildcards allowed for user/group in this context (uri: '%s')", uri);
948 if (
name.IsNull() && !wildcards) {
949 Error (
"ParseUri",
"DataSet name is empty");
954 TPRegexp wcExp (wildcards ?
"^(?:[A-Za-z0-9-*_.]*|[*])$" :
"^[A-Za-z0-9-_.]*$");
958 Error(
"ParseUri",
"illegal characters in group (uri: '%s', group: '%s')", uri,
group.Data());
962 if (!wcExp.
Match(user)) {
963 Error(
"ParseUri",
"illegal characters in user (uri: '%s', user: '%s')", uri, user.
Data());
969 Error(
"ParseUri",
"illegal characters in name (uri: '%s', name: '%s')", uri,
name.Data());
974 Error(
"ParseUri",
"Illegal characters in subdir/object name (uri: '%s', obj: '%s')", uri,
tree.Data());
980 Error(
"ParseUri",
"only datasets from your group/user allowed");
1011 if (!ds || strlen(ds) <= 0) {
1012 Info(
"GetDataSets",
"dataset name undefined!");
1019 Info(
"GetDataSets",
"could not retrieve the dataset '%s'", ds);
1024 if (!(map =
fc->GetFilesPerServer(exclude))) {
1026 Info(
"GetDataSets",
"could not get map for '%s'", ds);
1052 if (
fc->GetTitle() && (strlen(
fc->GetTitle()) > 0)) {
1053 Printf(
"+++ Dumping: %s: ",
fc->GetTitle());
1055 Printf(
"+++ Dumping: %s: ",
fc->GetName());
1057 Printf(
"%s",
fc->ExportInfo(
"+++ Summary:", 1)->GetName());
1112 while ((o.
Tokenize(srv, from,
","))) {
1133 TString u(uri), grp, usr, dsn;
1135 if (u ==
"" || u ==
"*" || u ==
"/*" || u ==
"/*/" || u ==
"/*/*") u =
"/*/*/";
1137 Warning(
"ShowDataSets",
"problems parsing URI '%s'", uri);
1144 if (!u.IsNull() && !u.Contains(
"*") && !grp.
IsNull() && !usr.
IsNull() && !dsn.
IsNull()) {
1159 if (u.Index(reg) ==
kNPOS) grp =
"*";
1160 if (u.Index(reu) ==
kNPOS) usr =
"*";
1229 Int_t maxfiles,
const char *stageopts)
1232 if (maxfiles > -1 && dbg)
1233 ::Info(
"TDataSetManager::ScanDataSet",
"processing a maximum of %d files", maxfiles);
1249 if (scanlist && !flist) {
1250 ::Error(
"TDataSetManager::ScanDataSet",
"input list is mandatory for option 'scan file list'");
1256 Int_t fdisappeared = 0;
1260 TList *newStagedFiles = 0;
1265 if (doall || getlistonly) {
1268 newStagedFiles = (!doall && getlistonly && flist) ? flist :
new TList;
1281 while ((fileInfo = (
TFileInfo *) iter())) {
1290 stager, createStager, dbg, bchanged_fi, btouched,
1293 if (bchanged_fi) bchanged_ds =
kTRUE;
1294 if (btouched) ftouched++;
1295 if (bdisappeared) fdisappeared++;
1298 if (dbg && (ftouched+fdisappeared) % 100 == 0)
1299 ::Info(
"TDataSetManager::ScanDataSet",
"opening %d: file: %s",
1303 if (!noaction && newlystaged) newStagedFiles->
Add(fileInfo);
1310 ::Info(
"TDataSetManager::ScanDataSet",
" %d files appear to be newly staged",
1313 return ((bchanged_ds) ? 2 : 1);
1317 if (!noaction && (doall || scanlist)) {
1320 newStagedFiles = (!doall && scanlist && flist) ? flist : newStagedFiles;
1325 ::Info(
"TDataSetManager::ScanDataSet",
"opening %d files that appear to be newly staged",
1329 if (locateonly || stageonly) {
1336 if (fqnot > 100) fqnot = 100;
1340 TIter iter(newStagedFiles);
1341 while ((fileInfo = (
TFileInfo *) iter())) {
1343 if (dbg && (count%fqnot == 0))
1344 ::Info(
"TDataSetManager::ScanDataSet",
"processing %d.'new' file: %s",
1353 ProcessFile(fileInfo, sopt, checkstg, doall, stager, createStager,
1354 stageopts, dbg, bchanged_fi, bopened);
1356 bchanged_ds |= bchanged_fi;
1357 if (bopened) fopened++;
1359 if (newStagedFiles != flist)
SafeDelete(newStagedFiles);
1365 Int_t result = (bchanged_ds) ? 2 : 1;
1366 if (result > 0 && dbg)
1367 ::Info(
"TDataSetManager::ScanDataSet",
"%d files 'new'; %d files touched;"
1368 " %d files disappeared", fopened, ftouched, fdisappeared);
1371 if (touched) *touched = ftouched;
1372 if (opened) *opened = fopened;
1373 if (disappeared) *disappeared = fdisappeared;
1423 if (fopt >= 0) fopt %= 100;
1440 ::Error(
"TDataSetManager::CheckStagedStatus",
"GetCurrentUrl() returned 0 for %s",
1451 if (!reopen)
return kFALSE;
1456 const char *furl = curl->
GetUrl();
1459 furl = urlmod.
Data();
1465 uopt +=
"filetype=raw&mxredir=2";
1472 if (
file->ReadBuffer(&tmpChar, 1))
1473 ::Warning(
"TDataSetManager::CheckStagedStatus",
"problems reading 1 byte from open file");
1481 if (dbg)
::Info(
"TDataSetManager::CheckStagedStatus",
"file %s disappeared", url.
GetUrl());
1483 disappeared =
kTRUE;
1499 if (maxfiles > 0 && newstagedfiles >= maxfiles)
1507 const char *furl = curl->
GetUrl();
1511 furl = urlmod.
Data();
1524 ::Info(
"TDataSetManager::CheckStagedStatus",
"IsStaged: %s: %d", url.
GetUrl(), result);
1528 ::Warning(
"TDataSetManager::CheckStagedStatus",
1529 "could not get stager instance for '%s'", url.
GetUrl());
1578 const char *furl = curl->
GetUrl();
1582 furl = urlmod.
Data();
1590 if (!stager || (stager && !stager->
Matches(url.
GetUrl()))) {
1593 ::Error(
"TDataSetManager::ProcessFile",
1594 "could not get valid stager instance for '%s'", url.
GetUrl());
1602 if (stager && stager->
Locate(url.
GetUrl(), eurl) == 0) {
1615 ::Error(
"TDataSetManager::ProcessFile",
"could not locate %s", url.
GetUrl());
1618 }
else if (stageonly) {
1623 ::Error(
"TDataSetManager::ProcessFile",
1624 "problems issuing stage request for %s", url.
GetUrl());
1627 }
else if (fullproc) {
1640 }
else if (stager) {
1641 ::Warning(
"TDataSetManager::ProcessFile",
1642 "required file '%s' does not look as being online (staged)", url.
GetUrl());
1660 ::Error(
"TDataSetManager::ScanFile",
"undefined input (!)");
1672 if (timeout > 0) fileopt.
Form(
"TIMEOUT=%d", timeout);
1678 const char *furl = url->
GetUrl();
1681 furl = urlmod.
Data();
1685 TUrl urlNoAnchor(furl);
1689 unaopts +=
"&filetype=raw";
1691 unaopts =
"filetype=raw";
1704 if (
file->GetEndpointUrl()) {
1706 TUrl eurl(*(
file->GetEndpointUrl()));
1715 if (!strcmp(eurl.
GetHost(),
"localhost") || !strcmp(eurl.
GetHost(),
"127.0.0.1") ||
1716 !strcmp(eurl.
GetHost(),
"localhost.localdomain")) {
1726 ::Warning(
"TDataSetManager::ScanFile",
"end-point URL undefined for file %s",
file->GetName());
1743 if (dbg)
::Info(
"TDataSetManager::ScanFile",
"marking %s as corrupt", url->
GetUrl());
1748 }
else if (!anchor) {
1754 TUrl eurl(*(
file->GetEndpointUrl()));
1763 if (!strcmp(eurl.
GetHost(),
"localhost") || !strcmp(eurl.
GetHost(),
"127.0.0.1") ||
1764 !strcmp(eurl.
GetHost(),
"localhost.localdomain")) {
1780 ::Error(
"TDataSetManager::ScanFile",
1781 "problems processing the directory tree in looking for metainfo");
1805 if (!fi || !
d || !rdir) {
1806 ::Error(
"TDataSetManager::FillMetaData",
1807 "some inputs are invalid (fi:%p,d:%p,r:%s)", fi,
d, rdir);
1811 if (
d->GetListOfKeys()) {
1812 TIter nxk(
d->GetListOfKeys());
1814 while ((k =
dynamic_cast<TKey *
> (nxk()))) {
1820 ::Error(
"TDataSetManager::FillMetaData",
"cannot get sub-directory '%s'", k->
GetName());
1824 ::Error(
"TDataSetManager::FillMetaData",
"problems processing sub-directory '%s'", k->
GetName());
1841 ::Info(
"TDataSetManager::FillMetaData",
"created meta data for tree %s", ks.
Data());
1854 ::Error(
"TDataSetManager::FillMetaData",
"could not get tree '%s'", k->
GetName());
1870 TList *srvmapslist = 0;
1872 ::Warning(
"TDataSetManager::ParseDataSetSrvMaps",
1873 "called with an empty string! - nothing to do");
1877 Int_t from = 0, from1 = 0;
1878 while (srvmaps.
Tokenize(srvmap, from,
" ")) {
1882 if (srvmap.
Tokenize(sf, from1,
"|"))
1883 if (srvmap.
Tokenize(st, from1,
"|")) { }
1888 ::Warning(
"TDataSetManager::ParseDataSetSrvMaps",
1889 "parsing DataSet.SrvMaps: target must be defined"
1890 " (token: %s) - ignoring", srvmap.
Data());
1905 if (!srvmapslist) srvmapslist =
new TList;
1934 if (!furl)
return replaced;
1938 if (mlist && mlist->
GetSize() > 0) {
1941 while ((pr = (
TPair *) nxm())) {
R__EXTERN Int_t gErrorIgnoreLevel
char * Form(const char *fmt,...)
void Printf(const char *fmt,...)
R__EXTERN TSystem * gSystem
static struct mg_connection * fc(struct mg_context *ctx)
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
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 GetEntries() const
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
static TString fgCommonDataSetTag
static Bool_t CheckStagedStatus(TFileInfo *fileInfo, Int_t fopt, Int_t maxfiles, Int_t newstagedfiles, TFileStager *stager, Bool_t createStager, Bool_t dbg, Bool_t &changed, Bool_t &touched, Bool_t &disappeared)
Check stage status of the file described by "fileInfo".
virtual TFileCollection * GetDataSet(const char *uri, const char *server=0)
Utility function used in various methods for user dataset upload.
virtual Long64_t GetGroupUsed(const char *group)
Returns the used space of that group.
Int_t ScanDataSet(const char *uri, const char *opt)
Scans the dataset indicated by 'uri' following the 'opts' directives.
Bool_t ReadGroupConfig(const char *cf=0)
Read group config file 'cf'.
static TList * GetDataSetSrvMaps()
Static getter for server mapping list.
virtual void UpdateUsedSpace()
updates the used space maps
static void ProcessFile(TFileInfo *fileInfo, Int_t sopt, Bool_t checkstg, Bool_t doall, TFileStager *stager, Bool_t createStager, const char *stageopts, Bool_t dbg, Bool_t &changed, Bool_t &opened)
Locate, stage, or fully validate file "fileInfo".
static TList * ParseDataSetSrvMaps(const TString &srvmaps)
Create a server mapping list from the content of 'srvmaps' Return the list (owned by the caller) or 0...
static Int_t ScanFile(TFileInfo *fileinfo, Bool_t notify)
Open the file described by 'fileinfo' to extract the relevant meta-information.
static TString CreateUri(const char *dsGroup=0, const char *dsUser=0, const char *dsName=0, const char *dsTree=0)
Creates URI for the dataset manger in the form '[[/dsGroup/]dsUser/]dsName[#dsObjPath]',...
static Int_t FillMetaData(TFileInfo *fi, TDirectory *d, const char *rdir="/")
Navigate the directory 'd' (and its subdirectories) looking for TTree objects.
void PrintUsedSpace()
Prints the quota.
static Bool_t CheckDataSetSrvMaps(TUrl *furl, TString &fn, TList *srvmaplist=0)
Check if the dataset server mappings apply to the url defined by 'furl'.
void GetQuota(const char *group, const char *user, const char *dsName, TFileCollection *dataset)
Gets quota information from this dataset.
void PrintDataSet(TFileCollection *fc, Int_t popt=0)
Formatted printout of the content of TFileCollection 'fc'.
virtual TMap * GetDataSets(const char *uri, UInt_t=TDataSetManager::kExport)
Returns all datasets for the <group> and <user> specified by <uri>.
void SetScanCounters(Int_t t=-1, Int_t o=-1, Int_t d=-1)
Update scan counters.
virtual Bool_t ExistsDataSet(const char *uri)
Checks if the indicated dataset exits.
virtual TMap * GetGroupQuotaMap()
virtual void ShowDataSets(const char *uri="*", const char *opt="")
Prints formatted information about the dataset 'uri'.
virtual TMap * GetUserUsedMap()
virtual void ShowQuota(const char *opt)
Display quota information.
virtual Int_t NotifyUpdate(const char *group=0, const char *user=0, const char *dspath=0, Long_t mtime=0, const char *checksum=0)
Save into the <datasetdir>/dataset.list file the name of the last updated or created or modified data...
virtual Bool_t RemoveDataSet(const char *uri)
Removes the indicated dataset.
Bool_t ParseUri(const char *uri, TString *dsGroup=0, TString *dsUser=0, TString *dsName=0, TString *dsTree=0, Bool_t onlyCurrent=kFALSE, Bool_t wildcards=kFALSE)
Parses a (relative) URI that describes a DataSet on the cluster.
static TList * fgDataSetSrvMaps
virtual Long64_t GetGroupQuota(const char *group)
returns the quota a group is allowed to have
virtual Int_t ClearCache(const char *uri)
Clear cached information matching uri.
virtual void ParseInitOpts(const char *opts)
Parse the opts string and set the init bits accordingly Available options: Cq: set kCheckQuota Ar: se...
virtual TMap * GetSubDataSets(const char *uri, const char *excludeservers)
Partition dataset 'ds' accordingly to the servers.
TDataSetManager(const TDataSetManager &)
virtual void MonitorUsedSpace(TVirtualMonitoringWriter *monitoring)
Log info to the monitoring server.
virtual Int_t RegisterDataSet(const char *uri, TFileCollection *dataSet, const char *opt)
Register a dataset, perfoming quota checkings, if needed.
static Long64_t ToBytes(const char *size=0)
Static utility function to gt the number of bytes from a string representation in the form "<digit><s...
virtual ~TDataSetManager()
Destructor.
virtual Int_t ShowCache(const char *uri)
Show cached information matching uri.
Describe directory structure in memory.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries.
Int_t RemoveDuplicates()
Remove duplicates based on the UUID, typically after a verification.
Int_t Update(Long64_t avgsize=-1)
Update accumulated information about the elements of the collection (e.g.
Long64_t GetTotalSize() const
Class describing a generic file including meta information.
Bool_t AddUrl(const char *url, Bool_t infront=kFALSE)
Add a new URL.
Bool_t AddMetaData(TObject *meta)
Add's a meta data object to the file info object.
Bool_t RemoveUrl(const char *url)
Remove an URL. Returns kTRUE if successful, kFALSE otherwise.
TUrl * GetFirstUrl() const
TUrl * GetCurrentUrl() const
Return the current url.
TFileInfoMeta * GetMetaData(const char *meta=0) const
Get meta data object with specified name.
void SetUUID(const char *uuid)
Set the UUID to the value associated to the string 'uuid'.
void SetSize(Long64_t size)
virtual Bool_t Matches(const char *s)
virtual Bool_t IsValid() const
virtual Bool_t IsStaged(const char *)
Just check if the file exists locally.
virtual Bool_t Stage(const char *, Option_t *=0)
static TFileStager * Open(const char *stager)
Open a stager, after having loaded the relevant plug-in.
virtual Int_t Locate(const char *u, TString &f)
Just check if the file exists locally.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual const char * GetClassName() const
virtual void Add(TObject *obj)
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
void DeleteAll()
Remove all (key,value) pairs from the map AND delete the keys AND values when they are allocated on t...
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection).
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
virtual const char * GetName() const
Returns name of object.
Collectable string class.
const char * GetName() const
Returns name of object.
const TString & GetString() const
Mother of all ROOT objects.
void AbstractMethod(const char *method) const
Use this method to implement an "abstract" method that you don't want to leave purely abstract.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
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.
Wrapper for PCRE library (Perl Compatible Regular Expressions).
Int_t Match(const TString &s, UInt_t start=0)
Runs a match on s against the regex 'this' was created with.
Int_t Match(const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10, TArrayI *pos=0)
The number of matches is returned, this equals the full match + sub-pattern matches.
Class used by TMap to store (key,value) pairs.
void SetVal(const AParamType &val)
const AParamType & GetVal() const
Regular expression class.
Ssiz_t Index(const TString &str, Ssiz_t *len, Ssiz_t start=0) const
Find the first occurrence of the regexp in string and return the position, or -1 if there is no match...
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
TString & Insert(Ssiz_t pos, const char *s)
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
const char * Data() const
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
TString & ReplaceAll(const TString &s1, const TString &s2)
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Int_t CountChar(Int_t c) const
Return number of times character c occurs in the string.
TString & Remove(Ssiz_t pos)
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.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual const char * Getenv(const char *env)
Get environment variable.
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual void DispatchOneEvent(Bool_t pendingOnly=kFALSE)
Dispatch a single event.
virtual const char * HostName()
Return the system's host name.
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
A TTree represents a columnar dataset.
virtual Long64_t GetEntries() const
virtual Long64_t GetZipBytes() const
virtual Long64_t GetTotBytes() const
This class represents a RFC 3986 compatible URI.
const TString GetPath() const
const TString GetFragment() const
const TString GetQuery() const
static TUri Transform(const TUri &reference, const TUri &base)
Transform a URI reference into its target URI using given a base URI.
Bool_t SetUri(const TString &uri)
Parse URI and set the member variables accordingly, returns kTRUE if URI validates,...
This class represents a WWW compatible URL.
const char * GetAnchor() const
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
void SetAnchor(const char *anchor)
const char * GetFileAndOptions() const
Return the file and its options (the string specified behind the ?).
const char * GetFile() const
void SetUrl(const char *url, Bool_t defaultIsFile=kFALSE)
Parse url character string and split in its different subcomponents.
void SetProtocol(const char *proto, Bool_t setDefaultPort=kFALSE)
Set protocol and, optionally, change the port accordingly.
const char * GetHost() const
void SetOptions(const char *opt)
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
const char * GetOptions() const
void SetHost(const char *host)
const char * GetProtocol() const
virtual Bool_t SendParameters(TList *, const char *=0)
static constexpr double nm
static constexpr double s
static constexpr double pc