static Long64_t ToBytes(const char *size=0)
Static utility function to gt the number of bytes from a string representation in the form "
virtual Long64_t GetZipBytes() const
virtual void ShowDataSets(const char *uri="*", const char *opt="")
Prints formatted information about the dataset 'uri'.
This class represents a RFC 3986 compatible URI.
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]', The optional dsObjPath can be in the form [subdir/]objname]'.
virtual TMap * GetGroupQuotaMap()
Bool_t AddUrl(const char *url, Bool_t infront=kFALSE)
Add a new URL.
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".
const char * GetOptions() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TUrl * GetFirstUrl() const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
const char * Data() const
virtual void MonitorUsedSpace(TVirtualMonitoringWriter *monitoring)
Log info to the monitoring server.
static struct mg_connection * fc(struct mg_context *ctx)
Int_t Update(Long64_t avgsize=-1)
Update accumulated information about the elements of the collection (e.g.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
Bool_t AddMetaData(TObject *meta)
Add's a meta data object to the file info object.
virtual void ShowQuota(const char *opt)
Display quota information.
void SetSize(Long64_t size)
virtual Bool_t IsValid() const
virtual Int_t RegisterDataSet(const char *uri, TFileCollection *dataSet, const char *opt)
Register a dataset, perfoming quota checkings, if needed.
void DeleteAll()
Remove all (key,value) pairs from the map AND delete the keys AND values when they are allocated on t...
std::map< std::string, std::string >::const_iterator iter
virtual Long64_t GetGroupQuota(const char *group)
returns the quota a group is allowed to have
static TList * GetDataSetSrvMaps()
Static getter for server mapping list.
virtual const char * Getenv(const char *env)
Get environment variable.
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
Int_t Atoi() const
Return integer value of string.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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".
void PrintUsedSpace()
Prints the quota.
virtual Long64_t GetTotBytes() const
const TString GetPath() const
virtual void UpdateUsedSpace()
updates the used space maps
virtual TMap * GetSubDataSets(const char *uri, const char *excludeservers)
Partition dataset 'ds' accordingly to the servers.
TObjString * ExportInfo(const char *name=0, Int_t popt=0)
Export the relevant info as a string; use 'name' as collection name, if defined, else use GetName()...
static Int_t FillMetaData(TFileInfo *fi, TDirectory *d, const char *rdir="/")
Navigate the directory 'd' (and its subdirectories) looking for TTree objects.
TString GetString() const
TFileInfoMeta * GetMetaData(const char *meta=0) const
Get meta data object with specified name.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
R__EXTERN TSystem * gSystem
Int_t RemoveDuplicates()
Remove duplicates based on the UUID, typically after a verification.
Bool_t ReadGroupConfig(const char *cf=0)
Read group config file 'cf'.
virtual TMap * GetUserUsedMap()
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
virtual Bool_t ExistsDataSet(const char *uri)
Checks if the indicated dataset exits.
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.
virtual Int_t ShowCache(const char *uri)
Show cached information matching uri.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t TestBit(UInt_t f) const
Int_t ScanDataSet(const char *uri, const char *opt)
Scans the dataset indicated by 'uri' following the 'opts' directives.
char * Form(const char *fmt,...)
const char * GetFileAndOptions() const
Return the file and its options (the string specified behind the ?).
virtual Bool_t SendParameters(TList *, const char *=0)
const char * AsString() const
Return UUID as string. Copy string immediately since it will be reused.
void AbstractMethod(const char *method) const
Use this method to implement an "abstract" method that you don't want to leave purely abstract...
virtual const char * GetName() const
Returns name of object.
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.
const char * GetAnchor() const
Int_t CountChar(Int_t c) const
Return number of times character c occurs in the string.
void Warning(const char *location, const char *msgfmt,...)
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
static Int_t ScanFile(TFileInfo *fileinfo, Bool_t notify)
Open the file described by 'fileinfo' to extract the relevant meta-information.
Long64_t GetTotalSize() const
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
void GetQuota(const char *group, const char *user, const char *dsName, TFileCollection *dataset)
Gets quota information from this dataset.
virtual Bool_t Stage(const char *, Option_t *=0)
void SetHost(const char *host)
TString & Remove(Ssiz_t pos)
Class used by TMap to store (key,value) pairs.
void SetAnchor(const char *anchor)
virtual Int_t GetSize() const
static TString fgCommonDataSetTag
virtual const char * HostName()
Return the system's host name.
Describe directory structure in memory.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
static TFileStager * Open(const char *stager)
Open a stager, after having loaded the relevant plug-in.
virtual void DispatchOneEvent(Bool_t pendingOnly=kFALSE)
Dispatch a single event.
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 /dataset.list file the name of the last updated or created or modified data...
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.
Int_t Match(const TString &s, UInt_t start=0)
Runs a match on s against the regex 'this' was created with.
Mother of all ROOT objects.
Bool_t IsDigit() const
Returns true if all characters in string are digits (0-9) or white spaces, i.e.
TUrl * GetCurrentUrl() const
Return the current url.
virtual void Add(TObject *obj)
Wrapper for PCRE library (Perl Compatible Regular Expressions).
Class that contains a list of TFileInfo's and accumulated meta data information about its entries...
void PrintDataSet(TFileCollection *fc, Int_t popt=0)
Formatted printout of the content of TFileCollection 'fc'.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void SetOptions(const char *opt)
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...
virtual Bool_t Matches(const char *s)
virtual Long64_t GetEntries() const
A TTree object has a header with a name and a title.
Class describing a generic file including meta information.
const AParamType & GetVal() const
virtual Int_t Locate(const char *u, TString &f)
Just check if the file exists locally.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
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.
TMap * GetFilesPerServer(const char *exclude=0, Bool_t curronly=kFALSE)
Return a map of TFileCollections with the files on each data server, excluding servers in the comma-s...
virtual Long64_t GetGroupUsed(const char *group)
Returns the used space of that group.
virtual TMap * GetDataSets(const char *uri, UInt_t=TDataSetManager::kExport)
Returns all datasets for the and specified by .
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Compare a string to char *cs2.
virtual void Close(Option_t *option="")
Close a file.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.