37 const char *pass,
const char *table,
38 const char *dstab,
const char *filestab)
40 fDSetSendOpts(
"bulk,table=proofquerydsets"),
41 fFilesSendOpts(
"bulk,table=proofqueryfiles")
46 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualMonitoringWriter",
"SQL"))) {
47 if (
h->LoadPlugin() != -1) {
160 Error(
"SendSummary",
"invalid instance: do nothing!");
167 PDB(kMonitoring,1)
Info(
"SendSummary",
"preparing (qid: '%s')", dumid);
170 if (!recs || (recs && recs->
GetSize() <= 0)) {
171 Error(
"SendSummary",
"records list undefined or empty!");
190 while ((o = nxr())) {
191 if (!strcmp(o->
GetName(),
"vmemmxw"))
break;
196 PDB(kMonitoring,1)
Info(
"SendSummary",
"sending (%d entries)", xrecs->
GetSize());
212 return (rc ? 0 : -1);
255 const char *begin,
const char *qid)
258 Error(
"SendDataSetInfo",
"invalid instance: do nothing!");
266 if (!qid || (qid && strlen(qid) <= 0)) {
267 Error(
"SendDataSetInfo",
"query id (tag) undefined!");
272 Error(
"SendDataSetInfo",
"TDSet object undefined! (qid: '%s')", qid);
276 PDB(kMonitoring,1)
Info(
"SendDataSetInfo",
"preparing (qid: '%s')", qid);
282 while ((dss.Tokenize(ds, from ,
"[,| ]"))) {
295 while ((o = nxe())) {
297 dse =
e->GetDataSet();
307 }
else if ((dsete =
dynamic_cast<TDSet *
>(o))) {
309 Info(
"SendDataSetInfo",
"dset '%s' (%d files)",
313 dse = ee->GetDataSet();
326 Warning(
"SendDataSetInfo",
"ignoring unknown element type: '%s'", o->
ClassName());
337 if (!dsfi.
IsNull() && dsfi !=
"TFileInfo") {
354 TString ent(
"dsn,querytag,querybegin,numfiles,missfiles");
367 Info(
"SendDataSetInfo",
"sending (%d entries)", values.
GetSize());
373 return (rc ? 0 : -1);
416 const char *begin,
const char *qid)
419 Error(
"SendFileInfo",
"invalid instance: do nothing!");
427 if (!qid || (qid && strlen(qid) <= 0)) {
428 Error(
"SendFileInfo",
"query id (tag) undefined!");
433 Error(
"SendFileInfo",
"TDSet object undefined! (qid: '%s')", qid);
437 PDB(kMonitoring,1)
Info(
"SendFileInfo",
"preparing (qid: '%s')", qid);
449 TString ent(
"lfn,path,querytag,querybegin,status");
450 if (
fFileInfoVrs == 0) ent =
"lfn,path,querytag,status";
459 while ((o = nxe())) {
470 qid, begin, status.
Data());
472 }
else if ((dsete =
dynamic_cast<TDSet *
>(o))) {
474 Info(
"SendFileInfo",
"dset '%s' (%d files)",
487 qid, begin, status.
Data());
491 Warning(
"SendFileInfo",
"ignoring unknown element type: '%s'", o->
ClassName());
495 PDB(kMonitoring,1)
Info(
"SendFileInfo",
"sending (%d entries)", values.
GetSize());
501 return (rc ? 0 : -1);
R__EXTERN TSystem * gSystem
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
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.
Manages an element of a TDSet.
This class implements a data set to be used for PROOF processing.
TList * GetListOfElements() const
Class describing a generic file including meta information.
TUrl * GetCurrentUrl() const
Return the current url.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
TObject * FindObject(const char *name) const
Find object using its name.
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual void AddBefore(const TObject *before, TObject *obj)
Insert object before object before in the list.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Collectable string class.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
R__ALWAYS_INLINE Bool_t IsZombie() const
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.
@ kInvalidObject
if object ctor succeeded but object should not be used
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
virtual ~TProofMonSenderSQL()
Destructor.
Int_t SendFileInfo(TDSet *, TList *, const char *, const char *)
Post information about the requested files.
Int_t SendDataSetInfo(TDSet *, TList *, const char *, const char *)
Post information about the processed dataset(s).
Int_t SendSummary(TList *, const char *)
Send 'summary' record for the table 'proofquerylog'.
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.
TVirtualMonitoringWriter * fWriter
Provides the interface for PROOF monitoring to different writers.
const char * Data() const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
virtual Bool_t SendParameters(TList *, const char *=0)
virtual void Verbose(Bool_t)
static constexpr double nm