36 const char *pass,
const char *table,
37 const char *dstab,
const char *filestab)
39 fDSetSendOpts(
"bulk,table=proofquerydsets"),
40 fFilesSendOpts(
"bulk,table=proofqueryfiles")
45 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualMonitoringWriter",
"SQL"))) {
159 Error(
"SendSummary",
"invalid instance: do nothing!");
166 PDB(kMonitoring,1)
Info(
"SendSummary",
"preparing (qid: '%s')", dumid);
169 if (!recs || (recs && recs->
GetSize() <= 0)) {
170 Error(
"SendSummary",
"records list undefined or empty!");
189 while ((o = nxr())) {
190 if (!strcmp(o->
GetName(),
"vmemmxw"))
break;
195 PDB(kMonitoring,1)
Info(
"SendSummary",
"sending (%d entries)", xrecs->
GetSize());
211 return (rc ? 0 : -1);
254 const char *begin,
const char *qid)
257 Error(
"SendDataSetInfo",
"invalid instance: do nothing!");
265 if (!qid || (qid && strlen(qid) <= 0)) {
266 Error(
"SendDataSetInfo",
"query id (tag) undefined!");
271 Error(
"SendDataSetInfo",
"TDSet object undefined! (qid: '%s')", qid);
275 PDB(kMonitoring,1)
Info(
"SendDataSetInfo",
"preparing (qid: '%s')", qid);
281 while ((dss.Tokenize(ds, from ,
"[,| ]"))) {
294 while ((o = nxe())) {
295 if ((e = dynamic_cast<TDSetElement *>(o))) {
306 }
else if ((dsete = dynamic_cast<TDSet *>(o))) {
308 Info(
"SendDataSetInfo",
"dset '%s' (%d files)",
312 dse = ee->GetDataSet();
325 Warning(
"SendDataSetInfo",
"ignoring unknown element type: '%s'", o->
ClassName());
336 if (!dsfi.
IsNull() && dsfi !=
"TFileInfo") {
353 TString ent(
"dsn,querytag,querybegin,numfiles,missfiles");
366 Info(
"SendDataSetInfo",
"sending (%d entries)", values.
GetSize());
372 return (rc ? 0 : -1);
415 const char *begin,
const char *qid)
418 Error(
"SendFileInfo",
"invalid instance: do nothing!");
426 if (!qid || (qid && strlen(qid) <= 0)) {
427 Error(
"SendFileInfo",
"query id (tag) undefined!");
432 Error(
"SendFileInfo",
"TDSet object undefined! (qid: '%s')", qid);
436 PDB(kMonitoring,1)
Info(
"SendFileInfo",
"preparing (qid: '%s')", qid);
448 TString ent(
"lfn,path,querytag,querybegin,status");
449 if (
fFileInfoVrs == 0) ent =
"lfn,path,querytag,status";
458 while ((o = nxe())) {
459 if ((e = dynamic_cast<TDSetElement *>(o))) {
469 qid, begin, status.Data());
471 }
else if ((dsete = dynamic_cast<TDSet *>(o))) {
473 Info(
"SendFileInfo",
"dset '%s' (%d files)",
486 qid, begin, status.Data());
490 Warning(
"SendFileInfo",
"ignoring unknown element type: '%s'", o->
ClassName());
494 PDB(kMonitoring,1)
Info(
"SendFileInfo",
"sending (%d entries)", values.
GetSize());
500 return (rc ? 0 : -1);
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual const char * GetTitle() const
Returns title of object.
virtual void Verbose(Bool_t)
Collectable string class.
TObject * FindObject(const char *name) const
Find object using its name.
This class implements a data set to be used for PROOF processing.
virtual void SetName(const char *name)
Change (i.e.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
Int_t SendDataSetInfo(TDSet *, TList *, const char *, const char *)
Post information about the processed dataset(s).
std::vector< double > values
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Int_t LoadPlugin()
Load the plugin library for this handler.
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Long_t ExecPlugin(int nargs, const T &...params)
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
const char * Data() const
Manages an element of a TDSet.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
TVirtualMonitoringWriter * fWriter
The TNamed class is the base class for all named ROOT classes.
TList * GetListOfElements() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
R__EXTERN TSystem * gSystem
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t TestBit(UInt_t f) const
Int_t SendFileInfo(TDSet *, TList *, const char *, const char *)
Post information about the requested files.
virtual Bool_t SendParameters(TList *, const char *=0)
virtual const char * GetName() const
Returns name of object.
Int_t SendSummary(TList *, const char *)
Send 'summary' record for the table 'proofquerylog'.
virtual void AddBefore(const TObject *before, TObject *obj)
Insert object before object before in the list.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
const char * GetDataSet() const
virtual ~TProofMonSenderSQL()
Destructor.
virtual Int_t GetSize() const
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
TUrl * GetCurrentUrl() const
Return the current url.
virtual void Add(TObject *obj)
TProofMonSenderSQL(const char *serv, const char *user, const char *pass, const char *table="proof.proofquerylog", const char *dstab=0, const char *filestab=0)
Main constructor.
Provides the interface for PROOF monitoring to different writers.
Class describing a generic file including meta information.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.