57 if (!gDataSetManager &&
getDSMgr(
"DataSetCache") != 0)
return;
60 Printf(
"DataSetCache: problems running '%s'", (clear ?
"clear" :
"show"));
77 if (!gDataSetManager &&
getDSMgr(
"ShowDataSets") != 0)
return;
95 if (!gDataSetManager &&
getDSMgr(
"ShowDataSets") != 0)
return fc;
96 return gDataSetManager->
GetDataSet(ds, server);
113 if (!gDataSetManager &&
getDSMgr(
"GetDataSets") != 0)
return dss;
120 if (server && strlen(server) > 0) {
138 Printf(
"GetDataSets: no dataset found on server '%s' for owner '%s'", server, owner);
143 Printf(
"GetDataSets: no dataset found for '%s'", owner);
160 if (!gDataSetManager &&
getDSMgr(
"RemoveDataSet") != 0)
return -1;
175 if (redir && strlen(redir) > 0) srvmaps.
Form(
"|%s", redir);
178 if (!(srvmaps.
IsNull())) {
196 if (!(srvmaps.
IsNull())) {
199 if (!gDataSetManager &&
getDSMgr(
"VerifyDataSet") != 0)
return -1;
200 if ((rc = gDataSetManager->
ScanDataSet(dsname, opt)) == 0) {
220 if (!gDataSetManager &&
getDSMgr(
"ExistsDataSet") != 0)
return kFALSE;
236 if (!gDataSetManager &&
getDSMgr(
"RegisterDataSet") != 0)
return -1;
248 const char *popt = (
doParallel) ?
"" :
"masteronly";
252 Printf(
"getProof:%s: problems starting a PROOF session at '%s'", where, gUrl.
GetUrl());
266 if (
gROOT->GetPluginManager()) {
270 TString group(getenv(
"PQ2GROUP")), user(getenv(
"PQ2USER"));
271 TString dsm, opt(
"opt:-Ar:-Av:");
272 const char *o = getenv(
"PQ2DSMGROPTS");
275 if (strlen(o) > 0) opt.
Form(
"opt:%s", o);
281 if (gDataSetManager) {
284 Printf(
"getDSMgr:%s: problems creating a dataset manager at '%s'", where, gUrl.
GetUrl());
Int_t RemoveDataSet(const char *dsname)
RemoveDataSet wrapper.
TFileCollection * GetFilesOnServer(const char *server)
Return the subset of files served by 'server'.
virtual Int_t ClearCache(const char *uri)
Clear cached information matching uri.
virtual Bool_t ExistsDataSet(const char *dataset)
Returns kTRUE if 'dataset' exists, kFALSE otherwise.
virtual Bool_t RegisterDataSet(const char *name, TFileCollection *dataset, const char *optStr="")
Register the 'dataSet' on the cluster under the current user, group and the given 'dataSetName'...
Collectable string class.
virtual void ShowDataSetCache(const char *dataset=0)
Display the content of the dataset cache, if any (matching 'dataset', if defined).
This class represents a WWW compatible URL.
Float_t GetStagedPercentage() const
TFileCollection * GetDataSet(const char *ds, const char *server)
GetDataSet wrapper.
virtual Bool_t RemoveDataSet(const char *uri)
Removes the indicated dataset.
virtual TFileCollection * GetDataSet(const char *dataset, const char *optStr="")
Get a list of TFileInfo objects describing the files of the specified dataset.
virtual TFileCollection * GetDataSet(const char *uri, const char *server=0)
Utility function used in various methods for user dataset upload.
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection)...
Int_t LoadPlugin()
Load the plugin library for this handler.
virtual void ShowDataSets(const char *uri="*", const char *opt="")
Prints formatted information about the dataset 'uri'.
Int_t RegisterDataSet(const char *dsname, TFileCollection *fc, const char *opt)
RegisterDataSet wrapper.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=0)
Set the value of a resource or create a new resource.
static struct mg_connection * fc(struct mg_context *ctx)
void SetLogLevel(Int_t level, UInt_t mask=TProofDebug::kAll)
Set server logging level.
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...
virtual TMap * GetDataSets(const char *uri="", const char *optStr="")
Lists all datasets that match given uri.
virtual void ShowDataSets(const char *uri="", const char *optStr="")
Shows datasets in locations that match the uri.
static TProof * Open(const char *url=0, const char *conffile=0, const char *confdir=0, Int_t loglevel=0)
Start a PROOF session on a specific cluster.
Int_t getProof(const char *where, Int_t verbose=1)
Open a PROOF session at gUrl.
Long_t ExecPlugin(int nargs, const T &... params)
virtual Bool_t ExistsDataSet(const char *uri)
Checks if the indicated dataset exits.
virtual Int_t ShowCache(const char *uri)
Show cached information matching uri.
virtual void ClearDataSetCache(const char *dataset=0)
Clear the content of the dataset cache, if any (matching 'dataset', if defined).
Bool_t ExistsDataSet(const char *dsname)
ExistsDataSet wrapper.
virtual Int_t VerifyDataSet(const char *dataset, const char *optStr="")
Verify if all files in the specified dataset are available.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Int_t ScanDataSet(const char *uri, const char *opt)
Scans the dataset indicated by 'uri' following the 'opts' directives.
static void AddEnvVar(const char *name, const char *value)
Add an variable to the list of environment variables passed to proofserv on the master and slaves...
TMap * GetDataSets(const char *owner, const char *server, const char *opt)
GetDataSets wrapper.
Int_t getDSMgr(const char *where)
Open a dataset manager for gUrl.
R__EXTERN TProof * gProof
void Close(Option_t *option="")
Close all open slave servers.
Int_t GetParallel() const
Returns number of slaves active in parallel mode.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Int_t VerifyDataSet(const char *dsname, const char *opt, const char *redir)
VerifyDataSet wrapper.
void DataSetCache(bool clear, const char *ds)
ShowCache wrapper.
Mother of all ROOT objects.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries...
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
void ShowDataSets(const char *ds, const char *opt)
ShowDataSets wrapper.
virtual Int_t RemoveDataSet(const char *dataset, const char *optStr="")
Remove the specified dataset from the PROOF cluster.
virtual const char * GetName() const
Returns name of object.
virtual Int_t GetSize() const
virtual TMap * GetDataSets(const char *uri, UInt_t=TDataSetManager::kExport)
Returns all datasets for the <group> and <user> specified by <uri>.
TDataSetManager * gDataSetManager
const char * Data() const