// @(#)root/proofplayer:$Id$
// Author: G.Ganis July 2011

/*************************************************************************
 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TProofMonSenderSQL                                                   //
//                                                                      //
// TProofMonSender implementation for SQL writers.                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TProofMonSenderSQL.h"

#include "TDSet.h"
#include "TFileInfo.h"
#include "THashList.h"
#include "TList.h"
#include "TPluginManager.h"
#include "TProofDebug.h"
#include "TROOT.h"
#include "TSystem.h"
#include "TVirtualMonitoring.h"

//________________________________________________________________________
TProofMonSenderSQL::TProofMonSenderSQL(const char *serv, const char *user,
                                       const char *pass, const char *table,
                                       const char *dstab, const char *filestab)
                  : TProofMonSender(serv,"ProofMonSenderSQL"),
                    fDSetSendOpts("bulk,table=proofquerydsets"),
                    fFilesSendOpts("bulk,table=proofqueryfiles")
{
   // Main constructor

   fWriter = 0;
   // Init the sender instance using the plugin manager
   TPluginHandler *h = 0;
   if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualMonitoringWriter", "SQL"))) {
      if (h->LoadPlugin() != -1) {
         fWriter = (TVirtualMonitoringWriter *) h->ExecPlugin(4, serv, user, pass, table);
         if (fWriter && fWriter->IsZombie()) SafeDelete(fWriter);
      }
   }
   // Flag this instance as valid if the writer initialization succeeded
   if (fWriter) ResetBit(TObject::kInvalidObject);

   // Set default send control options
   SetBit(TProofMonSender::kSendSummary);
   SetBit(TProofMonSender::kSendDataSetInfo);
   SetBit(TProofMonSender::kSendFileInfo);
   fSummaryVrs = 2;
   fDataSetInfoVrs = 1;
   fFileInfoVrs = 1;

   // Transfer verbosity requirements
   PDB(kMonitoring,1) if (fWriter) fWriter->Verbose(kTRUE);

   // Reformat the send options strings, if needed
   if (dstab && strlen(dstab) > 0) fDSetSendOpts.Form("bulk,table=%s", dstab);
   if (filestab && strlen(filestab) > 0) fFilesSendOpts.Form("bulk,table=%s", filestab);
}

//________________________________________________________________________
TProofMonSenderSQL::~TProofMonSenderSQL()
{
   // Destructor

   SafeDelete(fWriter);
}

//________________________________________________________________________
Int_t TProofMonSenderSQL::SendSummary(TList *recs, const char *dumid)
{
   // Send 'summary' record for the table 'proofquerylog'.
   //
   // There are three versions of this record, corresponding the evolution
   // in time of the monitoring requirements.
   //
   // The default version 2 corresponds to the table created with the following command:
   //
   // CREATE TABLE proofquerylog (
   //    id int(11) NOT NULL auto_increment,
   //    proofuser varchar(32) NOT NULL,
   //    proofgroup varchar(32) default NULL,
   //    querybegin datetime default NULL,
   //    queryend datetime default NULL,
   //    walltime int(11) default NULL,
   //    cputime float default NULL,
   //    bytesread bigint(20) default NULL,
   //    events bigint(20) default NULL,
   //    totevents bigint(20) default NULL,
   //    workers int(11) default NULL,
   //    querytag varchar(64) NOT NULL,
   //    vmemmxw bigint(20) default NULL,
   //    rmemmxw bigint(20) default NULL,
   //    vmemmxm bigint(20) default NULL,
   //    rmemmxm bigint(20) default NULL,
   //    numfiles int(11) default NULL,
   //    missfiles int(11) default NULL,
   //    status int(11) default NULL,
   //    rootver varchar(32) NOT NULL,
   //    PRIMARY KEY (id) );
   //
   // Version 1 corresponds to the table created with the following command:
   //    ('user','begin','end' instead of 'proofuser', 'querybegin', 'queryend';
   //     no 'status', 'missfiles', 'rootver'; 'dataset' field with name(s) of
   //     processed dataset(s))
   //
   // CREATE TABLE proofquerylog (
   //    id int(11) NOT NULL auto_increment,
   //    user varchar(32) NOT NULL,
   //    proofgroup varchar(32) default NULL,
   //    begin datetime default NULL,
   //    end datetime default NULL,
   //    walltime int(11) default NULL,
   //    cputime float default NULL,
   //    bytesread bigint(20) default NULL,
   //    events bigint(20) default NULL,
   //    totevents bigint(20) default NULL,
   //    workers int(11) default NULL,
   //    querytag varchar(64) NOT NULL,
   //    vmemmxw bigint(20) default NULL,
   //    rmemmxw bigint(20) default NULL,
   //    vmemmxm bigint(20) default NULL,
   //    rmemmxm bigint(20) default NULL,
   //    numfiles int(11) default NULL,
   //    dataset varchar(512) NOT NULL,
   //    PRIMARY KEY (id) );

   //
   // Version 0 corresponds to the table created with the following command:
   //    ('group' instead of 'proofgroup'; no 'querytag', 'vmemmxw',
   //     'rmemmxw', 'vmemmxm', 'rmemmxm', 'numfiles', 'dataset')
   //
   // CREATE TABLE proofquerylog (
   //    id int(11) NOT NULL auto_increment,
   //    user varchar(32) NOT NULL,
   //    group varchar(32) default NULL,
   //    begin datetime default NULL,
   //    end datetime default NULL,
   //    walltime int(11) default NULL,
   //    cputime float default NULL,
   //    bytesread bigint(20) default NULL,
   //    events bigint(20) default NULL,
   //    totevents bigint(20) default NULL,
   //    workers int(11) default NULL,
   //    PRIMARY KEY (id) );
   //
   //  Return 0 on success, -1 on any failure.

   if (!IsValid()) {
      Error("SendSummary", "invalid instance: do nothing!");
      return -1;
   }

   // Are we requested to send this info?
   if (!TestBit(TProofMonSender::kSendSummary)) return 0;

   PDB(kMonitoring,1) Info("SendSummary", "preparing (qid: '%s')", dumid);

   // Make sure we have something to send
   if (!recs || (recs && recs->GetSize() <= 0)) {
      Error("SendSummary", "records list undefined or empty!");
      return -1;
   }
   TList *xrecs = recs;

   TObject *dsn = 0;
   TNamed *nm = 0;
   // We may need to correct some variable names first
   if (fSummaryVrs > 1) {
      if ((nm = (TNamed *) recs->FindObject("user"))) nm->SetName("proofuser");
      if ((nm = (TNamed *) recs->FindObject("begin"))) nm->SetName("querybegin");
      if ((nm = (TNamed *) recs->FindObject("end"))) nm->SetName("queryend");
      if ((dsn = recs->FindObject("dataset"))) recs->Remove(dsn);
   } else if (fSummaryVrs == 0) {
      // Only the first records
      xrecs = new TList;
      xrecs->SetOwner(kFALSE);
      TIter nxr(recs);
      TObject *o = 0;
      while ((o = nxr())) {
         if (!strcmp(o->GetName(), "vmemmxw")) break;
         xrecs->Add(o);
      }
   }

   PDB(kMonitoring,1) Info("SendSummary", "sending (%d entries)", xrecs->GetSize());

   // Now we are ready to send
   Bool_t rc = fWriter->SendParameters(xrecs, dumid);

   // Restore the "dataset" entry in the list
   if (fSummaryVrs > 1 && dsn && xrecs == recs) {
      TObject *num = recs->FindObject("numfiles");
      if (num)
         recs->AddBefore(num, dsn);
      else
         recs->Add(dsn);
   }
   if (xrecs != recs) SafeDelete(xrecs);

   // Done
   return (rc ? 0 : -1);
}

//________________________________________________________________________
Int_t TProofMonSenderSQL::SendDataSetInfo(TDSet *dset, TList *missing,
                                          const char *begin, const char *qid)
{
   // Post information about the processed dataset(s). The information is taken
   // from the TDSet object 'dset' and integrated with the missing files
   // information in the list 'missing'. The string 'qid' is the uninque
   // ID of the query; 'begin' the starting time.
   //
   // The record is formatted for the table 'proofquerydsets'.
   //
   // There are two versions of this record, with or without the starting time.
   // The starting time could be looked up from the summary record, if available.
   //
   // The default version 1 corresponds to the table created with the following command:
   //
   // CREATE TABLE proofquerydsets (
   //    id int(11) NOT NULL auto_increment,
   //    dsn varchar(512) NOT NULL,
   //    querytag varchar(64) NOT NULL,
   //    querybegin datetime default NULL,
   //    numfiles int(11) default NULL,
   //    missfiles int(11) default NULL,
   //    PRIMARY KEY  (id),
   //    KEY ix_querytag (querytag) );
   //
   // Version 0 corresponds to the table created with the following command:
   //    (no 'querybegin')
   //
   // CREATE TABLE proofquerydsets (
   //    id int(11) NOT NULL auto_increment,
   //    dsn varchar(512) NOT NULL,
   //    querytag varchar(64) NOT NULL,
   //    numfiles int(11) default NULL,
   //    missfiles int(11) default NULL,
   //    PRIMARY KEY  (id),
   //    KEY ix_querytag (querytag) );
   //
   // The information is posted with a bulk insert.
   //
   // Returns 0 on success, -1 on failure.

   if (!IsValid()) {
      Error("SendDataSetInfo", "invalid instance: do nothing!");
      return -1;
   }

   // Are we requested to send this info?
   if (!TestBit(TProofMonSender::kSendDataSetInfo)) return 0;

   // The query id (tag) must be given
   if (!qid || (qid && strlen(qid) <= 0)) {
      Error("SendDataSetInfo", "query id (tag) undefined!");
      return -1;
   }
   // The dataset must be given
   if (!dset) {
      Error("SendDataSetInfo", "TDSet object undefined! (qid: '%s')", qid);
      return -1;
   }

   PDB(kMonitoring,1) Info("SendDataSetInfo", "preparing (qid: '%s')", qid);

   TList plets;
   // Extract the information and save it into the relevant multiplets
   TString dss(dset->GetName()), ds;
   Ssiz_t from = 0;
   while ((dss.Tokenize(ds, from , "[,| ]"))) {
      // Create a new TDSetPlet and add it to the list
      plets.Add(new TDSetPlet(ds.Data(), dset));
   }

   // Now try to count the files
   TDSetPlet *plet = 0;
   TIter nxpl(&plets);
   TObject *o = 0;
   TDSetElement *e = 0, *ee = 0;
   TDSet *dsete = 0;
   TIter nxe(dset->GetListOfElements());
   TString dse;
   while ((o = nxe())) {
      if ((e = dynamic_cast<TDSetElement *>(o))) {
         dse = e->GetDataSet();
         if (!dse.IsNull()) {
            nxpl.Reset();
            while ((plet = (TDSetPlet *) nxpl())) {
               if (dse == plet->GetName()) {
                  plet->fFiles += 1;
                  break;
               }
            }
         }
      } else if ((dsete = dynamic_cast<TDSet *>(o))) {
         PDB(kMonitoring,1)
            Info("SendDataSetInfo", "dset '%s' (%d files)",
                                    o->GetName(), dsete->GetListOfElements()->GetSize());
         TIter nxee(dsete->GetListOfElements());
         while ((ee = (TDSetElement *) nxee())) {
            dse = ee->GetDataSet();
            if (!dse.IsNull()) {
               nxpl.Reset();
               while ((plet = (TDSetPlet *) nxpl())) {
                  if (dse == plet->GetName()) {
                     plet->fFiles += 1;
                     plet->fDSet = dsete;
                     break;
                  }
               }
            }
         }
      } else {
         Warning("SendDataSetInfo", "ignoring unknown element type: '%s'", o->ClassName());
      }
   }

   // Now try to include the missing files info
   if (missing) {
      TFileInfo *fi = 0;
      TIter nxm(missing);
      TString dsfi, fn;
      while ((fi = (TFileInfo *) nxm())) {
         dsfi = fi->GetTitle();
         if (!dsfi.IsNull() && dsfi != "TFileInfo") {
            nxpl.Reset();
            while ((plet = (TDSetPlet *) nxpl())) {
               if (dsfi == plet->GetName()) {
                  fn = fi->GetCurrentUrl()->GetUrl();
                  if (plet->fDSet && plet->fDSet->GetListOfElements() &&
                      !(plet->fDSet->GetListOfElements()->FindObject(fn))) plet->fFiles += 1;
                  plet->fMissing += 1;
                  break;
               }
            }
         }
      }
   }

   // Now we can prepare the input for SendParameters
   TList values;
   TString ent("dsn,querytag,querybegin,numfiles,missfiles");
   if (fDataSetInfoVrs == 0) ent = "dsn,querytag,numfiles,missfiles";
   values.Add(new TObjString(ent.Data()));
   nxpl.Reset();
   while ((plet = (TDSetPlet *) nxpl())) {
      if (fDataSetInfoVrs == 0)
         ent.Form("'%s','%s',%d,%d", plet->GetName(), qid, plet->fFiles, plet->fMissing);
      else
         ent.Form("'%s','%s','%s',%d,%d", plet->GetName(), qid, begin, plet->fFiles, plet->fMissing);
      values.Add(new TObjString(ent.Data()));
   }

   PDB(kMonitoring,1)
      Info("SendDataSetInfo", "sending (%d entries)", values.GetSize());

   // Now we are ready to send
   Bool_t rc = fWriter->SendParameters(&values, fDSetSendOpts);

   // Done
   return (rc ? 0 : -1);
}

//________________________________________________________________________
Int_t TProofMonSenderSQL::SendFileInfo(TDSet *dset, TList *missing,
                                       const char *begin, const char *qid)
{
   // Post information about the requested files. The information is taken
   // from the TDSet object 'dset' and integrated with the missing files
   // information in the list 'missing'. The string 'qid' is the unique
   // ID of the query; 'begin' the starting time.
   //
   // The record is formatted for the table 'proofqueryfiles'.
   //
   // There are two versions of this record, with or without the starting time.
   // The starting time could be looked up from the summary record, if available.
   //
   // The default version 1 corresponds to the table created with the following command:
   //
   // CREATE TABLE proofqueryfiles (
   //    id int(11) NOT NULL auto_increment,
   //    lfn varchar(255) NOT NULL,
   //    path varchar(2048) NOT NULL,
   //    querytag varchar(64) NOT NULL,
   //    querybegin datetime default NULL,
   //    status enum('Ok','Failed') NOT NULL default 'Ok',
   //    PRIMARY KEY  (id),
   //    KEY ix_querytag (querytag) );
   //
   // Version 0 corresponds to the table created with the following command:
   //    (no 'querybegin')
   //
   // CREATE TABLE proofqueryfiles (
   //    id int(11) NOT NULL auto_increment,
   //    lfn varchar(255) NOT NULL,
   //    path varchar(2048) NOT NULL,
   //    querytag varchar(64) NOT NULL,
   //    status enum('Ok','Failed') NOT NULL default 'Ok',
   //    PRIMARY KEY  (id),
   //    KEY ix_querytag (querytag) );
   //
   // The information is posted with a bulk insert.
   //
   // Returns 0 on success, -1 on failure.

   if (!IsValid()) {
      Error("SendFileInfo", "invalid instance: do nothing!");
      return -1;
   }

   // Are we requested to send this info?
   if (!TestBit(TProofMonSender::kSendFileInfo)) return 0;

   // The query id (tag) must be given
   if (!qid || (qid && strlen(qid) <= 0)) {
      Error("SendFileInfo", "query id (tag) undefined!");
      return -1;
   }
   // The dataset must be given
   if (!dset) {
      Error("SendFileInfo", "TDSet object undefined! (qid: '%s')", qid);
      return -1;
   }

   PDB(kMonitoring,1) Info("SendFileInfo", "preparing (qid: '%s')", qid);
   THashList hmiss;
   if (missing) {
      TIter nxfm(missing);
      TFileInfo *fi = 0;
      while ((fi = (TFileInfo *)nxfm())) {
         hmiss.Add(new TObjString(fi->GetCurrentUrl()->GetUrl()));
      }
      PDB(kMonitoring,2) hmiss.Print();
   }

   TList values;
   TString ent("lfn,path,querytag,querybegin,status");
   if (fFileInfoVrs == 0)  ent = "lfn,path,querytag,status";
   values.Add(new TObjString(ent.Data()));

   // Create the file-plets
   TObject *o = 0;
   TDSetElement *e = 0, *ee = 0;
   TDSet *dsete = 0;
   TIter nxe(dset->GetListOfElements());
   TString fne, status;
   while ((o = nxe())) {
      if ((e = dynamic_cast<TDSetElement *>(o))) {
         fne = e->GetName();
         // Try to determine the status
         status = "Ok";
         if (hmiss.FindObject(fne)) status = "Failed";
         if (fFileInfoVrs == 0)
            ent.Form("'%s','%s','%s','%s'", gSystem->BaseName(fne), gSystem->DirName(fne),
                     qid, status.Data());
         else
            ent.Form("'%s','%s','%s','%s','%s'", gSystem->BaseName(fne), gSystem->DirName(fne),
                     qid, begin, status.Data());
         values.Add(new TObjString(ent.Data()));
      } else if ((dsete = dynamic_cast<TDSet *>(o))) {
         PDB(kMonitoring,1)
            Info("SendFileInfo", "dset '%s' (%d files)",
                                 o->GetName(), dsete->GetListOfElements()->GetSize());
         TIter nxee(dsete->GetListOfElements());
         while ((ee = (TDSetElement *) nxee())) {
            fne = ee->GetName();
            // Try to determine the status
            status = "Ok";
            if (hmiss.FindObject(fne)) status = "Failed";
            if (fFileInfoVrs == 0)
               ent.Form("'%s','%s','%s','%s'", gSystem->BaseName(fne), gSystem->DirName(fne),
                        qid, status.Data());
            else
               ent.Form("'%s','%s','%s','%s','%s'", gSystem->BaseName(fne), gSystem->DirName(fne),
                        qid, begin, status.Data());
            values.Add(new TObjString(ent.Data()));
         }
      } else {
         Warning("SendFileInfo", "ignoring unknown element type: '%s'", o->ClassName());
      }
   }

   PDB(kMonitoring,1) Info("SendFileInfo", "sending (%d entries)", values.GetSize());

   // Now we are ready to send
   Bool_t rc = fWriter->SendParameters(&values, fFilesSendOpts);

   // Done
   return (rc ? 0 : -1);
}
 TProofMonSenderSQL.cxx:1
 TProofMonSenderSQL.cxx:2
 TProofMonSenderSQL.cxx:3
 TProofMonSenderSQL.cxx:4
 TProofMonSenderSQL.cxx:5
 TProofMonSenderSQL.cxx:6
 TProofMonSenderSQL.cxx:7
 TProofMonSenderSQL.cxx:8
 TProofMonSenderSQL.cxx:9
 TProofMonSenderSQL.cxx:10
 TProofMonSenderSQL.cxx:11
 TProofMonSenderSQL.cxx:12
 TProofMonSenderSQL.cxx:13
 TProofMonSenderSQL.cxx:14
 TProofMonSenderSQL.cxx:15
 TProofMonSenderSQL.cxx:16
 TProofMonSenderSQL.cxx:17
 TProofMonSenderSQL.cxx:18
 TProofMonSenderSQL.cxx:19
 TProofMonSenderSQL.cxx:20
 TProofMonSenderSQL.cxx:21
 TProofMonSenderSQL.cxx:22
 TProofMonSenderSQL.cxx:23
 TProofMonSenderSQL.cxx:24
 TProofMonSenderSQL.cxx:25
 TProofMonSenderSQL.cxx:26
 TProofMonSenderSQL.cxx:27
 TProofMonSenderSQL.cxx:28
 TProofMonSenderSQL.cxx:29
 TProofMonSenderSQL.cxx:30
 TProofMonSenderSQL.cxx:31
 TProofMonSenderSQL.cxx:32
 TProofMonSenderSQL.cxx:33
 TProofMonSenderSQL.cxx:34
 TProofMonSenderSQL.cxx:35
 TProofMonSenderSQL.cxx:36
 TProofMonSenderSQL.cxx:37
 TProofMonSenderSQL.cxx:38
 TProofMonSenderSQL.cxx:39
 TProofMonSenderSQL.cxx:40
 TProofMonSenderSQL.cxx:41
 TProofMonSenderSQL.cxx:42
 TProofMonSenderSQL.cxx:43
 TProofMonSenderSQL.cxx:44
 TProofMonSenderSQL.cxx:45
 TProofMonSenderSQL.cxx:46
 TProofMonSenderSQL.cxx:47
 TProofMonSenderSQL.cxx:48
 TProofMonSenderSQL.cxx:49
 TProofMonSenderSQL.cxx:50
 TProofMonSenderSQL.cxx:51
 TProofMonSenderSQL.cxx:52
 TProofMonSenderSQL.cxx:53
 TProofMonSenderSQL.cxx:54
 TProofMonSenderSQL.cxx:55
 TProofMonSenderSQL.cxx:56
 TProofMonSenderSQL.cxx:57
 TProofMonSenderSQL.cxx:58
 TProofMonSenderSQL.cxx:59
 TProofMonSenderSQL.cxx:60
 TProofMonSenderSQL.cxx:61
 TProofMonSenderSQL.cxx:62
 TProofMonSenderSQL.cxx:63
 TProofMonSenderSQL.cxx:64
 TProofMonSenderSQL.cxx:65
 TProofMonSenderSQL.cxx:66
 TProofMonSenderSQL.cxx:67
 TProofMonSenderSQL.cxx:68
 TProofMonSenderSQL.cxx:69
 TProofMonSenderSQL.cxx:70
 TProofMonSenderSQL.cxx:71
 TProofMonSenderSQL.cxx:72
 TProofMonSenderSQL.cxx:73
 TProofMonSenderSQL.cxx:74
 TProofMonSenderSQL.cxx:75
 TProofMonSenderSQL.cxx:76
 TProofMonSenderSQL.cxx:77
 TProofMonSenderSQL.cxx:78
 TProofMonSenderSQL.cxx:79
 TProofMonSenderSQL.cxx:80
 TProofMonSenderSQL.cxx:81
 TProofMonSenderSQL.cxx:82
 TProofMonSenderSQL.cxx:83
 TProofMonSenderSQL.cxx:84
 TProofMonSenderSQL.cxx:85
 TProofMonSenderSQL.cxx:86
 TProofMonSenderSQL.cxx:87
 TProofMonSenderSQL.cxx:88
 TProofMonSenderSQL.cxx:89
 TProofMonSenderSQL.cxx:90
 TProofMonSenderSQL.cxx:91
 TProofMonSenderSQL.cxx:92
 TProofMonSenderSQL.cxx:93
 TProofMonSenderSQL.cxx:94
 TProofMonSenderSQL.cxx:95
 TProofMonSenderSQL.cxx:96
 TProofMonSenderSQL.cxx:97
 TProofMonSenderSQL.cxx:98
 TProofMonSenderSQL.cxx:99
 TProofMonSenderSQL.cxx:100
 TProofMonSenderSQL.cxx:101
 TProofMonSenderSQL.cxx:102
 TProofMonSenderSQL.cxx:103
 TProofMonSenderSQL.cxx:104
 TProofMonSenderSQL.cxx:105
 TProofMonSenderSQL.cxx:106
 TProofMonSenderSQL.cxx:107
 TProofMonSenderSQL.cxx:108
 TProofMonSenderSQL.cxx:109
 TProofMonSenderSQL.cxx:110
 TProofMonSenderSQL.cxx:111
 TProofMonSenderSQL.cxx:112
 TProofMonSenderSQL.cxx:113
 TProofMonSenderSQL.cxx:114
 TProofMonSenderSQL.cxx:115
 TProofMonSenderSQL.cxx:116
 TProofMonSenderSQL.cxx:117
 TProofMonSenderSQL.cxx:118
 TProofMonSenderSQL.cxx:119
 TProofMonSenderSQL.cxx:120
 TProofMonSenderSQL.cxx:121
 TProofMonSenderSQL.cxx:122
 TProofMonSenderSQL.cxx:123
 TProofMonSenderSQL.cxx:124
 TProofMonSenderSQL.cxx:125
 TProofMonSenderSQL.cxx:126
 TProofMonSenderSQL.cxx:127
 TProofMonSenderSQL.cxx:128
 TProofMonSenderSQL.cxx:129
 TProofMonSenderSQL.cxx:130
 TProofMonSenderSQL.cxx:131
 TProofMonSenderSQL.cxx:132
 TProofMonSenderSQL.cxx:133
 TProofMonSenderSQL.cxx:134
 TProofMonSenderSQL.cxx:135
 TProofMonSenderSQL.cxx:136
 TProofMonSenderSQL.cxx:137
 TProofMonSenderSQL.cxx:138
 TProofMonSenderSQL.cxx:139
 TProofMonSenderSQL.cxx:140
 TProofMonSenderSQL.cxx:141
 TProofMonSenderSQL.cxx:142
 TProofMonSenderSQL.cxx:143
 TProofMonSenderSQL.cxx:144
 TProofMonSenderSQL.cxx:145
 TProofMonSenderSQL.cxx:146
 TProofMonSenderSQL.cxx:147
 TProofMonSenderSQL.cxx:148
 TProofMonSenderSQL.cxx:149
 TProofMonSenderSQL.cxx:150
 TProofMonSenderSQL.cxx:151
 TProofMonSenderSQL.cxx:152
 TProofMonSenderSQL.cxx:153
 TProofMonSenderSQL.cxx:154
 TProofMonSenderSQL.cxx:155
 TProofMonSenderSQL.cxx:156
 TProofMonSenderSQL.cxx:157
 TProofMonSenderSQL.cxx:158
 TProofMonSenderSQL.cxx:159
 TProofMonSenderSQL.cxx:160
 TProofMonSenderSQL.cxx:161
 TProofMonSenderSQL.cxx:162
 TProofMonSenderSQL.cxx:163
 TProofMonSenderSQL.cxx:164
 TProofMonSenderSQL.cxx:165
 TProofMonSenderSQL.cxx:166
 TProofMonSenderSQL.cxx:167
 TProofMonSenderSQL.cxx:168
 TProofMonSenderSQL.cxx:169
 TProofMonSenderSQL.cxx:170
 TProofMonSenderSQL.cxx:171
 TProofMonSenderSQL.cxx:172
 TProofMonSenderSQL.cxx:173
 TProofMonSenderSQL.cxx:174
 TProofMonSenderSQL.cxx:175
 TProofMonSenderSQL.cxx:176
 TProofMonSenderSQL.cxx:177
 TProofMonSenderSQL.cxx:178
 TProofMonSenderSQL.cxx:179
 TProofMonSenderSQL.cxx:180
 TProofMonSenderSQL.cxx:181
 TProofMonSenderSQL.cxx:182
 TProofMonSenderSQL.cxx:183
 TProofMonSenderSQL.cxx:184
 TProofMonSenderSQL.cxx:185
 TProofMonSenderSQL.cxx:186
 TProofMonSenderSQL.cxx:187
 TProofMonSenderSQL.cxx:188
 TProofMonSenderSQL.cxx:189
 TProofMonSenderSQL.cxx:190
 TProofMonSenderSQL.cxx:191
 TProofMonSenderSQL.cxx:192
 TProofMonSenderSQL.cxx:193
 TProofMonSenderSQL.cxx:194
 TProofMonSenderSQL.cxx:195
 TProofMonSenderSQL.cxx:196
 TProofMonSenderSQL.cxx:197
 TProofMonSenderSQL.cxx:198
 TProofMonSenderSQL.cxx:199
 TProofMonSenderSQL.cxx:200
 TProofMonSenderSQL.cxx:201
 TProofMonSenderSQL.cxx:202
 TProofMonSenderSQL.cxx:203
 TProofMonSenderSQL.cxx:204
 TProofMonSenderSQL.cxx:205
 TProofMonSenderSQL.cxx:206
 TProofMonSenderSQL.cxx:207
 TProofMonSenderSQL.cxx:208
 TProofMonSenderSQL.cxx:209
 TProofMonSenderSQL.cxx:210
 TProofMonSenderSQL.cxx:211
 TProofMonSenderSQL.cxx:212
 TProofMonSenderSQL.cxx:213
 TProofMonSenderSQL.cxx:214
 TProofMonSenderSQL.cxx:215
 TProofMonSenderSQL.cxx:216
 TProofMonSenderSQL.cxx:217
 TProofMonSenderSQL.cxx:218
 TProofMonSenderSQL.cxx:219
 TProofMonSenderSQL.cxx:220
 TProofMonSenderSQL.cxx:221
 TProofMonSenderSQL.cxx:222
 TProofMonSenderSQL.cxx:223
 TProofMonSenderSQL.cxx:224
 TProofMonSenderSQL.cxx:225
 TProofMonSenderSQL.cxx:226
 TProofMonSenderSQL.cxx:227
 TProofMonSenderSQL.cxx:228
 TProofMonSenderSQL.cxx:229
 TProofMonSenderSQL.cxx:230
 TProofMonSenderSQL.cxx:231
 TProofMonSenderSQL.cxx:232
 TProofMonSenderSQL.cxx:233
 TProofMonSenderSQL.cxx:234
 TProofMonSenderSQL.cxx:235
 TProofMonSenderSQL.cxx:236
 TProofMonSenderSQL.cxx:237
 TProofMonSenderSQL.cxx:238
 TProofMonSenderSQL.cxx:239
 TProofMonSenderSQL.cxx:240
 TProofMonSenderSQL.cxx:241
 TProofMonSenderSQL.cxx:242
 TProofMonSenderSQL.cxx:243
 TProofMonSenderSQL.cxx:244
 TProofMonSenderSQL.cxx:245
 TProofMonSenderSQL.cxx:246
 TProofMonSenderSQL.cxx:247
 TProofMonSenderSQL.cxx:248
 TProofMonSenderSQL.cxx:249
 TProofMonSenderSQL.cxx:250
 TProofMonSenderSQL.cxx:251
 TProofMonSenderSQL.cxx:252
 TProofMonSenderSQL.cxx:253
 TProofMonSenderSQL.cxx:254
 TProofMonSenderSQL.cxx:255
 TProofMonSenderSQL.cxx:256
 TProofMonSenderSQL.cxx:257
 TProofMonSenderSQL.cxx:258
 TProofMonSenderSQL.cxx:259
 TProofMonSenderSQL.cxx:260
 TProofMonSenderSQL.cxx:261
 TProofMonSenderSQL.cxx:262
 TProofMonSenderSQL.cxx:263
 TProofMonSenderSQL.cxx:264
 TProofMonSenderSQL.cxx:265
 TProofMonSenderSQL.cxx:266
 TProofMonSenderSQL.cxx:267
 TProofMonSenderSQL.cxx:268
 TProofMonSenderSQL.cxx:269
 TProofMonSenderSQL.cxx:270
 TProofMonSenderSQL.cxx:271
 TProofMonSenderSQL.cxx:272
 TProofMonSenderSQL.cxx:273
 TProofMonSenderSQL.cxx:274
 TProofMonSenderSQL.cxx:275
 TProofMonSenderSQL.cxx:276
 TProofMonSenderSQL.cxx:277
 TProofMonSenderSQL.cxx:278
 TProofMonSenderSQL.cxx:279
 TProofMonSenderSQL.cxx:280
 TProofMonSenderSQL.cxx:281
 TProofMonSenderSQL.cxx:282
 TProofMonSenderSQL.cxx:283
 TProofMonSenderSQL.cxx:284
 TProofMonSenderSQL.cxx:285
 TProofMonSenderSQL.cxx:286
 TProofMonSenderSQL.cxx:287
 TProofMonSenderSQL.cxx:288
 TProofMonSenderSQL.cxx:289
 TProofMonSenderSQL.cxx:290
 TProofMonSenderSQL.cxx:291
 TProofMonSenderSQL.cxx:292
 TProofMonSenderSQL.cxx:293
 TProofMonSenderSQL.cxx:294
 TProofMonSenderSQL.cxx:295
 TProofMonSenderSQL.cxx:296
 TProofMonSenderSQL.cxx:297
 TProofMonSenderSQL.cxx:298
 TProofMonSenderSQL.cxx:299
 TProofMonSenderSQL.cxx:300
 TProofMonSenderSQL.cxx:301
 TProofMonSenderSQL.cxx:302
 TProofMonSenderSQL.cxx:303
 TProofMonSenderSQL.cxx:304
 TProofMonSenderSQL.cxx:305
 TProofMonSenderSQL.cxx:306
 TProofMonSenderSQL.cxx:307
 TProofMonSenderSQL.cxx:308
 TProofMonSenderSQL.cxx:309
 TProofMonSenderSQL.cxx:310
 TProofMonSenderSQL.cxx:311
 TProofMonSenderSQL.cxx:312
 TProofMonSenderSQL.cxx:313
 TProofMonSenderSQL.cxx:314
 TProofMonSenderSQL.cxx:315
 TProofMonSenderSQL.cxx:316
 TProofMonSenderSQL.cxx:317
 TProofMonSenderSQL.cxx:318
 TProofMonSenderSQL.cxx:319
 TProofMonSenderSQL.cxx:320
 TProofMonSenderSQL.cxx:321
 TProofMonSenderSQL.cxx:322
 TProofMonSenderSQL.cxx:323
 TProofMonSenderSQL.cxx:324
 TProofMonSenderSQL.cxx:325
 TProofMonSenderSQL.cxx:326
 TProofMonSenderSQL.cxx:327
 TProofMonSenderSQL.cxx:328
 TProofMonSenderSQL.cxx:329
 TProofMonSenderSQL.cxx:330
 TProofMonSenderSQL.cxx:331
 TProofMonSenderSQL.cxx:332
 TProofMonSenderSQL.cxx:333
 TProofMonSenderSQL.cxx:334
 TProofMonSenderSQL.cxx:335
 TProofMonSenderSQL.cxx:336
 TProofMonSenderSQL.cxx:337
 TProofMonSenderSQL.cxx:338
 TProofMonSenderSQL.cxx:339
 TProofMonSenderSQL.cxx:340
 TProofMonSenderSQL.cxx:341
 TProofMonSenderSQL.cxx:342
 TProofMonSenderSQL.cxx:343
 TProofMonSenderSQL.cxx:344
 TProofMonSenderSQL.cxx:345
 TProofMonSenderSQL.cxx:346
 TProofMonSenderSQL.cxx:347
 TProofMonSenderSQL.cxx:348
 TProofMonSenderSQL.cxx:349
 TProofMonSenderSQL.cxx:350
 TProofMonSenderSQL.cxx:351
 TProofMonSenderSQL.cxx:352
 TProofMonSenderSQL.cxx:353
 TProofMonSenderSQL.cxx:354
 TProofMonSenderSQL.cxx:355
 TProofMonSenderSQL.cxx:356
 TProofMonSenderSQL.cxx:357
 TProofMonSenderSQL.cxx:358
 TProofMonSenderSQL.cxx:359
 TProofMonSenderSQL.cxx:360
 TProofMonSenderSQL.cxx:361
 TProofMonSenderSQL.cxx:362
 TProofMonSenderSQL.cxx:363
 TProofMonSenderSQL.cxx:364
 TProofMonSenderSQL.cxx:365
 TProofMonSenderSQL.cxx:366
 TProofMonSenderSQL.cxx:367
 TProofMonSenderSQL.cxx:368
 TProofMonSenderSQL.cxx:369
 TProofMonSenderSQL.cxx:370
 TProofMonSenderSQL.cxx:371
 TProofMonSenderSQL.cxx:372
 TProofMonSenderSQL.cxx:373
 TProofMonSenderSQL.cxx:374
 TProofMonSenderSQL.cxx:375
 TProofMonSenderSQL.cxx:376
 TProofMonSenderSQL.cxx:377
 TProofMonSenderSQL.cxx:378
 TProofMonSenderSQL.cxx:379
 TProofMonSenderSQL.cxx:380
 TProofMonSenderSQL.cxx:381
 TProofMonSenderSQL.cxx:382
 TProofMonSenderSQL.cxx:383
 TProofMonSenderSQL.cxx:384
 TProofMonSenderSQL.cxx:385
 TProofMonSenderSQL.cxx:386
 TProofMonSenderSQL.cxx:387
 TProofMonSenderSQL.cxx:388
 TProofMonSenderSQL.cxx:389
 TProofMonSenderSQL.cxx:390
 TProofMonSenderSQL.cxx:391
 TProofMonSenderSQL.cxx:392
 TProofMonSenderSQL.cxx:393
 TProofMonSenderSQL.cxx:394
 TProofMonSenderSQL.cxx:395
 TProofMonSenderSQL.cxx:396
 TProofMonSenderSQL.cxx:397
 TProofMonSenderSQL.cxx:398
 TProofMonSenderSQL.cxx:399
 TProofMonSenderSQL.cxx:400
 TProofMonSenderSQL.cxx:401
 TProofMonSenderSQL.cxx:402
 TProofMonSenderSQL.cxx:403
 TProofMonSenderSQL.cxx:404
 TProofMonSenderSQL.cxx:405
 TProofMonSenderSQL.cxx:406
 TProofMonSenderSQL.cxx:407
 TProofMonSenderSQL.cxx:408
 TProofMonSenderSQL.cxx:409
 TProofMonSenderSQL.cxx:410
 TProofMonSenderSQL.cxx:411
 TProofMonSenderSQL.cxx:412
 TProofMonSenderSQL.cxx:413
 TProofMonSenderSQL.cxx:414
 TProofMonSenderSQL.cxx:415
 TProofMonSenderSQL.cxx:416
 TProofMonSenderSQL.cxx:417
 TProofMonSenderSQL.cxx:418
 TProofMonSenderSQL.cxx:419
 TProofMonSenderSQL.cxx:420
 TProofMonSenderSQL.cxx:421
 TProofMonSenderSQL.cxx:422
 TProofMonSenderSQL.cxx:423
 TProofMonSenderSQL.cxx:424
 TProofMonSenderSQL.cxx:425
 TProofMonSenderSQL.cxx:426
 TProofMonSenderSQL.cxx:427
 TProofMonSenderSQL.cxx:428
 TProofMonSenderSQL.cxx:429
 TProofMonSenderSQL.cxx:430
 TProofMonSenderSQL.cxx:431
 TProofMonSenderSQL.cxx:432
 TProofMonSenderSQL.cxx:433
 TProofMonSenderSQL.cxx:434
 TProofMonSenderSQL.cxx:435
 TProofMonSenderSQL.cxx:436
 TProofMonSenderSQL.cxx:437
 TProofMonSenderSQL.cxx:438
 TProofMonSenderSQL.cxx:439
 TProofMonSenderSQL.cxx:440
 TProofMonSenderSQL.cxx:441
 TProofMonSenderSQL.cxx:442
 TProofMonSenderSQL.cxx:443
 TProofMonSenderSQL.cxx:444
 TProofMonSenderSQL.cxx:445
 TProofMonSenderSQL.cxx:446
 TProofMonSenderSQL.cxx:447
 TProofMonSenderSQL.cxx:448
 TProofMonSenderSQL.cxx:449
 TProofMonSenderSQL.cxx:450
 TProofMonSenderSQL.cxx:451
 TProofMonSenderSQL.cxx:452
 TProofMonSenderSQL.cxx:453
 TProofMonSenderSQL.cxx:454
 TProofMonSenderSQL.cxx:455
 TProofMonSenderSQL.cxx:456
 TProofMonSenderSQL.cxx:457
 TProofMonSenderSQL.cxx:458
 TProofMonSenderSQL.cxx:459
 TProofMonSenderSQL.cxx:460
 TProofMonSenderSQL.cxx:461
 TProofMonSenderSQL.cxx:462
 TProofMonSenderSQL.cxx:463
 TProofMonSenderSQL.cxx:464
 TProofMonSenderSQL.cxx:465
 TProofMonSenderSQL.cxx:466
 TProofMonSenderSQL.cxx:467
 TProofMonSenderSQL.cxx:468
 TProofMonSenderSQL.cxx:469
 TProofMonSenderSQL.cxx:470
 TProofMonSenderSQL.cxx:471
 TProofMonSenderSQL.cxx:472
 TProofMonSenderSQL.cxx:473
 TProofMonSenderSQL.cxx:474
 TProofMonSenderSQL.cxx:475
 TProofMonSenderSQL.cxx:476
 TProofMonSenderSQL.cxx:477
 TProofMonSenderSQL.cxx:478
 TProofMonSenderSQL.cxx:479
 TProofMonSenderSQL.cxx:480
 TProofMonSenderSQL.cxx:481
 TProofMonSenderSQL.cxx:482
 TProofMonSenderSQL.cxx:483
 TProofMonSenderSQL.cxx:484
 TProofMonSenderSQL.cxx:485
 TProofMonSenderSQL.cxx:486
 TProofMonSenderSQL.cxx:487
 TProofMonSenderSQL.cxx:488
 TProofMonSenderSQL.cxx:489
 TProofMonSenderSQL.cxx:490
 TProofMonSenderSQL.cxx:491
 TProofMonSenderSQL.cxx:492
 TProofMonSenderSQL.cxx:493
 TProofMonSenderSQL.cxx:494
 TProofMonSenderSQL.cxx:495
 TProofMonSenderSQL.cxx:496
 TProofMonSenderSQL.cxx:497
 TProofMonSenderSQL.cxx:498
 TProofMonSenderSQL.cxx:499
 TProofMonSenderSQL.cxx:500
 TProofMonSenderSQL.cxx:501
 TProofMonSenderSQL.cxx:502