38 const char *
pass,
const char *table,
41 fDSetSendOpts(
"bulk,table=proofquerydsets"),
42 fFilesSendOpts(
"bulk,table=proofqueryfiles")
47 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TVirtualMonitoringWriter",
"SQL"))) {
48 if (
h->LoadPlugin() != -1) {
161 Error(
"SendSummary",
"invalid instance: do nothing!");
168 PDB(kMonitoring,1)
Info(
"SendSummary",
"preparing (qid: '%s')",
dumid);
172 Error(
"SendSummary",
"records list undefined or empty!");
191 while ((o =
nxr())) {
197 PDB(kMonitoring,1)
Info(
"SendSummary",
"sending (%d entries)",
xrecs->GetSize());
213 return (
rc ? 0 : -1);
256 const char *begin,
const char *
qid)
259 Error(
"SendDataSetInfo",
"invalid instance: do nothing!");
268 Error(
"SendDataSetInfo",
"query id (tag) undefined!");
273 Error(
"SendDataSetInfo",
"TDSet object undefined! (qid: '%s')",
qid);
277 PDB(kMonitoring,1)
Info(
"SendDataSetInfo",
"preparing (qid: '%s')",
qid);
283 while ((
dss.Tokenize(
ds, from ,
"[,| ]"))) {
296 while ((o =
nxe())) {
298 dse =
e->GetDataSet();
308 }
else if ((
dsete =
dynamic_cast<TDSet *
>(o))) {
310 Info(
"SendDataSetInfo",
"dset '%s' (%d files)",
314 dse =
ee->GetDataSet();
327 Warning(
"SendDataSetInfo",
"ignoring unknown element type: '%s'", o->
ClassName());
338 if (!
dsfi.IsNull() &&
dsfi !=
"TFileInfo") {
342 fn =
fi->GetCurrentUrl()->GetUrl();
343 if (
plet->fDSet &&
plet->fDSet->GetListOfElements() &&
344 !(
plet->fDSet->GetListOfElements()->FindObject(
fn)))
plet->fFiles += 1;
355 TString ent(
"dsn,querytag,querybegin,numfiles,missfiles");
363 ent.Form(
"'%s','%s','%s',%d,%d",
plet->GetName(),
qid, begin,
plet->fFiles,
plet->fMissing);
368 Info(
"SendDataSetInfo",
"sending (%d entries)", values.
GetSize());
374 return (
rc ? 0 : -1);
417 const char *begin,
const char *
qid)
420 Error(
"SendFileInfo",
"invalid instance: do nothing!");
429 Error(
"SendFileInfo",
"query id (tag) undefined!");
434 Error(
"SendFileInfo",
"TDSet object undefined! (qid: '%s')",
qid);
438 PDB(kMonitoring,1)
Info(
"SendFileInfo",
"preparing (qid: '%s')",
qid);
450 TString ent(
"lfn,path,querytag,querybegin,status");
460 while ((o =
nxe())) {
465 if (
hmiss.FindObject(
fne)) status =
"Failed";
473 }
else if ((
dsete =
dynamic_cast<TDSet *
>(o))) {
475 Info(
"SendFileInfo",
"dset '%s' (%d files)",
482 if (
hmiss.FindObject(
fne)) status =
"Failed";
492 Warning(
"SendFileInfo",
"ignoring unknown element type: '%s'", o->
ClassName());
496 PDB(kMonitoring,1)
Info(
"SendFileInfo",
"sending (%d entries)", values.
GetSize());
502 return (
rc ? 0 : -1);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t recs
R__EXTERN TSystem * gSystem
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.
Class describing a generic file including meta information.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
void Add(TObject *obj) override
The TNamed class is the base class for all named ROOT classes.
virtual void SetName(const char *name)
Set the name of the TNamed.
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
Int_t SendDataSetInfo(TDSet *, TList *, const char *, const char *) override
Post information about the processed dataset(s).
~TProofMonSenderSQL() override
Destructor.
Int_t SendFileInfo(TDSet *, TList *, const char *, const char *) override
Post information about the requested files.
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.
Int_t SendSummary(TList *, const char *) override
Send 'summary' record for the table 'proofquerylog'.
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.
virtual Bool_t SendParameters(TList *, const char *=nullptr)
virtual void Verbose(Bool_t)