ROOT logo
// @(#)root/tree:$Id: TQueryResult.cxx 25716 2008-10-07 09:10:47Z rdm $
// Author: G Ganis Sep 2005

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

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TQueryResult                                                         //
//                                                                      //
// A container class for query results.                                 //
//                                                                      //
//////////////////////////////////////////////////////////////////////////
#include <string.h>

#include "TBrowser.h"
#include "TError.h"
#include "TEventList.h"
#include "TQueryResult.h"
#include "TRegexp.h"
#include "TROOT.h"
#include "TMath.h"
#include "TSelector.h"
#include "TSystem.h"
#include "TTimeStamp.h"


ClassImp(TQueryResult)

//______________________________________________________________________________
TQueryResult::TQueryResult(Int_t seqnum, const char *opt, TList *inlist,
                           Long64_t entries, Long64_t first, const char *selec)
             : fSeqNum(seqnum), fStatus(kSubmitted), fUsedCPU(0.), fOptions(opt),
               fEntries(entries), fFirst(first),
               fBytes(0), fParList("-"), fOutputList(0),
               fFinalized(kFALSE), fArchived(kFALSE), fResultFile("-"),
               fInitTime(0.), fProcTime(0.)
{
   // Main constructor.

   // Name and unique title
   SetName(Form("q%d", fSeqNum));
   SetTitle(Form("session-localhost-%d-%d",
                 TTimeStamp().GetSec(),gSystem->GetPid()));

   // Start time
   fStart.Set();
   fEnd.Set(fStart.Convert()-1);

   // Save input list
   fInputList = 0;
   if (inlist) {
      fInputList = (TList *) (inlist->Clone());
      fInputList->SetOwner();
   }

   // Log file
   fLogFile = new TMacro("LogFile");

   // Selector files
   fDraw = selec ? TSelector::IsStandardDraw(selec) : kFALSE;
   if (fDraw) {
      // The input list should contain info about the variables and
      // selection cuts: save them into the macro title
      TString varsel;
      if (fInputList) {
         TIter nxo(fInputList);
         TObject *o = 0;
         while ((o = nxo())) {
            if (!strcmp(o->GetName(),"varexp")) {
               varsel = o->GetTitle();
               Int_t iht = varsel.Index(">>htemp");
               if (iht > -1)
                  varsel.Remove(iht);
               varsel = Form("\"%s\";", varsel.Data());
            }
            if (!strcmp(o->GetName(),"selection"))
               varsel += Form("\"%s\"", o->GetTitle());
         }
         if (gDebug > 0)
            Info("TQueryResult","selec: %s, varsel: %s", selec, varsel.Data());
         // Log notification also in the instance
         fLogFile->AddLine(Form("TQueryResult: selec: %s, varsel: %s",
                                selec, varsel.Data()));
      }
      // Standard draw action: save only the name
      fSelecImp = new TMacro(selec, varsel);
      fSelecHdr = 0;
   } else {
      // Save selector file
      fSelecHdr = new TMacro;
      fSelecImp = new TMacro;
      SaveSelector(selec);
   }

   // List of libraries loaded at creation
   const char *pl = gSystem->GetLibraries();
   fLibList = (pl && (strlen(pl) > 0)) ? pl : "-";
}

//______________________________________________________________________________
TQueryResult::~TQueryResult()
{
   // Destructor.

   SafeDelete(fInputList);
   SafeDelete(fOutputList);
   SafeDelete(fLogFile);
   SafeDelete(fSelecImp);
   SafeDelete(fSelecHdr);
}

//______________________________________________________________________________
TQueryResult *TQueryResult::CloneInfo()
{
   // Return an instance of TQueryResult containing only the local
   // info fields, i.e. no outputlist, liblist, dset, selectors, etc..
   // Used for fast retrieve of information about existing queries
   // and their status.

   // Create instance
   TQueryResult *qr = new TQueryResult(fSeqNum, fOptions, 0, fEntries,
                                       fFirst, 0);

   // Correct fields
   qr->fStatus = fStatus;
   qr->fStart.Set(fStart.Convert());
   qr->fEnd.Set(fEnd.Convert());
   qr->fUsedCPU = fUsedCPU;
   qr->fEntries = fEntries;
   qr->fFirst = fFirst;
   qr->fBytes = fBytes;
   qr->fParList = fParList;
   qr->fResultFile = fResultFile;
   qr->fArchived = fArchived;
   qr->fInitTime = fInitTime;
   qr->fProcTime = fProcTime;

   qr->fSelecHdr = 0;
   if (GetSelecHdr()) {
      qr->fSelecHdr = new TMacro();
      qr->fSelecHdr->SetName(GetSelecHdr()->GetName());
      qr->fSelecHdr->SetTitle(GetSelecHdr()->GetTitle());
   }
   qr->fSelecImp = 0;
   if (GetSelecImp()) {
      qr->fSelecImp = new TMacro();
      qr->fSelecImp->SetName(GetSelecImp()->GetName());
      qr->fSelecImp->SetTitle(GetSelecImp()->GetTitle());
   }

   // Name and title
   qr->SetName(GetName());
   qr->SetTitle(GetTitle());

   return qr;
}

//_____________________________________________________________________________
void TQueryResult::SaveSelector(const char *selector)
{
   // Save the selector header and implementation into the dedicated
   // TMacro instances. The header is searched for in the same directory
   // of the implementation file.

   if (!selector)
      return;

   // Separate out aclic chars
   TString selec = selector;
   TString aclicMode;
   TString arguments;
   TString io;
   selec = gSystem->SplitAclicMode(selec, aclicMode, arguments, io);

   // Store aclic options, if any
   if (aclicMode.Length() > 0)
      fOptions += Form("#%s", aclicMode.Data());

   // If the selector is in a precompiled shared lib (e.g. in a PAR)
   // we just save the name
   TString selname = gSystem->BaseName(selec);
   Int_t idx = selname.Index(".");
   if (idx < 0) {
      // Notify
      if (gDebug > 0)
         Info("SaveSelector", "precompiled selector: just save the name");
      fSelecImp->SetName(selname);
      fSelecImp->SetTitle(selname);
      fSelecHdr->SetName(selname);
      fSelecHdr->SetTitle(selname);
   } else {
      // We locate the file and save it in compressed form
      if (idx > -1)
         selname.Remove(idx);

      // Locate the implementation file
      char *selc = gSystem->Which(TROOT::GetMacroPath(), selec, kReadPermission);
      if (!selc) {
         Warning("SaveSelector",
                 "could not locate selector implementation file (%s)", selec.Data());
         return;
      }

      // Fill the TMacro instance
      fSelecImp->ReadFile(selc);
      fSelecImp->SetName(gSystem->BaseName(selc));
      fSelecImp->SetTitle(selname);

      // Locate the included header file
      char *p = (char *) strrchr(selc,'.');
      if (p) {
         strcpy(p+1,"h");
      } else {
         Warning("SaveSelector",
                 "bad formatted name (%s): could not build header file name", selc);
      }
      if (!(gSystem->AccessPathName(selc, kReadPermission))) {
         fSelecHdr->ReadFile(selc);
         fSelecHdr->SetName(gSystem->BaseName(selc));
         fSelecHdr->SetTitle(selname);
      } else {
         Warning("SaveSelector",
                 "could not locate selector header file (%s)", selc);
      }

      delete[] selc;
   }
}

//______________________________________________________________________________
void TQueryResult::RecordEnd(EQueryStatus status, TList *outlist)
{
   // End of query settings.

   // End time
   fEnd.Set();

   // Status
   fStatus = (status < kAborted || status > kCompleted) ? kAborted : status;

   // Clone the results
   if (outlist && fOutputList != outlist) {
      if (fOutputList) {
         fOutputList->Delete();
         SafeDelete(fOutputList);
      }
      fOutputList = (TList *) (outlist->Clone());
      fOutputList->SetOwner();
   }
}

//______________________________________________________________________________
void TQueryResult::SetProcessInfo(Long64_t ent, Float_t cpu, Long64_t bytes,
                                  Float_t init, Float_t proc)
{
   // Set processing info.

   fEntries = (ent > 0) ? ent : fEntries;
   fUsedCPU = (cpu > 0.) ? cpu : fUsedCPU;
   fBytes = (bytes > 0.) ? bytes : fBytes;
   fInitTime = (init > 0.) ? init : fInitTime;
   fProcTime = (proc > 0.) ? proc : fProcTime;
}

//______________________________________________________________________________
void TQueryResult::AddLogLine(const char *logline)
{
   // Fill log file.

   if (logline)
      fLogFile->AddLine(logline);
}

//______________________________________________________________________________
void TQueryResult::AddInput(TObject *obj)
{
   // Add obj to the input list

   if (fInputList && obj)
      fInputList->Add(obj);
}

//______________________________________________________________________________
void TQueryResult::SetArchived(const char *archfile)
{
   // Set (or update) query in archived state.

   if (IsDone()) {
      fArchived = kTRUE;
      if (archfile && (strlen(archfile) > 0))
         fResultFile = archfile;
   }
}

//______________________________________________________________________________
void TQueryResult::Print(Option_t *opt) const
{
   // Print query content. Use opt = "F" for a full listing.

   // Attention: the list must match EQueryStatus
   const char *qst[] = {
      "aborted  ", "submitted", "running  ", "stopped  ", "completed"
   };

   // Status label
   Int_t st = (fStatus > 0 && fStatus <= kCompleted) ? fStatus : 0;

   // Range label
   Long64_t last = (fEntries > -1) ? fFirst+fEntries-1 : -1;

   // Option
   Bool_t full = ((strchr(opt,'F') || strchr(opt,'f'))) ? kTRUE : kFALSE;

   // Query number to be printed
   Int_t qry = fSeqNum;
   TString qn = opt;
   TRegexp re("N.*N");
   Int_t i1 = qn.Index(re);
   if (i1 != kNPOS) {
      qn.Remove(0, i1+1);
      qn.Remove(qn.Index("N"));
      qry = qn.Atoi();
   }

   // Print separator if full dump
   if (full) Printf("+++");

   TString range;
   if (!full)
      range = (last > -1) ? Form("evts:%lld-%lld", fFirst, last) : "";

   // Print header
   if (!fDraw) {
      const char *fin = fFinalized ? "finalized" : qst[st];
      const char *arc = fArchived ? "(A)" : "";
      Printf("+++ #:%d ref:\"%s:%s\" sel:%s %9s%s %s",
             qry, GetTitle(), GetName(), fSelecImp->GetTitle(), fin, arc,
             range.Data());
   } else {
      Printf("+++ #:%d ref:\"%s:%s\" varsel:%s %s",
             qry, GetTitle(), GetName(), fSelecImp->GetTitle(),
             range.Data());
   }

   // We are done, if not full dump
   if (!full) return;

   // Time information
   Float_t elapsed = (fProcTime > 0.) ? fProcTime
                                      : (Float_t)(fEnd.Convert() - fStart.Convert());
   Printf("+++        started:   %s", fStart.AsString());
   Printf("+++        init time: %.3f sec", fInitTime);
   Printf("+++        proc time: %.3f sec (CPU time: %.1f sec)", elapsed, fUsedCPU);

   // Number of events processed, rate, size
   Double_t rate = 0.0;
   if (fEntries > -1 && elapsed > 0)
      rate = fEntries / (Double_t)elapsed ;
   Float_t size = ((Float_t)fBytes) / TMath::Power(2.,20.);
   Printf("+++        processed: %lld events (size: %.3f MBs)", fEntries, size);
   Printf("+++        rate:      %.1f evts/sec", rate);

   // Package information
   if (fParList.Length() > 1)
      Printf("+++        packages:  %s", fParList.Data());

   // Result information
   TString res = fResultFile;
   if (!fArchived) {
      Int_t dq = res.Index("queries");
      if (dq > -1) {
         res.Remove(0,res.Index("queries"));
         res.Insert(0,"<PROOF_SandBox>/");
      }
      if (res.BeginsWith("-")) {
         res = (fStatus == kAborted) ? "not available" : "sent to client";
      }
   }
   if (res.Length() > 1)
      Printf("+++        results:   %s", res.Data());

   if (fOutputList && fOutputList->GetSize() > 0)
      Printf("+++        outlist:   %d objects", fOutputList->GetSize());
}

//______________________________________________________________________________
void TQueryResult::Browse(TBrowser *b)
{
   // To support browsing of the results.

   if (fOutputList)
      b->Add(fOutputList, fOutputList->Class(), "OutputList");
}

//______________________________________________________________________________
void TQueryResult::SetInputList(TList *in, Bool_t adopt)
{
   // Set / change the input list.
   // The flag 'adopt' determines whether the list is adopted (default)
   // or cloned. If adopted, object ownership is transferred to this object.
   // The internal fInputList will always be owner of its objects.

   if (!in || in != fInputList)
      SafeDelete(fInputList);

   if (in && in != fInputList) {
      if (!adopt) {
         fInputList = (TList *) (in->Clone());
      } else {
         fInputList = new TList;
         TIter nxi(in);
         TObject *o = 0;
         while ((o = nxi()))
            fInputList->Add(o);
         in->SetOwner(kFALSE);
      }
      fInputList->SetOwner();
   }
}

//______________________________________________________________________________
void TQueryResult::SetOutputList(TList *out, Bool_t adopt)
{
   // Set / change the output list.
   // The flag 'adopt' determines whether the list is adopted (default)
   // or cloned.  If adopted, object ownership is transferred to this object.
   // The internal fOutputList will always be owner of its objects.

   if (!out || out != fOutputList)
      SafeDelete(fOutputList);

   if (out && out != fOutputList) {
      if (!adopt) {
         fOutputList = (TList *) (out->Clone());
      } else {
         fOutputList = new TList;
         TIter nxo(out);
         TObject *o = 0;
         while ((o = nxo()))
            fOutputList->Add(o);
         out->SetOwner(kFALSE);
      }
      fOutputList->SetOwner();
   }
}

//______________________________________________________________________________
Bool_t operator==(const TQueryResult &qr1, const TQueryResult &qr2)
{
   // Compare two query result instances for equality.
   // Session name and query number are compared.

   if (!strcmp(qr1.GetTitle(), qr2.GetTitle()))
      if (qr1.GetSeqNum() == qr2.GetSeqNum())
         return kTRUE;
   return kFALSE;
}

//______________________________________________________________________________
Bool_t TQueryResult::Matches(const char *ref)
{
   // Return TRUE if reference ref matches.

   TString lref = Form("%s:%s", GetTitle(), GetName());

   if (lref == ref)
      return kTRUE;

   return kFALSE;
}

//______________________________________________________________________________
TObject *TQueryResult::GetInputObject(const char *classname) const
{
   // Return first instance of class 'classname' in the input list.
   // Usefull to access TDSet, TEventList, ...

   TObject *o = 0;
   if (classname && fInputList) {
      TIter nxi(fInputList);
      while ((o = nxi()))
         if (!strncmp(o->ClassName(), classname, strlen(classname)))
            return o;
   }

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