// @(#)root/proof:$Id: 7735e42a1b96a9f40ae76bd884acac883a178dee $
// Author: G. Ganis March 2008

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

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TProofLite                                                           //
//                                                                      //
// This class starts a PROOF session on the local machine: no daemons,  //
// client and master merged, communications via UNIX-like sockets.      //
// By default the number of workers started is NumberOfCores+1; a       //
// different number can be forced on construction.                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TProofLite.h"

#ifdef WIN32
#   include <io.h>
#   include "snprintf.h"
#endif
#include "RConfigure.h"
#include "TDSet.h"
#include "TEnv.h"
#include "TError.h"
#include "TFile.h"
#include "TFileCollection.h"
#include "TFileInfo.h"
#include "THashList.h"
#include "TMessage.h"
#include "TMonitor.h"
#include "TObjString.h"
#include "TPluginManager.h"
#include "TDataSetManager.h"
#include "TDataSetManagerFile.h"
#include "TParameter.h"
#include "TPRegexp.h"
#include "TProofQueryResult.h"
#include "TProofServ.h"
#include "TQueryResultManager.h"
#include "TROOT.h"
#include "TServerSocket.h"
#include "TSlave.h"
#include "TSortedList.h"
#include "TTree.h"
#include "TVirtualProofPlayer.h"
#include "TSelector.h"

ClassImp(TProofLite)

Int_t TProofLite::fgWrksMax = -2; // Unitialized max number of workers

//______________________________________________________________________________
TProofLite::TProofLite(const char *url, const char *conffile, const char *confdir,
                       Int_t loglevel, const char *alias, TProofMgr *mgr)
{
   // Create a PROOF environment. Starting PROOF involves either connecting
   // to a master server, which in turn will start a set of slave servers, or
   // directly starting as master server (if master = ""). Masterurl is of
   // the form: [proof[s]://]host[:port]. Conffile is the name of the config
   // file describing the remote PROOF cluster (this argument alows you to
   // describe different cluster configurations).
   // The default is proof.conf. Confdir is the directory where the config
   // file and other PROOF related files are (like motd and noproof files).
   // Loglevel is the log level (default = 1). User specified custom config
   // files will be first looked for in $HOME/.conffile.

   fUrl.SetUrl(url);

   // Default initializations                                                                                                                                          
   fServSock = 0;
   fCacheLock = 0;
   fQueryLock = 0;
   fQMgr = 0;
   fDataSetManager = 0;
   fDataSetStgRepo = 0;
   fReInvalid = new TPMERegexp("[^A-Za-z0-9._-]");
   InitMembers();

   // This may be needed during init
   fManager = mgr;

   // Default server type
   fServType = TProofMgr::kProofLite;

   // Default query mode
   fQueryMode = kSync;

   // Client and master are merged
   fMasterServ = kTRUE;
   if (fManager) SetBit(TProof::kIsClient);
   SetBit(TProof::kIsMaster);

   // Flag that we are a client
   if (!gSystem->Getenv("ROOTPROOFCLIENT")) gSystem->Setenv("ROOTPROOFCLIENT","");
   
   // Protocol and Host
   fUrl.SetProtocol("proof");
   fUrl.SetHost("__lite__");
   fUrl.SetPort(1093);

   // User
   if (strlen(fUrl.GetUser()) <= 0) {
      // Get user logon name
      UserGroup_t *pw = gSystem->GetUserInfo();
      if (pw) {
         fUrl.SetUser(pw->fUser);
         delete pw;
      }
   }
   fMaster = gSystem->HostName();

   // Analysise the conffile field
   ParseConfigField(conffile);

   // Determine the number of workers giving priority to users request.
   // Otherwise use the system information, if available, or just start
   // the minimal number, i.e. 2 .
   if ((fNWorkers = GetNumberOfWorkers(url)) > 0) {

      TString stup;
      if (gProofServ) {
         Int_t port = gEnv->GetValue("ProofServ.XpdPort", 1093);
         stup.Form("%s @ %s:%d ", gProofServ->GetOrdinal(), gSystem->HostName(), port);
      }
      Printf(" +++ Starting PROOF-Lite %swith %d workers +++", stup.Data(), fNWorkers);
      // Init the session now
      Init(url, conffile, confdir, loglevel, alias);
   }

   // For final cleanup
   if (!gROOT->GetListOfProofs()->FindObject(this))
      gROOT->GetListOfProofs()->Add(this);

   // Still needed by the packetizers: needs to be changed
   gProof = this;
}

//______________________________________________________________________________
Int_t TProofLite::Init(const char *, const char *conffile,
                       const char *confdir, Int_t loglevel, const char *)
{
   // Start the PROOF environment. Starting PROOF involves either connecting
   // to a master server, which in turn will start a set of slave servers, or
   // directly starting as master server (if master = ""). For a description
   // of the arguments see the TProof ctor. Returns the number of started
   // master or slave servers, returns 0 in case of error, in which case
   // fValid remains false.

   R__ASSERT(gSystem);

   fValid = kFALSE;

   // Connected to terminal?
   fTty = (isatty(0) == 0 || isatty(1) == 0) ? kFALSE : kTRUE;   

   if (TestBit(TProof::kIsMaster)) {
      // Fill default conf file and conf dir
      if (!conffile || !conffile[0])
         fConfFile = kPROOF_ConfFile;
      if (!confdir  || !confdir[0])
         fConfDir  = kPROOF_ConfDir;
   } else {
      fConfDir     = confdir;
      fConfFile    = conffile;
   }

   // The sandbox for this session
   if (CreateSandbox() != 0) {
      Error("Init", "could not create/assert sandbox for this session");
      return 0;
   }

   // UNIX path for communication with workers
   TString sockpathdir = gEnv->GetValue("ProofLite.SockPathDir", gSystem->TempDirectory());
   if (sockpathdir.IsNull()) sockpathdir = gSystem->TempDirectory();
   if (sockpathdir(sockpathdir.Length()-1) == '/') sockpathdir.Remove(sockpathdir.Length()-1);
   fSockPath.Form("%s/plite-%d", sockpathdir.Data(), gSystem->GetPid());
   if (fSockPath.Length() > 104) {
      // Sort of hardcoded limit length for Unix systems
      Error("Init", "Unix socket path '%s' is too long (%d bytes):",
                    fSockPath.Data(), fSockPath.Length());
      Error("Init", "use 'ProofLite.SockPathDir' to create it under a directory different"
                    " from '%s'", sockpathdir.Data());
      return 0;
   }

   fLogLevel       = loglevel;
   fProtocol       = kPROOF_Protocol;
   fSendGroupView  = kTRUE;
   fImage          = "<local>";
   fIntHandler     = 0;
   fStatus         = 0;
   fRecvMessages   = new TList;
   fRecvMessages->SetOwner(kTRUE);
   fSlaveInfo      = 0;
   fChains         = new TList;
   fAvailablePackages = 0;
   fEnabledPackages = 0;
   fEndMaster      = TestBit(TProof::kIsMaster) ? kTRUE : kFALSE;
   fInputData      = 0;
   ResetBit(TProof::kNewInputData);

   // Timeout for some collect actions
   fCollectTimeout = gEnv->GetValue("Proof.CollectTimeout", -1);

   fProgressDialog        = 0;
   fProgressDialogStarted = kFALSE;

   // Client logging of messages from the workers
   fRedirLog = kFALSE;
   if (TestBit(TProof::kIsClient)) {
      fLogFileName = Form("%s/session-%s.log", fWorkDir.Data(), GetName());
      if ((fLogFileW = fopen(fLogFileName.Data(), "w")) == 0)
         Error("Init", "could not create temporary logfile %s", fLogFileName.Data());
      if ((fLogFileR = fopen(fLogFileName.Data(), "r")) == 0)
         Error("Init", "could not open logfile %s for reading", fLogFileName.Data());
   }
   fLogToWindowOnly = kFALSE;

   fCacheLock = new TProofLockPath(TString::Format("%s/%s%s", gSystem->TempDirectory(),
                                   kPROOF_CacheLockFile,
                                   TString(fCacheDir).ReplaceAll("/","%").Data()));

   // Create 'queries' locker instance and lock it
   fQueryLock = new TProofLockPath(TString::Format("%s/%s%s-%s", gSystem->TempDirectory(),
                                   kPROOF_QueryLockFile, GetName(),
                                   TString(fQueryDir).ReplaceAll("/","%").Data()));
   fQueryLock->Lock();
   // Create the query manager
   fQMgr = new TQueryResultManager(fQueryDir, GetName(), fWorkDir,
                                   fQueryLock, fLogFileW);

   // Apply quotas, if any
   Int_t maxq = gEnv->GetValue("ProofLite.MaxQueriesSaved", 10);
   if (fQMgr && fQMgr->ApplyMaxQueries(maxq) != 0)
      Warning("Init", "problems applying fMaxQueries");

   if (InitDataSetManager() != 0)
      Warning("Init", "problems initializing the dataset manager");

   // Status of cluster
   fNotIdle = 0;

   // Query type
   fSync = kTRUE;

   // List of queries
   fQueries = 0;
   fOtherQueries = 0;
   fDrawQueries = 0;
   fMaxDrawQueries = 1;
   fSeqNum = 0;

   // Remote ID of the session
   fSessionID = -1;

   // Part of active query
   fWaitingSlaves = 0;

   // Make remote PROOF player
   fPlayer = 0;
   MakePlayer("lite");

   fFeedback = new TList;
   fFeedback->SetOwner();
   fFeedback->SetName("FeedbackList");
   AddInput(fFeedback);

   // Sort workers by descending performance index
   fSlaves           = new TSortedList(kSortDescending);
   fActiveSlaves     = new TList;
   fInactiveSlaves   = new TList;
   fUniqueSlaves     = new TList;
   fAllUniqueSlaves  = new TList;
   fNonUniqueMasters = new TList;
   fBadSlaves        = new TList;
   fAllMonitor       = new TMonitor;
   fActiveMonitor    = new TMonitor;
   fUniqueMonitor    = new TMonitor;
   fAllUniqueMonitor = new TMonitor;
   fCurrentMonitor   = 0;
   fServSock         = 0;

   fTerminatedSlaveInfos = new TList;
   fTerminatedSlaveInfos->SetOwner(kTRUE);

   // Control how to start the workers; copy-on-write (fork) is *very*
   // experimental and available on Unix only.
   fForkStartup      = kFALSE;
   if (gEnv->GetValue("ProofLite.ForkStartup", 0) != 0) {
#ifndef WIN32
      fForkStartup   = kTRUE;
#else
      Warning("Init", "fork-based workers startup is not available on Windows - ignoring");
#endif
   }

   fPackageLock             = 0;
   fEnabledPackagesOnClient = 0;
   fLoadedMacros            = 0;
   fGlobalPackageDirList    = 0;
   if (TestBit(TProof::kIsClient)) {

      // List of directories where to look for global packages
      TString globpack = gEnv->GetValue("Proof.GlobalPackageDirs","");
      if (globpack.Length() > 0) {
         Int_t ng = 0;
         Int_t from = 0;
         TString ldir;
         while (globpack.Tokenize(ldir, from, ":")) {
            TProofServ::ResolveKeywords(ldir);
            if (gSystem->AccessPathName(ldir, kReadPermission)) {
               Warning("Init", "directory for global packages %s does not"
                               " exist or is not readable", ldir.Data());
            } else {
               // Add to the list, key will be "G<ng>", i.e. "G0", "G1", ...
               TString key = Form("G%d", ng++);
               if (!fGlobalPackageDirList) {
                  fGlobalPackageDirList = new THashList();
                  fGlobalPackageDirList->SetOwner();
               }
               fGlobalPackageDirList->Add(new TNamed(key,ldir));
            }
         }
      }

      TString lockpath(fPackageDir);
      lockpath.ReplaceAll("/", "%");
      lockpath.Insert(0, TString::Format("%s/%s", gSystem->TempDirectory(), kPROOF_PackageLockFile));
      fPackageLock = new TProofLockPath(lockpath.Data());

      fEnabledPackagesOnClient = new TList;
      fEnabledPackagesOnClient->SetOwner();
   }

   // Start workers
   if (SetupWorkers(0) != 0) {
      Error("Init", "problems setting up workers");
      return 0;
   }

   // we are now properly initialized
   fValid = kTRUE;

   // De-activate monitor (will be activated in Collect)
   fAllMonitor->DeActivateAll();

   // By default go into parallel mode
   GoParallel(-1, kFALSE);

   // Send relevant initial state to slaves
   SendInitialState();

   SetActive(kFALSE);

   if (IsValid()) {
      // Activate input handler
      ActivateAsyncInput();
      // Set PROOF to running state
      SetRunStatus(TProof::kRunning);
   }
   // We register the session as a socket so that cleanup is done properly
   R__LOCKGUARD2(gROOTMutex);
   gROOT->GetListOfSockets()->Add(this);
   
   AskParallel();

   return fActiveSlaves->GetSize();
}
//______________________________________________________________________________
TProofLite::~TProofLite()
{
   // Destructor

   // Shutdown the workers
   RemoveWorkers(0);

   if (!(fQMgr && fQMgr->Queries() && fQMgr->Queries()->GetSize())) {
      // needed in case fQueryDir is on NFS ?!
      gSystem->MakeDirectory(fQueryDir+"/.delete");
      gSystem->Exec(Form("%s %s", kRM, fQueryDir.Data()));
   }

   // Remove lock file
   if (fQueryLock) {
      gSystem->Unlink(fQueryLock->GetName());
      fQueryLock->Unlock();
   }

   SafeDelete(fReInvalid);
   SafeDelete(fDataSetManager);
   SafeDelete(fDataSetStgRepo);

   // Cleanup the socket
   SafeDelete(fServSock);
   gSystem->Unlink(fSockPath);
}

//______________________________________________________________________________
Int_t TProofLite::GetNumberOfWorkers(const char *url)
{
   // Static method to determine the number of workers giving priority to users request.
   // Otherwise use the system information, if available, or just start
   // the minimal number, i.e. 2 .

   Bool_t notify = kFALSE;
   if (fgWrksMax == -2) {
      // Find the max number of workers, if any
      TString sysname = "system.rootrc";
#ifdef ROOTETCDIR
      char *s = gSystem->ConcatFileName(ROOTETCDIR, sysname);
#else
      TString etc = gRootDir;
#ifdef WIN32
      etc += "\\etc";
#else
      etc += "/etc";
#endif
      char *s = gSystem->ConcatFileName(etc, sysname);
#endif
      TEnv sysenv(0);
      sysenv.ReadFile(s, kEnvGlobal);
      fgWrksMax = sysenv.GetValue("ProofLite.MaxWorkers", -1);
      // Notify once the user if its will is changed
      notify = kTRUE;
      if (s) delete[] s;
   }
   if (fgWrksMax == 0) {
      ::Error("TProofLite::GetNumberOfWorkers",
              "PROOF-Lite disabled by the system administrator: sorry!");
      return 0;
   }

   TString nw;
   Int_t nWorkers = -1;
   Bool_t urlSetting = kFALSE;
   if (url && strlen(url)) {
      nw = url;
      Int_t in = nw.Index("workers=");
      if (in != kNPOS) {
         nw.Remove(0, in + strlen("workers="));
         while (!nw.IsDigit())
            nw.Remove(nw.Length()-1);
         if (!nw.IsNull()) {
            if ((nWorkers = nw.Atoi()) <= 0) {
               ::Warning("TProofLite::GetNumberOfWorkers",
                         "number of workers specified by 'workers='"
                         " is non-positive: using default");
            } else {
               urlSetting = kFALSE;
            }
         }
      }
   }
   if (!urlSetting && fgProofEnvList) {
      // Check PROOF_NWORKERS
      TNamed *nm = (TNamed *) fgProofEnvList->FindObject("PROOF_NWORKERS");
      if (nm) {
         nw = nm->GetTitle();
         if (nw.IsDigit()) {
            if ((nWorkers = nw.Atoi()) == 0) {
               ::Warning("TProofLite::GetNumberOfWorkers",
                         "number of workers specified by 'workers='"
                         " is non-positive: using default");
            }
         }
      }
   }
   if (nWorkers <= 0) {
      nWorkers = gEnv->GetValue("ProofLite.Workers", -1);
      if (nWorkers <= 0) {
         SysInfo_t si;
         if (gSystem->GetSysInfo(&si) == 0 && si.fCpus > 2) {
            nWorkers = si.fCpus;
         } else {
            // Two workers by default
            nWorkers = 2;
         }
         if (notify) notify = kFALSE;
      }
   }
   // Apply the max, if any
   if (fgWrksMax > 0 && fgWrksMax < nWorkers) {
      if (notify)
         ::Warning("TProofLite::GetNumberOfWorkers", "number of PROOF-Lite workers limited by"
                                                     " the system administrator to %d", fgWrksMax);
      nWorkers = fgWrksMax;
   }

   // Done
   return nWorkers;
}

//______________________________________________________________________________
Int_t TProofLite::SetupWorkers(Int_t opt, TList *startedWorkers)
{
   // Start up PROOF workers.

   // Create server socket on the assigned UNIX sock path
   if (!fServSock) {
      if ((fServSock = new TServerSocket(fSockPath))) {
         R__LOCKGUARD2(gROOTMutex);
         // Remove from the list so that cleanup can be done in the correct order
         gROOT->GetListOfSockets()->Remove(fServSock);
      }
   }
   if (!fServSock || !fServSock->IsValid()) {
      Error("SetupWorkers",
            "unable to create server socket for internal communications");
      SetBit(kInvalidObject);
      return -1;
   }

   // Create a monitor and add the socket to it
   TMonitor *mon = new TMonitor;
   mon->Add(fServSock);

   TList started;
   TSlave *wrk = 0;
   Int_t nWrksDone = 0, nWrksTot = -1;
   TString fullord;

   if (opt == 0) {
      nWrksTot = fForkStartup ? 1 : fNWorkers;
      // Now we create the worker applications which will call us back to finalize
      // the setup
      Int_t ord = 0;
      for (; ord < nWrksTot; ord++) {

         // Ordinal for this worker server
         const char *o = (gProofServ) ? gProofServ->GetOrdinal() : "0";
         fullord.Form("%s.%d", o, ord);

         // Create environment files
         SetProofServEnv(fullord);

         // Create worker server and add to the list
         if ((wrk = CreateSlave("lite", fullord, 100, fImage, fWorkDir)))
            started.Add(wrk);

         // Notify
         NotifyStartUp("Opening connections to workers", ++nWrksDone, nWrksTot);

      } //end of worker loop
   } else {
      if (!fForkStartup) {
         Warning("SetupWorkers", "standard startup: workers already started");
         return -1;
      }
      nWrksTot = fNWorkers - 1;
      // Now we create the worker applications which will call us back to finalize
      // the setup
      TString clones;
      Int_t ord = 0;
      for (; ord < nWrksTot; ord++) {

         // Ordinal for this worker server
         const char *o = (gProofServ) ? gProofServ->GetOrdinal() : "0";
         fullord.Form("%s.%d", o, ord + 1);
         if (!clones.IsNull()) clones += " ";
         clones += fullord;

         // Create worker server and add to the list
         if ((wrk = CreateSlave("lite", fullord, -1, fImage, fWorkDir)))
            started.Add(wrk);

         // Notify
         NotifyStartUp("Opening connections to workers", ++nWrksDone, nWrksTot);

      } //end of worker loop

      // Send the request
      TMessage m(kPROOF_FORK);
      m << clones;
      Broadcast(m, kActive);
   }

   // Wait for call backs
   nWrksDone = 0;
   nWrksTot = started.GetSize();
   Int_t nSelects = 0;
   Int_t to = gEnv->GetValue("ProofLite.StartupTimeOut", 5) * 1000;
   while (started.GetSize() > 0 && nSelects < nWrksTot) {

      // Wait for activity on the socket for max 5 secs
      TSocket *xs = mon->Select(to);

      // Count attempts and check
      nSelects++;
      if (xs == (TSocket *) -1) continue;

      // Get the connection
      TSocket *s = fServSock->Accept();
      if (s && s->IsValid()) {
         // Receive ordinal
         TMessage *msg = 0;
         if (s->Recv(msg) < 0) {
            Warning("SetupWorkers", "problems receiving message from accepted socket!");
         } else {
            if (msg) {
               TString ord;
               *msg >> ord;
               // Find who is calling back
               if ((wrk = (TSlave *) started.FindObject(ord))) {
                  // Remove it from the started list
                  started.Remove(wrk);

                  // Assign tis socket the selected worker
                  wrk->SetSocket(s);
                  // Remove socket from global TROOT socket list. Only the TProof object,
                  // representing all worker sockets, will be added to this list. This will
                  // ensure the correct termination of all proof servers in case the
                  // root session terminates.
                  {  R__LOCKGUARD2(gROOTMutex);
                     gROOT->GetListOfSockets()->Remove(s);
                  }
                  if (wrk->IsValid()) {
                     // Set the input handler
                     wrk->SetInputHandler(new TProofInputHandler(this, wrk->GetSocket()));
                     // Set fParallel to 1 for workers since they do not
                     // report their fParallel with a LOG_DONE message
                     wrk->fParallel = 1;
                     // Finalize setup of the server
                     wrk->SetupServ(TSlave::kSlave, 0);
                  }

                  // Monitor good workers
                  fSlaves->Add(wrk);
                  if (wrk->IsValid()) {
                     if (opt == 1) fActiveSlaves->Add(wrk);
                     fAllMonitor->Add(wrk->GetSocket());
                     // Record also in the list for termination
                     if (startedWorkers) startedWorkers->Add(wrk);
                     // Notify startup operations
                     NotifyStartUp("Setting up worker servers", ++nWrksDone, nWrksTot);
                  } else {
                     // Flag as bad
                     fBadSlaves->Add(wrk);
                  }
               }
            } else {
               Warning("SetupWorkers", "received empty message from accepted socket!");
            }
         }
      }
   }

   // Cleanup the monitor and the server socket
   mon->DeActivateAll();
   delete mon;

   // Create Progress dialog, if needed
   if (!gROOT->IsBatch() && !fProgressDialog) {
      if ((fProgressDialog =
         gROOT->GetPluginManager()->FindHandler("TProofProgressDialog")))
         if (fProgressDialog->LoadPlugin() == -1)
            fProgressDialog = 0;
   }

   if (opt == 1) {
      // Collect replies
      Collect(kActive);
      // Update group view
      SendGroupView();
      // By default go into parallel mode
      SetParallel(-1, 0);
   }
   // Done
   return 0;
}

//______________________________________________________________________________
void TProofLite::NotifyStartUp(const char *action, Int_t done, Int_t tot)
{
   // Notify setting-up operation message

   Int_t frac = (Int_t) (done*100.)/tot;
   char msg[512] = {0};
   if (frac >= 100) {
      snprintf(msg, 512, "%s: OK (%d workers)                 \n",
                   action, tot);
   } else {
      snprintf(msg, 512, "%s: %d out of %d (%d %%)\r",
                   action, done, tot, frac);
   }
   fprintf(stderr,"%s", msg);
}

//______________________________________________________________________________
Int_t TProofLite::SetProofServEnv(const char *ord)
{
   // Create environment files for worker 'ord'

   // Check input
   if (!ord || strlen(ord) <= 0) {
      Error("SetProofServEnv", "ordinal string undefined");
      return -1;
   }

   // ROOT env file
   TString rcfile(Form("%s/worker-%s.rootrc", fWorkDir.Data(), ord));
   FILE *frc = fopen(rcfile.Data(), "w");
   if (!frc) {
      Error("SetProofServEnv", "cannot open rc file %s", rcfile.Data());
      return -1;
   }

   // The session working dir depends on the role
   fprintf(frc,"# The session working dir\n");
   fprintf(frc,"ProofServ.SessionDir: %s/worker-%s\n", fWorkDir.Data(), ord);

   // The session unique tag
   fprintf(frc,"# Session tag\n");
   fprintf(frc,"ProofServ.SessionTag: %s\n", GetName());

   // Log / Debug level
   fprintf(frc,"# Proof Log/Debug level\n");
   fprintf(frc,"Proof.DebugLevel: %d\n", gDebug);

   // Ordinal number
   fprintf(frc,"# Ordinal number\n");
   fprintf(frc,"ProofServ.Ordinal: %s\n", ord);

   // ROOT Version tag
   fprintf(frc,"# ROOT Version tag\n");
   fprintf(frc,"ProofServ.RootVersionTag: %s\n", gROOT->GetVersion());

   // Work dir
   TString sandbox = fSandbox;
   if (GetSandbox(sandbox, kFALSE, "ProofServ.Sandbox") != 0)
      Warning("SetProofServEnv", "problems getting sandbox string for worker");
   fprintf(frc,"# Users sandbox\n");
   fprintf(frc, "ProofServ.Sandbox: %s\n", sandbox.Data());

   // Cache dir
   fprintf(frc,"# Users cache\n");
   fprintf(frc, "ProofServ.CacheDir: %s\n", fCacheDir.Data());

   // Package dir
   fprintf(frc,"# Users packages\n");
   fprintf(frc, "ProofServ.PackageDir: %s\n", fPackageDir.Data());

   // Image
   fprintf(frc,"# Server image\n");
   fprintf(frc, "ProofServ.Image: %s\n", fImage.Data());

   // Set Open socket
   fprintf(frc,"# Open socket\n");
   fprintf(frc, "ProofServ.OpenSock: %s\n", fSockPath.Data());

   // Client Protocol
   fprintf(frc,"# Client Protocol\n");
   fprintf(frc, "ProofServ.ClientVersion: %d\n", kPROOF_Protocol);

   // ROOT env file created
   fclose(frc);

   // System env file
   TString envfile(Form("%s/worker-%s.env", fWorkDir.Data(), ord));
   FILE *fenv = fopen(envfile.Data(), "w");
   if (!fenv) {
      Error("SetProofServEnv", "cannot open env file %s", envfile.Data());
      return -1;
   }
   // ROOTSYS
#ifdef R__HAVE_CONFIG
   fprintf(fenv, "export ROOTSYS=%s\n", ROOTPREFIX);
#else
   fprintf(fenv, "export ROOTSYS=%s\n", gSystem->Getenv("ROOTSYS"));
#endif
   // Conf dir
#ifdef R__HAVE_CONFIG
   fprintf(fenv, "export ROOTCONFDIR=%s\n", ROOTETCDIR);
#else
   fprintf(fenv, "export ROOTCONFDIR=%s\n", gSystem->Getenv("ROOTSYS"));
#endif
   // TMPDIR
   fprintf(fenv, "export TMPDIR=%s\n", gSystem->TempDirectory());
   // Log file in the log dir
   TString logfile(Form("%s/worker-%s.log", fWorkDir.Data(), ord));
   fprintf(fenv, "export ROOTPROOFLOGFILE=%s\n", logfile.Data());
   // RC file
   fprintf(fenv, "export ROOTRCFILE=%s\n", rcfile.Data());
   // ROOT version tag (needed in building packages)
   fprintf(fenv, "export ROOTVERSIONTAG=%s\n", gROOT->GetVersion());
   // This flag can be used to identify the type of worker; for example, in BUILD.sh or SETUP.C ...
   fprintf(fenv, "export ROOTPROOFLITE=%d\n", fNWorkers);
   // Local files are on the local file system
   fprintf(fenv, "export LOCALDATASERVER=\"file://\"\n");
   // Set the user envs
   if (fgProofEnvList) {
      TString namelist;
      TIter nxenv(fgProofEnvList);
      TNamed *env = 0;
      while ((env = (TNamed *)nxenv())) {
         TString senv(env->GetTitle());
         ResolveKeywords(senv, ord, logfile.Data());
         fprintf(fenv, "export %s=%s\n", env->GetName(), senv.Data());
         if (namelist.Length() > 0)
            namelist += ',';
         namelist += env->GetName();
      }
      fprintf(fenv, "export PROOF_ALLVARS=%s\n", namelist.Data());
   }

   // System env file created
   fclose(fenv);

   // Done
   return 0;
}

//__________________________________________________________________________
void TProofLite::ResolveKeywords(TString &s, const char *ord,
   const char *logfile)
{
   // Resolve some keywords in 's'
   //    <logfilewrk>, <user>, <rootsys>, <cpupin>

   if (!logfile) return;

   // Log file
   if (s.Contains("<logfilewrk>") && logfile) {
      TString lfr(logfile);
      if (lfr.EndsWith(".log")) lfr.Remove(lfr.Last('.'));
      s.ReplaceAll("<logfilewrk>", lfr.Data());
   }

   // user
   if (gSystem->Getenv("USER") && s.Contains("<user>")) {
      s.ReplaceAll("<user>", gSystem->Getenv("USER"));
   }

   // rootsys
   if (gSystem->Getenv("ROOTSYS") && s.Contains("<rootsys>")) {
      s.ReplaceAll("<rootsys>", gSystem->Getenv("ROOTSYS"));
   }

   // cpupin: pin to this CPU num (from 0 to ncpus-1)
   if (s.Contains("<cpupin>")) {
      TString o = ord;
      Int_t n = o.Index('.');
      if (n != kNPOS) {

         o.Remove(0, n+1);
         n = o.Atoi();  // n is ord

         TString cpuPinList;
         {
            const TList *envVars = GetEnvVars();
            TNamed *var;
            if (envVars) {
               var = dynamic_cast<TNamed *>(envVars->FindObject("PROOF_SLAVE_CPUPIN_ORDER"));
               if (var) cpuPinList = var->GetTitle();
            }
         }

         UInt_t nCpus = 1;
         {
            SysInfo_t si;
            if (gSystem->GetSysInfo(&si) == 0 && (si.fCpus > 0))
               nCpus = si.fCpus;
            else nCpus = 1;  // fallback
         }

         if (cpuPinList.IsNull() || (cpuPinList == "*")) {
            // Use processors in order
            n = n % nCpus;
         }
         else {
            // Use processors in user's order
            // n is now the ordinal, converting to idx
            n = n % (cpuPinList.CountChar('+')+1);
            TString tok;
            Ssiz_t from = 0;
            for (Int_t i=0; cpuPinList.Tokenize(tok, from, "\\+"); i++) {
               if (i == n) {
                  n = (tok.Atoi() % nCpus);
                  break;
               }
            }
         }

         o.Form("%d", n);
      }
      else {
         o = "0";  // should not happen
      }
      s.ReplaceAll("<cpupin>", o);
   }
}

//______________________________________________________________________________
Int_t TProofLite::CreateSandbox()
{
   // Create the sandbox for this session

   // Make sure the sandbox area exist and is writable
   if (GetSandbox(fSandbox, kTRUE, "ProofLite.Sandbox") != 0) return -1;

   // Package Dir
   fPackageDir = gEnv->GetValue("Proof.PackageDir", "");
   if (fPackageDir.IsNull())
      fPackageDir.Form("%s/%s", fSandbox.Data(), kPROOF_PackDir);
   if (AssertPath(fPackageDir, kTRUE) != 0) return -1;

   // Cache Dir
   fCacheDir = gEnv->GetValue("Proof.CacheDir", "");
   if (fCacheDir.IsNull())
      fCacheDir.Form("%s/%s", fSandbox.Data(), kPROOF_CacheDir);
   if (AssertPath(fCacheDir, kTRUE) != 0) return -1;

   // Data Set Dir
   fDataSetDir = gEnv->GetValue("Proof.DataSetDir", "");
   if (fDataSetDir.IsNull())
      fDataSetDir.Form("%s/%s", fSandbox.Data(), kPROOF_DataSetDir);
   if (AssertPath(fDataSetDir, kTRUE) != 0) return -1;

   // Session unique tag (name of this TProof instance)
   TString stag;
   stag.Form("%s-%d-%d", gSystem->HostName(), (int)time(0), gSystem->GetPid());
   SetName(stag.Data());

   Int_t subpath = gEnv->GetValue("ProofLite.SubPath", 1);
   // Subpath for this session in the fSandbox (<sandbox>/path-to-working-dir)
   TString sessdir;
   if (subpath != 0) {
      sessdir = gSystem->WorkingDirectory();
      sessdir.ReplaceAll(gSystem->HomeDirectory(),"");
      sessdir.ReplaceAll("/","-");
      sessdir.Replace(0,1,"/",1);
      sessdir.Insert(0, fSandbox.Data());
   } else {
      // USe the sandbox
      sessdir = fSandbox;
   }

   // Session working and queries dir
   fWorkDir.Form("%s/session-%s", sessdir.Data(), stag.Data());
   if (AssertPath(fWorkDir, kTRUE) != 0) return -1;

   // Create symlink to the last session
   TString lastsess;
   lastsess.Form("%s/last-lite-session", sessdir.Data());
   gSystem->Unlink(lastsess);
   gSystem->Symlink(fWorkDir, lastsess);

   // Queries Dir: local to the working dir, unless required differently
   fQueryDir = gEnv->GetValue("Proof.QueryDir", "");
   if (fQueryDir.IsNull())
      fQueryDir.Form("%s/%s", sessdir.Data(), kPROOF_QueryDir);
   if (AssertPath(fQueryDir, kTRUE) != 0) return -1;

   // Cleanup old sessions dirs
   CleanupSandbox();

   // Done
   return 0;
}

//______________________________________________________________________________
void TProofLite::Print(Option_t *option) const
{
   // Print status of PROOF-Lite cluster.

   TString ord;
   if (gProofServ) ord.Form("%s ", gProofServ->GetOrdinal());
   if (IsParallel())
      Printf("*** PROOF-Lite cluster %s(parallel mode, %d workers):", ord.Data(), GetParallel());
   else
      Printf("*** PROOF-Lite cluster %s(sequential mode)", ord.Data());

   if (gProofServ) {
      TString url(gSystem->HostName());
      // Add port to URL, if defined
      Int_t port = gEnv->GetValue("ProofServ.XpdPort", 1093);
      if (port > -1) url.Form("%s:%d",gSystem->HostName(), port);
      Printf("URL:                        %s", url.Data());
   } else {
      Printf("Host name:                  %s", gSystem->HostName());
   }
   Printf("User:                       %s", GetUser());
   TString ver(gROOT->GetVersion());
   ver += TString::Format("|%s", gROOT->GetGitCommit());
   if (gSystem->Getenv("ROOTVERSIONTAG"))
      ver += TString::Format("|%s", gSystem->Getenv("ROOTVERSIONTAG"));
   Printf("ROOT version|rev|tag:       %s", ver.Data());
   Printf("Architecture-Compiler:      %s-%s", gSystem->GetBuildArch(),
                                               gSystem->GetBuildCompilerVersion());
   Printf("Protocol version:           %d", GetClientProtocol());
   Printf("Working directory:          %s", gSystem->WorkingDirectory());
   Printf("Communication path:         %s", fSockPath.Data());
   Printf("Log level:                  %d", GetLogLevel());
   Printf("Number of workers:          %d", GetNumberOfSlaves());
   Printf("Number of active workers:   %d", GetNumberOfActiveSlaves());
   Printf("Number of unique workers:   %d", GetNumberOfUniqueSlaves());
   Printf("Number of inactive workers: %d", GetNumberOfInactiveSlaves());
   Printf("Number of bad workers:      %d", GetNumberOfBadSlaves());
   Printf("Total MB's processed:       %.2f", float(GetBytesRead())/(1024*1024));
   Printf("Total real time used (s):   %.3f", GetRealTime());
   Printf("Total CPU time used (s):    %.3f", GetCpuTime());
   if (TString(option).Contains("a", TString::kIgnoreCase) && GetNumberOfSlaves()) {
      Printf("List of workers:");
      TIter nextslave(fSlaves);
      while (TSlave* sl = dynamic_cast<TSlave*>(nextslave())) {
         if (sl->IsValid())
            sl->Print(option);
      }
   }
}

//______________________________________________________________________________
TProofQueryResult *TProofLite::MakeQueryResult(Long64_t nent, const char *opt,
                                               Long64_t fst, TDSet *dset,
                                               const char *selec)
{
   // Create a TProofQueryResult instance for this query.

   // Increment sequential number
   Int_t seqnum = -1;
   if (fQMgr) {
      fQMgr->IncrementSeqNum();
      seqnum = fQMgr->SeqNum();
   }

   // Create the instance and add it to the list
   TProofQueryResult *pqr = new TProofQueryResult(seqnum, opt,
                                                  fPlayer->GetInputList(), nent,
                                                  fst, dset, selec,
                                                  (dset ? dset->GetEntryList() : 0));
   // Title is the session identifier
   pqr->SetTitle(GetName());

   return pqr;
}

//______________________________________________________________________________
void TProofLite::SetQueryRunning(TProofQueryResult *pq)
{
   // Set query in running state.

   // Record current position in the log file at start
   fflush(fLogFileW);
   Int_t startlog = lseek(fileno(fLogFileW), (off_t) 0, SEEK_END);

   // Add some header to logs
   Printf(" ");
   Info("SetQueryRunning", "starting query: %d", pq->GetSeqNum());

   // Build the list of loaded PAR packages
   TString parlist = "";
   TIter nxp(fEnabledPackagesOnClient);
   TObjString *os= 0;
   while ((os = (TObjString *)nxp())) {
      if (parlist.Length() <= 0)
         parlist = os->GetName();
      else
         parlist += Form(";%s",os->GetName());
   }

   // Set in running state
   pq->SetRunning(startlog, parlist, GetParallel());

   // Bytes and CPU at start (we will calculate the differential at end)
   AskStatistics();
   pq->SetProcessInfo(pq->GetEntries(), GetCpuTime(), GetBytesRead());
}

//______________________________________________________________________________
Long64_t TProofLite::DrawSelect(TDSet *dset, const char *varexp,
                                const char *selection, Option_t *option,
                                Long64_t nentries, Long64_t first)
{
   // Execute the specified drawing action on a data set (TDSet).
   // Event- or Entry-lists should be set in the data set object using
   // TDSet::SetEntryList.
   // Returns -1 in case of error or number of selected events otherwise.

   if (!IsValid()) return -1;

   // Make sure that asynchronous processing is not active
   if (!IsIdle()) {
      Info("DrawSelect","not idle, asynchronous Draw not supported");
      return -1;
   }
   TString opt(option);
   Int_t idx = opt.Index("ASYN", 0, TString::kIgnoreCase);
   if (idx != kNPOS)
      opt.Replace(idx,4,"");

   // Fill the internal variables
   fVarExp = varexp;
   fSelection = selection;
   
   return Process(dset, "draw:", opt, nentries, first);
}

//______________________________________________________________________________
Long64_t TProofLite::Process(TDSet *dset, const char *selector, Option_t *option,
                             Long64_t nentries, Long64_t first)
{
   // Process a data set (TDSet) using the specified selector (.C) file.
   // Entry- or event-lists should be set in the data set object using
   // TDSet::SetEntryList.
   // The return value is -1 in case of error and TSelector::GetStatus() in
   // in case of success.

   // For the time being cannot accept other queries if not idle, even if in async
   // mode; needs to set up an event handler to manage that
   
   TString opt(option), optfb, outfile;
   // Enable feedback, if required
   if (opt.Contains("fb=") || opt.Contains("feedback=")) SetFeedback(opt, optfb, 0);
   // Define output file, either from 'opt' or the default one
   if (HandleOutputOptions(opt, outfile, 0) != 0) return -1;

   // Resolve query mode
   fSync = (GetQueryMode(opt) == kSync);
   if (!fSync) {
      Info("Process","asynchronous mode not yet supported in PROOF-Lite");
      return -1;
   }

   if (!IsIdle()) {
      // Notify submission
      Info("Process", "not idle: cannot accept queries");
      return -1;
   }

   // Cleanup old temporary datasets
   if (IsIdle() && fRunningDSets && fRunningDSets->GetSize() > 0) {
      fRunningDSets->SetOwner(kTRUE);
      fRunningDSets->Delete();
   }

   if (!IsValid() || !fQMgr || !fPlayer) {
      Error("Process", "invalid sesion or query-result manager undefined!");
      return -1;
   }

   // Make sure that all enabled workers get some work, unless stated
   // differently
   if (!fPlayer->GetInputList()->FindObject("PROOF_MaxSlavesPerNode"))
      SetParameter("PROOF_MaxSlavesPerNode", (Long_t)fNWorkers);

   Bool_t hasNoData = (!dset || (dset && dset->TestBit(TDSet::kEmpty))) ? kTRUE : kFALSE;

   // If just a name was given to identify the dataset, retrieve it from the
   // local files
   // Make sure the dataset contains the information needed
   TString emsg;
   if ((!hasNoData) && dset->GetListOfElements()->GetSize() == 0) {
      if (TProof::AssertDataSet(dset, fPlayer->GetInputList(), fDataSetManager, emsg) != 0) {
         Error("Process", "from AssertDataSet: %s", emsg.Data());
         return -1;
      }
      if (dset->GetListOfElements()->GetSize() == 0) {
         Error("Process", "no files to process!");
         return -1;
      }
   } else if (hasNoData) {
      // Check if we are required to process with TPacketizerFile a registered dataset
      TNamed *ftp = dynamic_cast<TNamed *>(fPlayer->GetInputList()->FindObject("PROOF_FilesToProcess"));
      if (ftp) {
         TString dsn(ftp->GetTitle());
         if (!dsn.Contains(":") || dsn.BeginsWith("dataset:")) {
            dsn.ReplaceAll("dataset:", "");
            // Make sure we have something in input and a dataset manager
            if (!fDataSetManager) {
               emsg.Form("dataset manager not initialized!");
            } else {
               TFileCollection *fc = 0;
               // Get the dataset
               if (!(fc = fDataSetManager->GetDataSet(dsn))) {
                  emsg.Form("requested dataset '%s' does not exists", dsn.Data());
               } else {
                  TMap *fcmap = TProofServ::GetDataSetNodeMap(fc, emsg);
                  if (fcmap) {
                     fPlayer->GetInputList()->Remove(ftp);
                     delete ftp;
                     fcmap->SetOwner(kTRUE);
                     fcmap->SetName("PROOF_FilesToProcess");
                     fPlayer->GetInputList()->Add(fcmap);
                  }
               }
            }
            if (!emsg.IsNull()) {
               Error("HandleProcess", "%s", emsg.Data());
               return -1;
            }
         }
      }
   }

   TString selec(selector), varexp, selection, objname;
   // If a draw query, extract the relevant info
   if (selec.BeginsWith("draw:")) {
      varexp = fVarExp;
      selection = fSelection;
      // Decode now the expression
      if (fPlayer->GetDrawArgs(varexp, selection, opt, selec, objname) != 0) {
         Error("Process", "draw query: error parsing arguments '%s', '%s', '%s'",
                          varexp.Data(), selection.Data(), opt.Data());
         return -1;
      }
   }

   // Create instance of query results (the data set is added after Process)
   TProofQueryResult *pq = MakeQueryResult(nentries, opt, first, 0, selec);

   // Check if queries must be saved into files
   // Automatic saving is controlled by ProofLite.AutoSaveQueries
   Bool_t savequeries =
      (!strcmp(gEnv->GetValue("ProofLite.AutoSaveQueries", "off"), "on")) ? kTRUE : kFALSE;

   // Keep queries in memory and how many (-1 = all, 0 = none, ...)
   Int_t memqueries = gEnv->GetValue("ProofLite.MaxQueriesMemory", 10);

   // If not a draw action add the query to the main list
   if (!(pq->IsDraw())) {
      if (fQMgr->Queries()) {
         if (memqueries > 0 && fQMgr->Queries()->GetSize() >= memqueries) {
            // Remove oldest
            TObject *qfst = fQMgr->Queries()->First();
            fQMgr->Queries()->Remove(qfst);
         }
         if (memqueries >= 0) fQMgr->Queries()->Add(pq);
      }
      // Also save it to queries dir
      if (savequeries) fQMgr->SaveQuery(pq);
   }

   // Set the query number
   fSeqNum = pq->GetSeqNum();

   // Set in running state
   SetQueryRunning(pq);

   // Save to queries dir, if not standard draw
   if (!(pq->IsDraw())) {
      if (savequeries) fQMgr->SaveQuery(pq);
   } else {
      fQMgr->IncrementDrawQueries();
   }

   // Start or reset the progress dialog
   if (!gROOT->IsBatch()) {
      Int_t dsz = (dset && dset->GetListOfElements()) ? dset->GetListOfElements()->GetSize() : -1;
      if (fProgressDialog &&
          !TestBit(kUsingSessionGui) && TestBit(kUseProgressDialog)) {
         if (!fProgressDialogStarted) {
            fProgressDialog->ExecPlugin(5, this, selec.Data(), dsz,
                                           first, nentries);
            fProgressDialogStarted = kTRUE;
         } else {
            ResetProgressDialog(selec.Data(), dsz, first, nentries);
         }
      }
      ResetBit(kUsingSessionGui);
   }

   // Add query results to the player lists
   if (!(pq->IsDraw()))
      fPlayer->AddQueryResult(pq);

   // Set query currently processed
   fPlayer->SetCurrentQuery(pq);

   // Make sure the unique query tag is available as TNamed object in the
   // input list so that it can be used in TSelectors for monitoring
   TNamed *qtag = (TNamed *) fPlayer->GetInputList()->FindObject("PROOF_QueryTag");
   if (qtag) {
      qtag->SetTitle(Form("%s:%s",pq->GetTitle(),pq->GetName()));
   } else {
      TObject *o = fPlayer->GetInputList()->FindObject("PROOF_QueryTag");
      if (o) fPlayer->GetInputList()->Remove(o);
      fPlayer->AddInput(new TNamed("PROOF_QueryTag",
                                   Form("%s:%s",pq->GetTitle(),pq->GetName())));
   }

   // Set PROOF to running state
   SetRunStatus(TProof::kRunning);

   // deactivate the default application interrupt handler
   // ctrl-c's will be forwarded to PROOF to stop the processing
   TSignalHandler *sh = 0;
   if (fSync) {
      if (gApplication)
         sh = gSystem->RemoveSignalHandler(gApplication->GetSignalHandler());
   }

   // Make sure we get a fresh result
   fOutputList.Clear();

   // Start the additional workers now if using fork-based startup
   TList *startedWorkers = 0;
   if (fForkStartup) {
      startedWorkers = new TList;
      startedWorkers->SetOwner(kFALSE);
      SetupWorkers(1, startedWorkers);
   }

   Long64_t rv = 0;
   if (!(pq->IsDraw())) {
      if (selector && strlen(selector)) {
         rv = fPlayer->Process(dset, selec, opt, nentries, first);
      } else {
         rv = fPlayer->Process(dset, fSelector, opt, nentries, first);
      }
   } else {
      rv = fPlayer->DrawSelect(dset, varexp, selection, opt, nentries, first);
   }

   // Disable feedback, if required
   if (!optfb.IsNull()) SetFeedback(opt, optfb, 1);

   if (fSync) {

      // Terminate additional workers if using fork-based startup
      if (fForkStartup && startedWorkers) {
         RemoveWorkers(startedWorkers);
         SafeDelete(startedWorkers);
      }

      // reactivate the default application interrupt handler
      if (sh)
         gSystem->AddSignalHandler(sh);

      // Return number of events processed
      if (fPlayer->GetExitStatus() != TVirtualProofPlayer::kFinished) {
         Bool_t abort = (fPlayer->GetExitStatus() == TVirtualProofPlayer::kAborted)
                     ? kTRUE : kFALSE;
         if (abort) fPlayer->StopProcess(kTRUE);
         Emit("StopProcess(Bool_t)", abort);
      }

      // In PROOFLite this has to be done once only in TProofLite::Process
      pq->SetOutputList(fPlayer->GetOutputList(), kFALSE);
      // If the last object, notify the GUI that the result arrived
      QueryResultReady(Form("%s:%s", pq->GetTitle(), pq->GetName()));
      // Processing is over
      UpdateDialog();

      // Save the data set into the TQueryResult (should be done after Process to avoid
      // improper deletion during collection)
      if (rv == 0 && dset && pq->GetInputList()) {
         pq->GetInputList()->Add(dset);
         if (dset->GetEntryList())
            pq->GetInputList()->Add(dset->GetEntryList());
      }

      // Register any dataset produced during this processing, if required
      if (fDataSetManager && fPlayer->GetOutputList()) {
         TNamed *psr = (TNamed *) fPlayer->GetOutputList()->FindObject("PROOFSERV_RegisterDataSet");
         if (psr) {
            TString err;
            if (TProofServ::RegisterDataSets(fPlayer->GetInputList(),
                                             fPlayer->GetOutputList(), fDataSetManager, err) != 0)
               Warning("ProcessNext", "problems registering produced datasets: %s", err.Data());
            fPlayer->GetOutputList()->Remove(psr);
            delete psr;
         }
      }

      // Complete filling of the TQueryResult instance
      AskStatistics();
      if (!(pq->IsDraw())) {
         if (fQMgr->FinalizeQuery(pq, this, fPlayer)) {
            if (savequeries) fQMgr->SaveQuery(pq, -1);
         }
      }

      // Remove aborted queries from the list
      if (fPlayer && fPlayer->GetExitStatus() == TVirtualProofPlayer::kAborted) {
         if (fPlayer->GetListOfResults()) fPlayer->GetListOfResults()->Remove(pq);
         if (fQMgr) fQMgr->RemoveQuery(pq);
      } else {
         // If the last object, notify the GUI that the result arrived
         QueryResultReady(Form("%s:%s", pq->GetTitle(), pq->GetName()));
         // Keep in memory only light info about a query
         if (!(pq->IsDraw()) && memqueries >= 0) {
            if (fQMgr && fQMgr->Queries()) {
               TQueryResult *pqr = pq->CloneInfo();
               if (pqr) fQMgr->Queries()->Add(pqr);
               // Remove from the fQueries list
               fQMgr->Queries()->Remove(pq);
            }
         }
         // To get the prompt back
         TString msg;
         msg.Form("Lite-0: all output objects have been merged                                                         ");
         fprintf(stderr, "%s\n", msg.Data());
      }
      // Save the performance info, if required
      if (!fPerfTree.IsNull()) {
         if (SavePerfTree() != 0) Error("Process", "saving performance info ...");
         // Must be re-enabled each time
         SetPerfTree(0);
      }
   }
   // Finalise output file settings (opt is ignored in here)
   if (HandleOutputOptions(opt, outfile, 1) != 0) return -1;

   // Retrieve status from the output list
   if (rv >= 0) {
      TParameter<Long64_t> *sst =
        (TParameter<Long64_t> *) fOutputList.FindObject("PROOF_SelectorStatus");
      if (sst) rv = sst->GetVal();
   }


   // Done
   return rv;
}

//______________________________________________________________________________
Int_t TProofLite::CreateSymLinks(TList *files)
{
   // Create in each worker sandbox symlinks to the files in the list
   // Used to make the cache information available to workers.

   Int_t rc = 0;
   if (files) {
      TIter nxf(files);
      TObjString *os = 0;
      while ((os = (TObjString *) nxf())) {
         // Expand target
         TString tgt(os->GetName());
         gSystem->ExpandPathName(tgt);
         // Loop over active workers
         TIter nxw(fActiveSlaves);
         TSlave *wrk = 0;
         while ((wrk = (TSlave *) nxw())) {
            // Link name
            TString lnk = Form("%s/%s", wrk->GetWorkDir(), gSystem->BaseName(os->GetName()));
            gSystem->Unlink(lnk);
            if (gSystem->Symlink(tgt, lnk) != 0) {
               rc++;
               Warning("CreateSymLinks", "problems creating sym link: %s", lnk.Data());
            }
         }
      }
   } else {
      Warning("CreateSymLinks", "files list is undefined");
   }
   // Done
   return rc;
}

//______________________________________________________________________________
Int_t TProofLite::InitDataSetManager()
{
   // Initialize the dataset manager from directives or from defaults
   // Return 0 on success, -1 on failure

   fDataSetManager = 0;

   // Default user and group
   TString user("???"), group("default");
   UserGroup_t *pw = gSystem->GetUserInfo();
   if (pw) {
      user = pw->fUser;
      delete pw;
   }

   // Dataset manager instance via plug-in
   TPluginHandler *h = 0;
   TString dsm = gEnv->GetValue("Proof.DataSetManager", "");
   if (!dsm.IsNull()) {
      // Get plugin manager to load the appropriate TDataSetManager
      if (gROOT->GetPluginManager()) {
         // Find the appropriate handler
         h = gROOT->GetPluginManager()->FindHandler("TDataSetManager", dsm);
         if (h && h->LoadPlugin() != -1) {
            // make instance of the dataset manager
            fDataSetManager =
               reinterpret_cast<TDataSetManager*>(h->ExecPlugin(3, group.Data(),
                                                         user.Data(), dsm.Data()));
         }
      }
   }
   if (fDataSetManager && fDataSetManager->TestBit(TObject::kInvalidObject)) {
      Warning("InitDataSetManager", "dataset manager plug-in initialization failed");
      SafeDelete(fDataSetManager);
   }

   // If no valid dataset manager has been created we instantiate the default one
   if (!fDataSetManager) {
      TString opts("Av:");
      TString dsetdir = gEnv->GetValue("ProofServ.DataSetDir", "");
      if (dsetdir.IsNull()) {
         // Use the default in the sandbox
         dsetdir = fDataSetDir;
         opts += "Sb:";
      }
      // Find the appropriate handler
      if (!h) {
         h = gROOT->GetPluginManager()->FindHandler("TDataSetManager", "file");
         if (h && h->LoadPlugin() == -1) h = 0;
      }
      if (h) {
         // make instance of the dataset manager
         fDataSetManager = reinterpret_cast<TDataSetManager*>(h->ExecPlugin(3,
                           group.Data(), user.Data(),
                           Form("dir:%s opt:%s", dsetdir.Data(), opts.Data())));
      }
      if (fDataSetManager && fDataSetManager->TestBit(TObject::kInvalidObject)) {
         Warning("InitDataSetManager", "default dataset manager plug-in initialization failed");
         SafeDelete(fDataSetManager);
      }
   }

   if (gDebug > 0 && fDataSetManager) {
      Info("InitDataSetManager", "datasetmgr Cq: %d, Ar: %d, Av: %d, Ti: %d, Sb: %d",
            fDataSetManager->TestBit(TDataSetManager::kCheckQuota),
            fDataSetManager->TestBit(TDataSetManager::kAllowRegister),
            fDataSetManager->TestBit(TDataSetManager::kAllowVerify),
            fDataSetManager->TestBit(TDataSetManager::kTrustInfo),
            fDataSetManager->TestBit(TDataSetManager::kIsSandbox));
   }

   // Dataset manager for staging requests
   TString dsReqCfg = gEnv->GetValue("Proof.DataSetStagingRequests", "");
   if (!dsReqCfg.IsNull()) {
      TPMERegexp reReqDir("(^| )(dir:)?([^ ]+)( |$)");

      if (reReqDir.Match(dsReqCfg) == 5) {
         TString dsDirFmt;
         dsDirFmt.Form("dir:%s perms:open", reReqDir[3].Data());
         fDataSetStgRepo = new TDataSetManagerFile("_stage_", "_stage_", dsDirFmt);
         if (fDataSetStgRepo && fDataSetStgRepo->TestBit(TObject::kInvalidObject)) {
            Warning("InitDataSetManager", "failed init of dataset staging requests repository");
            SafeDelete(fDataSetStgRepo);
         }
      } else {
         Warning("InitDataSetManager", "specify, with [dir:]<path>, a valid path for staging requests");
      }
   } else if (gDebug > 0) {
      Warning("InitDataSetManager", "no repository for staging requests available");
   }

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

//______________________________________________________________________________
void TProofLite::ShowCache(Bool_t)
{
   // List contents of file cache. If all is true show all caches also on
   // slaves. If everything is ok all caches are to be the same.

   if (!IsValid()) return;

   Printf("*** Local file cache %s ***", fCacheDir.Data());
   gSystem->Exec(Form("%s %s", kLS, fCacheDir.Data()));
}

//______________________________________________________________________________
void TProofLite::ClearCache(const char *file)
{
    // Remove files from all file caches.

   if (!IsValid()) return;

   fCacheLock->Lock();
   if (!file || strlen(file) <= 0) {
      gSystem->Exec(Form("%s %s/*", kRM, fCacheDir.Data()));
   } else {
      gSystem->Exec(Form("%s %s/%s", kRM, fCacheDir.Data(), file));
   }
   fCacheLock->Unlock();
}

//______________________________________________________________________________
Int_t TProofLite::Load(const char *macro, Bool_t notOnClient, Bool_t uniqueOnly,
                       TList *wrks)
{
   // Copy the specified macro in the cache directory. The macro file is
   // uploaded if new or updated. If existing, the corresponding header
   // basename(macro).h or .hh, is also uploaded. For the other arguments
   // see TProof::Load().
   // Returns 0 in case of success and -1 in case of error.

   if (!IsValid()) return -1;

   if (!macro || !macro[0]) {
      Error("Load", "need to specify a macro name");
      return -1;
   }

   TString macs(macro), mac;
   Int_t from = 0;
   while (macs.Tokenize(mac, from, ",")) {
      if (CopyMacroToCache(mac) < 0) return -1;
   }

   return TProof::Load(macro, notOnClient, uniqueOnly, wrks);
}

//______________________________________________________________________________
Int_t TProofLite::CopyMacroToCache(const char *macro, Int_t headerRequired,
                                   TSelector **selector, Int_t opt)
{
   // Copy a macro, and its possible associated .h[h] file,
   // to the cache directory, from where the workers can get the file.
   // If headerRequired is 1, return -1 in case the header is not found.
   // If headerRequired is 0, try to copy header too.
   // If headerRequired is -1, don't look for header, only copy macro.
   // If the selector pionter is not 0, consider the macro to be a selector
   // and try to load the selector and set it to the pointer.
   // The mask 'opt' is an or of ESendFileOpt:
   //       kCpBin   (0x8)     Retrieve from the cache the binaries associated
   //                          with the file
   //       kCp      (0x10)    Retrieve the files from the cache
   // Return -1 in case of error, 0 otherwise.

   // Relevant pointers
   TString cacheDir = fCacheDir;
   gSystem->ExpandPathName(cacheDir);
   TProofLockPath *cacheLock = fCacheLock;

   // Split out the aclic mode, if any
   TString name = macro;
   TString acmode, args, io;
   name = gSystem->SplitAclicMode(name, acmode, args, io);

   PDB(kGlobal,1)
      Info("CopyMacroToCache", "enter: names: %s, %s", macro, name.Data());

   // Make sure that the file exists
   if (gSystem->AccessPathName(name, kReadPermission)) {
      Error("CopyMacroToCache", "file %s not found or not readable", name.Data());
      return -1;
   }

   // Update the macro path
   TString mp(TROOT::GetMacroPath());
   TString np(gSystem->DirName(name));
   if (!np.IsNull()) {
      np += ":";
      if (!mp.BeginsWith(np) && !mp.Contains(":"+np)) {
         Int_t ip = (mp.BeginsWith(".:")) ? 2 : 0;
         mp.Insert(ip, np);
         TROOT::SetMacroPath(mp);
         if (gDebug > 0)
            Info("CopyMacroToCache", "macro path set to '%s'", TROOT::GetMacroPath());
      }
   }

   // Check the header file
   Int_t dot = name.Last('.');
   const char *hext[] = { ".h", ".hh", "" };
   TString hname, checkedext;
   Int_t i = 0;
   while (strlen(hext[i]) > 0) {
      hname = name(0, dot);
      hname += hext[i];
      if (!gSystem->AccessPathName(hname, kReadPermission))
         break;
      if (!checkedext.IsNull()) checkedext += ",";
      checkedext += hext[i];
      hname = "";
      i++;
   }
   if (hname.IsNull() && headerRequired == 1) {
      Error("CopyMacroToCache", "header file for %s not found or not readable "
            "(checked extensions: %s)", name.Data(), checkedext.Data());
      return -1;
   }
   if (headerRequired < 0)
      hname = "";

   cacheLock->Lock();

   // Check these files with those in the cache (if any)
   Bool_t useCacheBinaries = kFALSE;
   TString cachedname = Form("%s/%s", cacheDir.Data(), gSystem->BaseName(name));
   TString cachedhname;
   if (!hname.IsNull())
      cachedhname = Form("%s/%s", cacheDir.Data(), gSystem->BaseName(hname));
   if (!gSystem->AccessPathName(cachedname, kReadPermission)) {
      TMD5 *md5 = TMD5::FileChecksum(name);
      TMD5 *md5cache = TMD5::FileChecksum(cachedname);
      if (md5 && md5cache && (*md5 == *md5cache))
         useCacheBinaries = kTRUE;
      if (!hname.IsNull()) {
         if (!gSystem->AccessPathName(cachedhname, kReadPermission)) {
            TMD5 *md5h = TMD5::FileChecksum(hname);
            TMD5 *md5hcache = TMD5::FileChecksum(cachedhname);
            if (md5h && md5hcache && (*md5h != *md5hcache))
               useCacheBinaries = kFALSE;
            SafeDelete(md5h);
            SafeDelete(md5hcache);
         }
      }
      SafeDelete(md5);
      SafeDelete(md5cache);
   }

   // Create version file name template
   TString vername(Form(".%s", name.Data()));
   dot = vername.Last('.');
   if (dot != kNPOS)
      vername.Remove(dot);
   vername += ".binversion";
   Bool_t savever = kFALSE;

   // Check binary version
   if (useCacheBinaries) {
      TString v, r;
      FILE *f = fopen(Form("%s/%s", cacheDir.Data(), vername.Data()), "r");
      if (f) {
         v.Gets(f);
         r.Gets(f);
         fclose(f);
      }
      if (!f || v != gROOT->GetVersion() || r != gROOT->GetGitCommit())
         useCacheBinaries = kFALSE;
   }

   // Create binary name template
   TString binname = gSystem->BaseName(name);
   dot = binname.Last('.');
   if (dot != kNPOS)
      binname.Replace(dot,1,"_");
   binname += ".";

   FileStat_t stlocal, stcache;
   void *dirp = 0;
   if (useCacheBinaries) {
      // Loop over binaries in the cache and copy them locally if newer then the local
      // versions or there is no local version
      dirp = gSystem->OpenDirectory(cacheDir);
      if (dirp) {
         const char *e = 0;
         while ((e = gSystem->GetDirEntry(dirp))) {
            if (!strncmp(e, binname.Data(), binname.Length())) {
               TString fncache = Form("%s/%s", cacheDir.Data(), e);
               Bool_t docp = kTRUE;
               if (!gSystem->GetPathInfo(fncache, stcache)) {
                  Int_t rc = gSystem->GetPathInfo(e, stlocal);
                  if (rc == 0 && (stlocal.fMtime >= stcache.fMtime))
                     docp = kFALSE;
                  // Copy the file, if needed
                  if (docp) {
                     gSystem->Exec(Form("%s %s", kRM, e));
                     PDB(kGlobal,2)
                        Info("CopyMacroToCache",
                             "retrieving %s from cache", fncache.Data());
                     gSystem->Exec(Form("%s %s %s", kCP, fncache.Data(), e));
                  }
               }
            }
         }
         gSystem->FreeDirectory(dirp);
      }
   }
   cacheLock->Unlock();

   if (selector) {
      // Now init the selector in optimized way
      if (!(*selector = TSelector::GetSelector(macro))) {
         Error("CopyMacroToCache", "could not create a selector from %s", macro);
         return -1;
      }
   }

   cacheLock->Lock();

   TList *cachedFiles = new TList;
   // Save information in the cache now for later usage
   dirp = gSystem->OpenDirectory(".");
   if (dirp) {
      const char *e = 0;
      while ((e = gSystem->GetDirEntry(dirp))) {
         if (!strncmp(e, binname.Data(), binname.Length())) {
            Bool_t docp = kTRUE;
            if (!gSystem->GetPathInfo(e, stlocal)) {
               TString fncache = Form("%s/%s", cacheDir.Data(), e);
               Int_t rc = gSystem->GetPathInfo(fncache, stcache);
               if (rc == 0 && (stlocal.fMtime <= stcache.fMtime))
                  docp = kFALSE;
               // Copy the file, if needed
               if (docp) {
                  gSystem->Exec(Form("%s %s", kRM, fncache.Data()));
                  PDB(kGlobal,2)
                     Info("CopyMacroToCache","caching %s ...", e);
                  gSystem->Exec(Form("%s %s %s", kCP, e, fncache.Data()));
                  savever = kTRUE;
               }
               if (opt & kCpBin)
                  cachedFiles->Add(new TObjString(fncache.Data()));
            }
         }
      }
      gSystem->FreeDirectory(dirp);
   }

   // Save binary version if requested
   if (savever) {
      FILE *f = fopen(Form("%s/%s", cacheDir.Data(), vername.Data()), "w");
      if (f) {
         fputs(gROOT->GetVersion(), f);
         fputs(Form("\n%s", gROOT->GetGitCommit()), f);
         fclose(f);
      }
   }

   // Save also the selector info, if needed
   if (!useCacheBinaries) {
      gSystem->Exec(Form("%s %s", kRM, cachedname.Data()));
      PDB(kGlobal,2)
         Info("CopyMacroToCache","caching %s ...", name.Data());
      gSystem->Exec(Form("%s %s %s", kCP, name.Data(), cachedname.Data()));
      if (!hname.IsNull()) {
         gSystem->Exec(Form("%s %s", kRM, cachedhname.Data()));
         PDB(kGlobal,2)
            Info("CopyMacroToCache","caching %s ...", hname.Data());
         gSystem->Exec(Form("%s %s %s", kCP, hname.Data(), cachedhname.Data()));
      }
   }
   if (opt & kCp) {
      cachedFiles->Add(new TObjString(cachedname.Data()));
      if (!hname.IsNull())
         cachedFiles->Add(new TObjString(cachedhname.Data()));
   }

   cacheLock->Unlock();

   // Create symlinks
   if (opt & (kCp | kCpBin))
      CreateSymLinks(cachedFiles);

   cachedFiles->SetOwner();
   delete cachedFiles;

   return 0;
}

//______________________________________________________________________________
Int_t TProofLite::CleanupSandbox()
{
   // Remove old sessions dirs keep at most 'Proof.MaxOldSessions' (default 10)

   Int_t maxold = gEnv->GetValue("Proof.MaxOldSessions", 1);

   if (maxold < 0) return 0;

   TSortedList *olddirs = new TSortedList(kFALSE);

   TString sandbox = gSystem->DirName(fWorkDir.Data());

   void *dirp = gSystem->OpenDirectory(sandbox);
   if (dirp) {
      const char *e = 0;
      while ((e = gSystem->GetDirEntry(dirp))) {
         if (!strncmp(e, "session-", 8) && !strstr(e, GetName())) {
            TString d(e);
            Int_t i = d.Last('-');
            if (i != kNPOS) d.Remove(i);
            i = d.Last('-');
            if (i != kNPOS) d.Remove(0,i+1);
            TString path = Form("%s/%s", sandbox.Data(), e);
            olddirs->Add(new TNamed(d, path));
         }
      }
      gSystem->FreeDirectory(dirp);
   }

   // Clean it up, if required
   Bool_t notify = kTRUE;
   while (olddirs->GetSize() > maxold) {
      if (notify && gDebug > 0)
         Printf("Cleaning sandbox at: %s", sandbox.Data());
      notify = kFALSE;
      TNamed *n = (TNamed *) olddirs->Last();
      if (n) {
         gSystem->Exec(Form("%s %s", kRM, n->GetTitle()));
         olddirs->Remove(n);
         delete n;
      }
   }

   // Cleanup
   olddirs->SetOwner();
   delete olddirs;

   // Done
   return 0;
}

//______________________________________________________________________________
TList *TProofLite::GetListOfQueries(Option_t *opt)
{
   // Get the list of queries.

   Bool_t all = ((strchr(opt,'A') || strchr(opt,'a'))) ? kTRUE : kFALSE;

   TList *ql = new TList;
   Int_t ntot = 0, npre = 0, ndraw= 0;
   if (fQMgr) {
      if (all) {
         // Rescan
         TString qdir = fQueryDir;
         Int_t idx = qdir.Index("session-");
         if (idx != kNPOS)
            qdir.Remove(idx);
         fQMgr->ScanPreviousQueries(qdir);
         // Gather also information about previous queries, if any
         if (fQMgr->PreviousQueries()) {
            TIter nxq(fQMgr->PreviousQueries());
            TProofQueryResult *pqr = 0;
            while ((pqr = (TProofQueryResult *)nxq())) {
               ntot++;
               pqr->fSeqNum = ntot;
               ql->Add(pqr);
            }
         }
      }

      npre = ntot;
      if (fQMgr->Queries()) {
         // Add info about queries in this session
         TIter nxq(fQMgr->Queries());
         TProofQueryResult *pqr = 0;
         TQueryResult *pqm = 0;
         while ((pqr = (TProofQueryResult *)nxq())) {
            ntot++;
            if ((pqm = pqr->CloneInfo())) {
               pqm->fSeqNum = ntot;
               ql->Add(pqm);
            } else {
               Warning("GetListOfQueries", "unable to clone TProofQueryResult '%s:%s'",
                       pqr->GetName(), pqr->GetTitle());
            }
         }
      }
      // Number of draw queries
      ndraw = fQMgr->DrawQueries();
   }

   fOtherQueries = npre;
   fDrawQueries = ndraw;
   if (fQueries) {
      fQueries->Delete();
      delete fQueries;
      fQueries = 0;
   }
   fQueries = ql;

   // This should have been filled by now
   return fQueries;
}

//______________________________________________________________________________
Bool_t TProofLite::RegisterDataSet(const char *uri,
                                   TFileCollection *dataSet, const char* optStr)
{
   // Register the 'dataSet' on the cluster under the current
   // user, group and the given 'dataSetName'.
   // Fails if a dataset named 'dataSetName' already exists, unless 'optStr'
   // contains 'O', in which case the old dataset is overwritten.
   // If 'optStr' contains 'V' the dataset files are verified (default no
   // verification).
   // Returns kTRUE on success.

   if (!fDataSetManager) {
      Info("RegisterDataSet", "dataset manager not available");
      return kFALSE;
   }

   if (!uri || strlen(uri) <= 0) {
      Info("RegisterDataSet", "specifying a dataset name is mandatory");
      return kFALSE;
   }

   Bool_t parallelverify = kFALSE;
   TString sopt(optStr);
   if (sopt.Contains("V") && !sopt.Contains("S")) {
      // We do verification in parallel later on; just register for now
      parallelverify = kTRUE;
      sopt.ReplaceAll("V", "");
   }
   // This would screw up things remotely, make sure is not there
   sopt.ReplaceAll("S", "");

   Bool_t result = kTRUE;
   if (fDataSetManager->TestBit(TDataSetManager::kAllowRegister)) {
      // Check the list
      if (!dataSet || dataSet->GetList()->GetSize() == 0) {
         Error("RegisterDataSet", "can not save an empty list.");
         result = kFALSE;
      }
      // Register the dataset (quota checks are done inside here)
      result = (fDataSetManager->RegisterDataSet(uri, dataSet, sopt) == 0)
             ? kTRUE : kFALSE;
   } else {
      Info("RegisterDataSet", "dataset registration not allowed");
      result = kFALSE;
   }

   if (!result)
      Error("RegisterDataSet", "dataset was not saved");

   // If old server or not verifying in parallel we are done
   if (!parallelverify) return result;
   
   // If we are here it means that we will verify in parallel
   sopt += "V";
   if (VerifyDataSet(uri, sopt) < 0){
      Error("RegisterDataSet", "problems verifying dataset '%s'", uri);
      return kFALSE;
   }

   // Done
   return kTRUE;
}

//______________________________________________________________________________
Int_t TProofLite::SetDataSetTreeName(const char *dataset, const char *treename)
{
   // Set/Change the name of the default tree. The tree name may contain
   // subdir specification in the form "subdir/name".
   // Returns 0 on success, -1 otherwise.

   if (!fDataSetManager) {
      Info("ExistsDataSet", "dataset manager not available");
      return kFALSE;
   }

   if (!dataset || strlen(dataset) <= 0) {
      Info("SetDataSetTreeName", "specifying a dataset name is mandatory");
      return -1;
   }

   if (!treename || strlen(treename) <= 0) {
      Info("SetDataSetTreeName", "specifying a tree name is mandatory");
      return -1;
   }

   TUri uri(dataset);
   TString fragment(treename);
   if (!fragment.BeginsWith("/")) fragment.Insert(0, "/");
   uri.SetFragment(fragment);

   return fDataSetManager->ScanDataSet(uri.GetUri().Data(),
                                      (UInt_t)TDataSetManager::kSetDefaultTree);
}

//______________________________________________________________________________
Bool_t TProofLite::ExistsDataSet(const char *uri)
{
   // Returns kTRUE if 'dataset' described by 'uri' exists, kFALSE otherwise

   if (!fDataSetManager) {
      Info("ExistsDataSet", "dataset manager not available");
      return kFALSE;
   }

   if (!uri || strlen(uri) <= 0) {
      Error("ExistsDataSet", "dataset name missing");
      return kFALSE;
   }

   // Check if the dataset exists
   return fDataSetManager->ExistsDataSet(uri);
}

//______________________________________________________________________________
TMap *TProofLite::GetDataSets(const char *uri, const char *srvex)
{
   // lists all datasets that match given uri

   if (!fDataSetManager) {
      Info("GetDataSets", "dataset manager not available");
      return (TMap *)0;
   }

   // Get the datasets and return the map
   if (srvex && strlen(srvex) > 0) {
      return fDataSetManager->GetSubDataSets(uri, srvex);
   } else {
      UInt_t opt = (UInt_t)TDataSetManager::kExport;
      return fDataSetManager->GetDataSets(uri, opt);
   }
}

//______________________________________________________________________________
void TProofLite::ShowDataSets(const char *uri, const char *opt)
{
   // Shows datasets in locations that match the uri
   // By default shows the user's datasets and global ones

   if (!fDataSetManager) {
      Info("GetDataSet", "dataset manager not available");
      return;
   }

   fDataSetManager->ShowDataSets(uri, opt);
}

//______________________________________________________________________________
TFileCollection *TProofLite::GetDataSet(const char *uri, const char *)
{
   // Get a list of TFileInfo objects describing the files of the specified
   // dataset.

   if (!fDataSetManager) {
      Info("GetDataSet", "dataset manager not available");
      return (TFileCollection *)0;
   }

   if (!uri || strlen(uri) <= 0) {
      Info("GetDataSet", "specifying a dataset name is mandatory");
      return 0;
   }

   // Return the list
   return fDataSetManager->GetDataSet(uri);
}

//______________________________________________________________________________
Int_t TProofLite::RemoveDataSet(const char *uri, const char *)
{
   // Remove the specified dataset from the PROOF cluster.
   // Files are not deleted.

   if (!fDataSetManager) {
      Info("RemoveDataSet", "dataset manager not available");
      return -1;
   }

   if (fDataSetManager->TestBit(TDataSetManager::kAllowRegister)) {
      if (!fDataSetManager->RemoveDataSet(uri)) {
         // Failure
         return -1;
      }
   } else {
      Info("RemoveDataSet", "dataset creation / removal not allowed");
      return -1;
   }

   // Done
   return 0;
}

//______________________________________________________________________________
Bool_t TProofLite::RequestStagingDataSet(const char *dataset)
{
   // Allows users to request staging of a particular dataset. Requests are
   // saved in a special dataset repository and must be honored by the endpoint.
   // This is the special PROOF-Lite re-implementation of the TProof function
   // and includes code originally implemented in TProofServ.

   if (!dataset) {
      Error("RequestStagingDataSet", "invalid dataset specified");
      return kFALSE;
   }

   if (!fDataSetStgRepo) {
      Error("RequestStagingDataSet", "no dataset staging request repository available");
      return kFALSE;
   }

   TString dsUser, dsGroup, dsName, dsTree;

   // Transform input URI in a valid dataset name
   TString validUri = dataset;
   while (fReInvalid->Substitute(validUri, "_")) {}

   // Check if dataset exists beforehand: if it does, staging has already been requested
   if (fDataSetStgRepo->ExistsDataSet(validUri.Data())) {
      Warning("RequestStagingDataSet", "staging of %s already requested", dataset);
      return kFALSE;
   }

   // Try to get dataset from current manager
   TFileCollection *fc = fDataSetManager->GetDataSet(dataset);
   if (!fc || (fc->GetNFiles() == 0)) {
      Error("RequestStagingDataSet", "empty dataset or no dataset returned");
      if (fc) delete fc;
      return kFALSE;
   }

   // Reset all staged bits and remove unnecessary URLs (all but last)
   TIter it(fc->GetList());
   TFileInfo *fi;
   while ((fi = dynamic_cast<TFileInfo *>(it.Next()))) {
      fi->ResetBit(TFileInfo::kStaged);
      Int_t nToErase = fi->GetNUrls() - 1;
      for (Int_t i=0; i<nToErase; i++)
         fi->RemoveUrlAt(0);
   }

   fc->Update();  // absolutely necessary

   // Save request
   fDataSetStgRepo->ParseUri(validUri, &dsGroup, &dsUser, &dsName);
   if (fDataSetStgRepo->WriteDataSet(dsGroup, dsUser, dsName, fc) == 0) {
      // Error, can't save dataset
      Error("RequestStagingDataSet", "can't register staging request for %s", dataset);
      delete fc;
      return kFALSE;
   }

   Info("RequestStagingDataSet", "Staging request registered for %s", dataset);
   delete fc;

   return kTRUE;
}

//______________________________________________________________________________
Bool_t TProofLite::CancelStagingDataSet(const char *dataset)
{
   // Cancels a dataset staging request. Returns kTRUE on success, kFALSE on
   // failure. Dataset not found equals to a failure. PROOF-Lite
   // re-implementation of the equivalent function in TProofServ.

   if (!dataset) {
      Error("CancelStagingDataSet", "invalid dataset specified");
      return kFALSE;
   }

   if (!fDataSetStgRepo) {
      Error("CancelStagingDataSet", "no dataset staging request repository available");
      return kFALSE;
   }

   // Transform URI in a valid dataset name
   TString validUri = dataset;
   while (fReInvalid->Substitute(validUri, "_")) {}

   if (!fDataSetStgRepo->RemoveDataSet(validUri.Data()))
      return kFALSE;

   return kTRUE;
}

//______________________________________________________________________________
TFileCollection *TProofLite::GetStagingStatusDataSet(const char *dataset)
{
   // Obtains a TFileCollection showing the staging status of the specified
   // dataset. A valid dataset manager and dataset staging requests repository
   // must be present on the endpoint. PROOF-Lite version of the equivalent
   // function from TProofServ.

   if (!dataset) {
      Error("GetStagingStatusDataSet", "invalid dataset specified");
      return 0;
   }

   if (!fDataSetStgRepo) {
      Error("GetStagingStatusDataSet", "no dataset staging request repository available");
      return 0;
   }

   // Transform URI in a valid dataset name
   TString validUri = dataset;
   while (fReInvalid->Substitute(validUri, "_")) {}

   // Get the list
   TFileCollection *fc = fDataSetStgRepo->GetDataSet(validUri.Data());
   if (!fc) {
      // No such dataset (not an error)
      Info("GetStagingStatusDataSet", "no pending staging request for %s", dataset);
      return 0;
   }

   // Dataset found: return it (must be cleaned by caller)
   return fc;
}

//______________________________________________________________________________
Int_t TProofLite::VerifyDataSet(const char *uri, const char *optStr)
{
   // Verify if all files in the specified dataset are available.
   // Print a list and return the number of missing files.

   if (!fDataSetManager) {
      Info("VerifyDataSet", "dataset manager not available");
      return -1;
   }

   Int_t rc = -1;
   TString sopt(optStr);
   if (sopt.Contains("S")) {

      if (fDataSetManager->TestBit(TDataSetManager::kAllowVerify)) {
         rc = fDataSetManager->ScanDataSet(uri);
      } else {
         Info("VerifyDataSet", "dataset verification not allowed");
         rc = -1;
      }
      return rc;
   }
   
   // Done
   return VerifyDataSetParallel(uri, optStr);
}

//______________________________________________________________________________
void TProofLite::ClearDataSetCache(const char *dataset)
{
   // Clear the content of the dataset cache, if any (matching 'dataset', if defined).

   if (fDataSetManager) fDataSetManager->ClearCache(dataset);
   // Done
   return;
}

//______________________________________________________________________________
void TProofLite::ShowDataSetCache(const char *dataset)
{
   // Display the content of the dataset cache, if any (matching 'dataset', if defined).

   // For PROOF-Lite act locally
   if (fDataSetManager) fDataSetManager->ShowCache(dataset);
   // Done
   return;
}

//______________________________________________________________________________
void TProofLite::SendInputDataFile()
{
   // Make sure that the input data objects are available to the workers in a
   // dedicated file in the cache; the objects are taken from the dedicated list
   // and / or the specified file.
   // If the fInputData is empty the specified file is sent over.
   // If there is no specified file, a file named "inputdata.root" is created locally
   // with the content of fInputData and sent over to the master.
   // If both fInputData and the specified file are not empty, a copy of the file
   // is made locally and augmented with the content of fInputData.

   // Prepare the file
   TString dataFile;
   PrepareInputDataFile(dataFile);

   // Make sure it is in the cache, if not empty
   if (dataFile.Length() > 0) {

      if (!dataFile.BeginsWith(fCacheDir)) {
         // Destination
         TString dst;
         dst.Form("%s/%s", fCacheDir.Data(), gSystem->BaseName(dataFile));
         // Remove it first if it exists
         if (!gSystem->AccessPathName(dst))
            gSystem->Unlink(dst);
         // Copy the file
         if (gSystem->CopyFile(dataFile, dst) != 0)
            Warning("SendInputDataFile", "problems copying '%s' to '%s'",
                                         dataFile.Data(), dst.Data());
      }

      // Set the name in the input list so that the workers can find it
      AddInput(new TNamed("PROOF_InputDataFile", Form("%s", gSystem->BaseName(dataFile))));
   }
}

//______________________________________________________________________________
Int_t TProofLite::Remove(const char *ref, Bool_t all)
{
   // Handle remove request.

   PDB(kGlobal, 1)
      Info("Remove", "Enter: %s, %d", ref, all);

   if (all) {
      // Remove also local copies, if any
      if (fPlayer)
         fPlayer->RemoveQueryResult(ref);
   }

   TString queryref(ref);

   if (queryref == "cleanupdir") {

      // Cleanup previous sessions results
      Int_t nd = (fQMgr) ? fQMgr->CleanupQueriesDir() : -1;

      // Notify
      Info("Remove", "%d directories removed", nd);
      // We are done
      return 0;
   }


   if (fQMgr) {
      TProofLockPath *lck = 0;
      if (fQMgr->LockSession(queryref, &lck) == 0) {

         // Remove query
         fQMgr->RemoveQuery(queryref, 0);

         // Unlock and remove the lock file
         if (lck) {
            gSystem->Unlink(lck->GetName());
            SafeDelete(lck);
         }

         // We are done
         return 0;
      }
   } else {
      Warning("Remove", "query result manager undefined!");
   }

   // Notify failure
   Info("Remove",
        "query %s could not be removed (unable to lock session)", queryref.Data());

   // Done
   return -1;
}

//______________________________________________________________________________
TTree *TProofLite::GetTreeHeader(TDSet *dset)
{
   // Creates a tree header (a tree with nonexisting files) object for
   // the DataSet.

   TTree *t = 0;
   if (!dset) {
      Error("GetTreeHeader", "undefined TDSet");
      return t;
   }

   dset->Reset();
   TDSetElement *e = dset->Next();
   Long64_t entries = 0;
   TFile *f = 0;
   if (!e) {
      PDB(kGlobal, 1) Info("GetTreeHeader", "empty TDSet");
   } else {
      f = TFile::Open(e->GetFileName());
      t = 0;
      if (f) {
         t = (TTree*) f->Get(e->GetObjName());
         if (t) {
            t->SetMaxVirtualSize(0);
            t->DropBaskets();
            entries = t->GetEntries();

            // compute #entries in all the files
            while ((e = dset->Next()) != 0) {
               TFile *f1 = TFile::Open(e->GetFileName());
               if (f1) {
                  TTree *t1 = (TTree*) f1->Get(e->GetObjName());
                  if (t1) {
                     entries += t1->GetEntries();
                     delete t1;
                  }
                  delete f1;
               }
            }
            t->SetMaxEntryLoop(entries);   // this field will hold the total number of entries ;)
         }
      }
   }
   // Done
   return t;
}

//______________________________________________________________________________
void TProofLite::FindUniqueSlaves()
{
   // Add to the fUniqueSlave list the active slaves that have a unique
   // (user) file system image. This information is used to transfer files
   // only once to nodes that share a file system (an image). Submasters
   // which are not in fUniqueSlaves are put in the fNonUniqueMasters
   // list. That list is used to trigger the transferring of files to
   // the submaster's unique slaves without the need to transfer the file
   // to the submaster.

   fUniqueSlaves->Clear();
   fUniqueMonitor->RemoveAll();
   fAllUniqueSlaves->Clear();
   fAllUniqueMonitor->RemoveAll();
   fNonUniqueMasters->Clear();

   if (fActiveSlaves->GetSize() <= 0) return;

   TSlave *wrk = dynamic_cast<TSlave*>(fActiveSlaves->First());
   if (!wrk) {
      Error("FindUniqueSlaves", "first object in fActiveSlaves not a TSlave: embarrasing!");
      return;
   }
   fUniqueSlaves->Add(wrk);
   fAllUniqueSlaves->Add(wrk);
   fUniqueMonitor->Add(wrk->GetSocket());
   fAllUniqueMonitor->Add(wrk->GetSocket());

   // will be actiavted in Collect()
   fUniqueMonitor->DeActivateAll();
   fAllUniqueMonitor->DeActivateAll();
}

//______________________________________________________________________________
void TProofLite::ShowData()
{
   // List contents of the data directory in the sandbox.
   // This is the place where files produced by the client queries are kept

   if (!IsValid()) return;

   // Get worker infos
   TList *wrki = GetListOfSlaveInfos();
   TSlaveInfo *wi = 0;
   TIter nxwi(wrki);
   while ((wi = (TSlaveInfo *) nxwi())) {
      ShowDataDir(wi->GetDataDir());
   }
}

//______________________________________________________________________________
void TProofLite::ShowDataDir(const char *dirname)
{
   // List contents of the data directory 'dirname'

   if (!dirname) return;
   
   FileStat_t dirst;
   if (gSystem->GetPathInfo(dirname, dirst) != 0) return;
   if (!R_ISDIR(dirst.fMode)) return;

   void *dirp = gSystem->OpenDirectory(dirname);
   TString fn;
   const char *ent = 0;
   while ((ent = gSystem->GetDirEntry(dirp))) {
      fn.Form("%s/%s", dirname, ent);
      FileStat_t st;
      if (gSystem->GetPathInfo(fn.Data(), st) == 0) {
         if (R_ISREG(st.fMode)) {
            Printf("lite:0| %s", fn.Data());
         } else if (R_ISREG(st.fMode)) {
            ShowDataDir(fn.Data());
         }
      }
   }
   // Done
   return;
}
 TProofLite.cxx:1
 TProofLite.cxx:2
 TProofLite.cxx:3
 TProofLite.cxx:4
 TProofLite.cxx:5
 TProofLite.cxx:6
 TProofLite.cxx:7
 TProofLite.cxx:8
 TProofLite.cxx:9
 TProofLite.cxx:10
 TProofLite.cxx:11
 TProofLite.cxx:12
 TProofLite.cxx:13
 TProofLite.cxx:14
 TProofLite.cxx:15
 TProofLite.cxx:16
 TProofLite.cxx:17
 TProofLite.cxx:18
 TProofLite.cxx:19
 TProofLite.cxx:20
 TProofLite.cxx:21
 TProofLite.cxx:22
 TProofLite.cxx:23
 TProofLite.cxx:24
 TProofLite.cxx:25
 TProofLite.cxx:26
 TProofLite.cxx:27
 TProofLite.cxx:28
 TProofLite.cxx:29
 TProofLite.cxx:30
 TProofLite.cxx:31
 TProofLite.cxx:32
 TProofLite.cxx:33
 TProofLite.cxx:34
 TProofLite.cxx:35
 TProofLite.cxx:36
 TProofLite.cxx:37
 TProofLite.cxx:38
 TProofLite.cxx:39
 TProofLite.cxx:40
 TProofLite.cxx:41
 TProofLite.cxx:42
 TProofLite.cxx:43
 TProofLite.cxx:44
 TProofLite.cxx:45
 TProofLite.cxx:46
 TProofLite.cxx:47
 TProofLite.cxx:48
 TProofLite.cxx:49
 TProofLite.cxx:50
 TProofLite.cxx:51
 TProofLite.cxx:52
 TProofLite.cxx:53
 TProofLite.cxx:54
 TProofLite.cxx:55
 TProofLite.cxx:56
 TProofLite.cxx:57
 TProofLite.cxx:58
 TProofLite.cxx:59
 TProofLite.cxx:60
 TProofLite.cxx:61
 TProofLite.cxx:62
 TProofLite.cxx:63
 TProofLite.cxx:64
 TProofLite.cxx:65
 TProofLite.cxx:66
 TProofLite.cxx:67
 TProofLite.cxx:68
 TProofLite.cxx:69
 TProofLite.cxx:70
 TProofLite.cxx:71
 TProofLite.cxx:72
 TProofLite.cxx:73
 TProofLite.cxx:74
 TProofLite.cxx:75
 TProofLite.cxx:76
 TProofLite.cxx:77
 TProofLite.cxx:78
 TProofLite.cxx:79
 TProofLite.cxx:80
 TProofLite.cxx:81
 TProofLite.cxx:82
 TProofLite.cxx:83
 TProofLite.cxx:84
 TProofLite.cxx:85
 TProofLite.cxx:86
 TProofLite.cxx:87
 TProofLite.cxx:88
 TProofLite.cxx:89
 TProofLite.cxx:90
 TProofLite.cxx:91
 TProofLite.cxx:92
 TProofLite.cxx:93
 TProofLite.cxx:94
 TProofLite.cxx:95
 TProofLite.cxx:96
 TProofLite.cxx:97
 TProofLite.cxx:98
 TProofLite.cxx:99
 TProofLite.cxx:100
 TProofLite.cxx:101
 TProofLite.cxx:102
 TProofLite.cxx:103
 TProofLite.cxx:104
 TProofLite.cxx:105
 TProofLite.cxx:106
 TProofLite.cxx:107
 TProofLite.cxx:108
 TProofLite.cxx:109
 TProofLite.cxx:110
 TProofLite.cxx:111
 TProofLite.cxx:112
 TProofLite.cxx:113
 TProofLite.cxx:114
 TProofLite.cxx:115
 TProofLite.cxx:116
 TProofLite.cxx:117
 TProofLite.cxx:118
 TProofLite.cxx:119
 TProofLite.cxx:120
 TProofLite.cxx:121
 TProofLite.cxx:122
 TProofLite.cxx:123
 TProofLite.cxx:124
 TProofLite.cxx:125
 TProofLite.cxx:126
 TProofLite.cxx:127
 TProofLite.cxx:128
 TProofLite.cxx:129
 TProofLite.cxx:130
 TProofLite.cxx:131
 TProofLite.cxx:132
 TProofLite.cxx:133
 TProofLite.cxx:134
 TProofLite.cxx:135
 TProofLite.cxx:136
 TProofLite.cxx:137
 TProofLite.cxx:138
 TProofLite.cxx:139
 TProofLite.cxx:140
 TProofLite.cxx:141
 TProofLite.cxx:142
 TProofLite.cxx:143
 TProofLite.cxx:144
 TProofLite.cxx:145
 TProofLite.cxx:146
 TProofLite.cxx:147
 TProofLite.cxx:148
 TProofLite.cxx:149
 TProofLite.cxx:150
 TProofLite.cxx:151
 TProofLite.cxx:152
 TProofLite.cxx:153
 TProofLite.cxx:154
 TProofLite.cxx:155
 TProofLite.cxx:156
 TProofLite.cxx:157
 TProofLite.cxx:158
 TProofLite.cxx:159
 TProofLite.cxx:160
 TProofLite.cxx:161
 TProofLite.cxx:162
 TProofLite.cxx:163
 TProofLite.cxx:164
 TProofLite.cxx:165
 TProofLite.cxx:166
 TProofLite.cxx:167
 TProofLite.cxx:168
 TProofLite.cxx:169
 TProofLite.cxx:170
 TProofLite.cxx:171
 TProofLite.cxx:172
 TProofLite.cxx:173
 TProofLite.cxx:174
 TProofLite.cxx:175
 TProofLite.cxx:176
 TProofLite.cxx:177
 TProofLite.cxx:178
 TProofLite.cxx:179
 TProofLite.cxx:180
 TProofLite.cxx:181
 TProofLite.cxx:182
 TProofLite.cxx:183
 TProofLite.cxx:184
 TProofLite.cxx:185
 TProofLite.cxx:186
 TProofLite.cxx:187
 TProofLite.cxx:188
 TProofLite.cxx:189
 TProofLite.cxx:190
 TProofLite.cxx:191
 TProofLite.cxx:192
 TProofLite.cxx:193
 TProofLite.cxx:194
 TProofLite.cxx:195
 TProofLite.cxx:196
 TProofLite.cxx:197
 TProofLite.cxx:198
 TProofLite.cxx:199
 TProofLite.cxx:200
 TProofLite.cxx:201
 TProofLite.cxx:202
 TProofLite.cxx:203
 TProofLite.cxx:204
 TProofLite.cxx:205
 TProofLite.cxx:206
 TProofLite.cxx:207
 TProofLite.cxx:208
 TProofLite.cxx:209
 TProofLite.cxx:210
 TProofLite.cxx:211
 TProofLite.cxx:212
 TProofLite.cxx:213
 TProofLite.cxx:214
 TProofLite.cxx:215
 TProofLite.cxx:216
 TProofLite.cxx:217
 TProofLite.cxx:218
 TProofLite.cxx:219
 TProofLite.cxx:220
 TProofLite.cxx:221
 TProofLite.cxx:222
 TProofLite.cxx:223
 TProofLite.cxx:224
 TProofLite.cxx:225
 TProofLite.cxx:226
 TProofLite.cxx:227
 TProofLite.cxx:228
 TProofLite.cxx:229
 TProofLite.cxx:230
 TProofLite.cxx:231
 TProofLite.cxx:232
 TProofLite.cxx:233
 TProofLite.cxx:234
 TProofLite.cxx:235
 TProofLite.cxx:236
 TProofLite.cxx:237
 TProofLite.cxx:238
 TProofLite.cxx:239
 TProofLite.cxx:240
 TProofLite.cxx:241
 TProofLite.cxx:242
 TProofLite.cxx:243
 TProofLite.cxx:244
 TProofLite.cxx:245
 TProofLite.cxx:246
 TProofLite.cxx:247
 TProofLite.cxx:248
 TProofLite.cxx:249
 TProofLite.cxx:250
 TProofLite.cxx:251
 TProofLite.cxx:252
 TProofLite.cxx:253
 TProofLite.cxx:254
 TProofLite.cxx:255
 TProofLite.cxx:256
 TProofLite.cxx:257
 TProofLite.cxx:258
 TProofLite.cxx:259
 TProofLite.cxx:260
 TProofLite.cxx:261
 TProofLite.cxx:262
 TProofLite.cxx:263
 TProofLite.cxx:264
 TProofLite.cxx:265
 TProofLite.cxx:266
 TProofLite.cxx:267
 TProofLite.cxx:268
 TProofLite.cxx:269
 TProofLite.cxx:270
 TProofLite.cxx:271
 TProofLite.cxx:272
 TProofLite.cxx:273
 TProofLite.cxx:274
 TProofLite.cxx:275
 TProofLite.cxx:276
 TProofLite.cxx:277
 TProofLite.cxx:278
 TProofLite.cxx:279
 TProofLite.cxx:280
 TProofLite.cxx:281
 TProofLite.cxx:282
 TProofLite.cxx:283
 TProofLite.cxx:284
 TProofLite.cxx:285
 TProofLite.cxx:286
 TProofLite.cxx:287
 TProofLite.cxx:288
 TProofLite.cxx:289
 TProofLite.cxx:290
 TProofLite.cxx:291
 TProofLite.cxx:292
 TProofLite.cxx:293
 TProofLite.cxx:294
 TProofLite.cxx:295
 TProofLite.cxx:296
 TProofLite.cxx:297
 TProofLite.cxx:298
 TProofLite.cxx:299
 TProofLite.cxx:300
 TProofLite.cxx:301
 TProofLite.cxx:302
 TProofLite.cxx:303
 TProofLite.cxx:304
 TProofLite.cxx:305
 TProofLite.cxx:306
 TProofLite.cxx:307
 TProofLite.cxx:308
 TProofLite.cxx:309
 TProofLite.cxx:310
 TProofLite.cxx:311
 TProofLite.cxx:312
 TProofLite.cxx:313
 TProofLite.cxx:314
 TProofLite.cxx:315
 TProofLite.cxx:316
 TProofLite.cxx:317
 TProofLite.cxx:318
 TProofLite.cxx:319
 TProofLite.cxx:320
 TProofLite.cxx:321
 TProofLite.cxx:322
 TProofLite.cxx:323
 TProofLite.cxx:324
 TProofLite.cxx:325
 TProofLite.cxx:326
 TProofLite.cxx:327
 TProofLite.cxx:328
 TProofLite.cxx:329
 TProofLite.cxx:330
 TProofLite.cxx:331
 TProofLite.cxx:332
 TProofLite.cxx:333
 TProofLite.cxx:334
 TProofLite.cxx:335
 TProofLite.cxx:336
 TProofLite.cxx:337
 TProofLite.cxx:338
 TProofLite.cxx:339
 TProofLite.cxx:340
 TProofLite.cxx:341
 TProofLite.cxx:342
 TProofLite.cxx:343
 TProofLite.cxx:344
 TProofLite.cxx:345
 TProofLite.cxx:346
 TProofLite.cxx:347
 TProofLite.cxx:348
 TProofLite.cxx:349
 TProofLite.cxx:350
 TProofLite.cxx:351
 TProofLite.cxx:352
 TProofLite.cxx:353
 TProofLite.cxx:354
 TProofLite.cxx:355
 TProofLite.cxx:356
 TProofLite.cxx:357
 TProofLite.cxx:358
 TProofLite.cxx:359
 TProofLite.cxx:360
 TProofLite.cxx:361
 TProofLite.cxx:362
 TProofLite.cxx:363
 TProofLite.cxx:364
 TProofLite.cxx:365
 TProofLite.cxx:366
 TProofLite.cxx:367
 TProofLite.cxx:368
 TProofLite.cxx:369
 TProofLite.cxx:370
 TProofLite.cxx:371
 TProofLite.cxx:372
 TProofLite.cxx:373
 TProofLite.cxx:374
 TProofLite.cxx:375
 TProofLite.cxx:376
 TProofLite.cxx:377
 TProofLite.cxx:378
 TProofLite.cxx:379
 TProofLite.cxx:380
 TProofLite.cxx:381
 TProofLite.cxx:382
 TProofLite.cxx:383
 TProofLite.cxx:384
 TProofLite.cxx:385
 TProofLite.cxx:386
 TProofLite.cxx:387
 TProofLite.cxx:388
 TProofLite.cxx:389
 TProofLite.cxx:390
 TProofLite.cxx:391
 TProofLite.cxx:392
 TProofLite.cxx:393
 TProofLite.cxx:394
 TProofLite.cxx:395
 TProofLite.cxx:396
 TProofLite.cxx:397
 TProofLite.cxx:398
 TProofLite.cxx:399
 TProofLite.cxx:400
 TProofLite.cxx:401
 TProofLite.cxx:402
 TProofLite.cxx:403
 TProofLite.cxx:404
 TProofLite.cxx:405
 TProofLite.cxx:406
 TProofLite.cxx:407
 TProofLite.cxx:408
 TProofLite.cxx:409
 TProofLite.cxx:410
 TProofLite.cxx:411
 TProofLite.cxx:412
 TProofLite.cxx:413
 TProofLite.cxx:414
 TProofLite.cxx:415
 TProofLite.cxx:416
 TProofLite.cxx:417
 TProofLite.cxx:418
 TProofLite.cxx:419
 TProofLite.cxx:420
 TProofLite.cxx:421
 TProofLite.cxx:422
 TProofLite.cxx:423
 TProofLite.cxx:424
 TProofLite.cxx:425
 TProofLite.cxx:426
 TProofLite.cxx:427
 TProofLite.cxx:428
 TProofLite.cxx:429
 TProofLite.cxx:430
 TProofLite.cxx:431
 TProofLite.cxx:432
 TProofLite.cxx:433
 TProofLite.cxx:434
 TProofLite.cxx:435
 TProofLite.cxx:436
 TProofLite.cxx:437
 TProofLite.cxx:438
 TProofLite.cxx:439
 TProofLite.cxx:440
 TProofLite.cxx:441
 TProofLite.cxx:442
 TProofLite.cxx:443
 TProofLite.cxx:444
 TProofLite.cxx:445
 TProofLite.cxx:446
 TProofLite.cxx:447
 TProofLite.cxx:448
 TProofLite.cxx:449
 TProofLite.cxx:450
 TProofLite.cxx:451
 TProofLite.cxx:452
 TProofLite.cxx:453
 TProofLite.cxx:454
 TProofLite.cxx:455
 TProofLite.cxx:456
 TProofLite.cxx:457
 TProofLite.cxx:458
 TProofLite.cxx:459
 TProofLite.cxx:460
 TProofLite.cxx:461
 TProofLite.cxx:462
 TProofLite.cxx:463
 TProofLite.cxx:464
 TProofLite.cxx:465
 TProofLite.cxx:466
 TProofLite.cxx:467
 TProofLite.cxx:468
 TProofLite.cxx:469
 TProofLite.cxx:470
 TProofLite.cxx:471
 TProofLite.cxx:472
 TProofLite.cxx:473
 TProofLite.cxx:474
 TProofLite.cxx:475
 TProofLite.cxx:476
 TProofLite.cxx:477
 TProofLite.cxx:478
 TProofLite.cxx:479
 TProofLite.cxx:480
 TProofLite.cxx:481
 TProofLite.cxx:482
 TProofLite.cxx:483
 TProofLite.cxx:484
 TProofLite.cxx:485
 TProofLite.cxx:486
 TProofLite.cxx:487
 TProofLite.cxx:488
 TProofLite.cxx:489
 TProofLite.cxx:490
 TProofLite.cxx:491
 TProofLite.cxx:492
 TProofLite.cxx:493
 TProofLite.cxx:494
 TProofLite.cxx:495
 TProofLite.cxx:496
 TProofLite.cxx:497
 TProofLite.cxx:498
 TProofLite.cxx:499
 TProofLite.cxx:500
 TProofLite.cxx:501
 TProofLite.cxx:502
 TProofLite.cxx:503
 TProofLite.cxx:504
 TProofLite.cxx:505
 TProofLite.cxx:506
 TProofLite.cxx:507
 TProofLite.cxx:508
 TProofLite.cxx:509
 TProofLite.cxx:510
 TProofLite.cxx:511
 TProofLite.cxx:512
 TProofLite.cxx:513
 TProofLite.cxx:514
 TProofLite.cxx:515
 TProofLite.cxx:516
 TProofLite.cxx:517
 TProofLite.cxx:518
 TProofLite.cxx:519
 TProofLite.cxx:520
 TProofLite.cxx:521
 TProofLite.cxx:522
 TProofLite.cxx:523
 TProofLite.cxx:524
 TProofLite.cxx:525
 TProofLite.cxx:526
 TProofLite.cxx:527
 TProofLite.cxx:528
 TProofLite.cxx:529
 TProofLite.cxx:530
 TProofLite.cxx:531
 TProofLite.cxx:532
 TProofLite.cxx:533
 TProofLite.cxx:534
 TProofLite.cxx:535
 TProofLite.cxx:536
 TProofLite.cxx:537
 TProofLite.cxx:538
 TProofLite.cxx:539
 TProofLite.cxx:540
 TProofLite.cxx:541
 TProofLite.cxx:542
 TProofLite.cxx:543
 TProofLite.cxx:544
 TProofLite.cxx:545
 TProofLite.cxx:546
 TProofLite.cxx:547
 TProofLite.cxx:548
 TProofLite.cxx:549
 TProofLite.cxx:550
 TProofLite.cxx:551
 TProofLite.cxx:552
 TProofLite.cxx:553
 TProofLite.cxx:554
 TProofLite.cxx:555
 TProofLite.cxx:556
 TProofLite.cxx:557
 TProofLite.cxx:558
 TProofLite.cxx:559
 TProofLite.cxx:560
 TProofLite.cxx:561
 TProofLite.cxx:562
 TProofLite.cxx:563
 TProofLite.cxx:564
 TProofLite.cxx:565
 TProofLite.cxx:566
 TProofLite.cxx:567
 TProofLite.cxx:568
 TProofLite.cxx:569
 TProofLite.cxx:570
 TProofLite.cxx:571
 TProofLite.cxx:572
 TProofLite.cxx:573
 TProofLite.cxx:574
 TProofLite.cxx:575
 TProofLite.cxx:576
 TProofLite.cxx:577
 TProofLite.cxx:578
 TProofLite.cxx:579
 TProofLite.cxx:580
 TProofLite.cxx:581
 TProofLite.cxx:582
 TProofLite.cxx:583
 TProofLite.cxx:584
 TProofLite.cxx:585
 TProofLite.cxx:586
 TProofLite.cxx:587
 TProofLite.cxx:588
 TProofLite.cxx:589
 TProofLite.cxx:590
 TProofLite.cxx:591
 TProofLite.cxx:592
 TProofLite.cxx:593
 TProofLite.cxx:594
 TProofLite.cxx:595
 TProofLite.cxx:596
 TProofLite.cxx:597
 TProofLite.cxx:598
 TProofLite.cxx:599
 TProofLite.cxx:600
 TProofLite.cxx:601
 TProofLite.cxx:602
 TProofLite.cxx:603
 TProofLite.cxx:604
 TProofLite.cxx:605
 TProofLite.cxx:606
 TProofLite.cxx:607
 TProofLite.cxx:608
 TProofLite.cxx:609
 TProofLite.cxx:610
 TProofLite.cxx:611
 TProofLite.cxx:612
 TProofLite.cxx:613
 TProofLite.cxx:614
 TProofLite.cxx:615
 TProofLite.cxx:616
 TProofLite.cxx:617
 TProofLite.cxx:618
 TProofLite.cxx:619
 TProofLite.cxx:620
 TProofLite.cxx:621
 TProofLite.cxx:622
 TProofLite.cxx:623
 TProofLite.cxx:624
 TProofLite.cxx:625
 TProofLite.cxx:626
 TProofLite.cxx:627
 TProofLite.cxx:628
 TProofLite.cxx:629
 TProofLite.cxx:630
 TProofLite.cxx:631
 TProofLite.cxx:632
 TProofLite.cxx:633
 TProofLite.cxx:634
 TProofLite.cxx:635
 TProofLite.cxx:636
 TProofLite.cxx:637
 TProofLite.cxx:638
 TProofLite.cxx:639
 TProofLite.cxx:640
 TProofLite.cxx:641
 TProofLite.cxx:642
 TProofLite.cxx:643
 TProofLite.cxx:644
 TProofLite.cxx:645
 TProofLite.cxx:646
 TProofLite.cxx:647
 TProofLite.cxx:648
 TProofLite.cxx:649
 TProofLite.cxx:650
 TProofLite.cxx:651
 TProofLite.cxx:652
 TProofLite.cxx:653
 TProofLite.cxx:654
 TProofLite.cxx:655
 TProofLite.cxx:656
 TProofLite.cxx:657
 TProofLite.cxx:658
 TProofLite.cxx:659
 TProofLite.cxx:660
 TProofLite.cxx:661
 TProofLite.cxx:662
 TProofLite.cxx:663
 TProofLite.cxx:664
 TProofLite.cxx:665
 TProofLite.cxx:666
 TProofLite.cxx:667
 TProofLite.cxx:668
 TProofLite.cxx:669
 TProofLite.cxx:670
 TProofLite.cxx:671
 TProofLite.cxx:672
 TProofLite.cxx:673
 TProofLite.cxx:674
 TProofLite.cxx:675
 TProofLite.cxx:676
 TProofLite.cxx:677
 TProofLite.cxx:678
 TProofLite.cxx:679
 TProofLite.cxx:680
 TProofLite.cxx:681
 TProofLite.cxx:682
 TProofLite.cxx:683
 TProofLite.cxx:684
 TProofLite.cxx:685
 TProofLite.cxx:686
 TProofLite.cxx:687
 TProofLite.cxx:688
 TProofLite.cxx:689
 TProofLite.cxx:690
 TProofLite.cxx:691
 TProofLite.cxx:692
 TProofLite.cxx:693
 TProofLite.cxx:694
 TProofLite.cxx:695
 TProofLite.cxx:696
 TProofLite.cxx:697
 TProofLite.cxx:698
 TProofLite.cxx:699
 TProofLite.cxx:700
 TProofLite.cxx:701
 TProofLite.cxx:702
 TProofLite.cxx:703
 TProofLite.cxx:704
 TProofLite.cxx:705
 TProofLite.cxx:706
 TProofLite.cxx:707
 TProofLite.cxx:708
 TProofLite.cxx:709
 TProofLite.cxx:710
 TProofLite.cxx:711
 TProofLite.cxx:712
 TProofLite.cxx:713
 TProofLite.cxx:714
 TProofLite.cxx:715
 TProofLite.cxx:716
 TProofLite.cxx:717
 TProofLite.cxx:718
 TProofLite.cxx:719
 TProofLite.cxx:720
 TProofLite.cxx:721
 TProofLite.cxx:722
 TProofLite.cxx:723
 TProofLite.cxx:724
 TProofLite.cxx:725
 TProofLite.cxx:726
 TProofLite.cxx:727
 TProofLite.cxx:728
 TProofLite.cxx:729
 TProofLite.cxx:730
 TProofLite.cxx:731
 TProofLite.cxx:732
 TProofLite.cxx:733
 TProofLite.cxx:734
 TProofLite.cxx:735
 TProofLite.cxx:736
 TProofLite.cxx:737
 TProofLite.cxx:738
 TProofLite.cxx:739
 TProofLite.cxx:740
 TProofLite.cxx:741
 TProofLite.cxx:742
 TProofLite.cxx:743
 TProofLite.cxx:744
 TProofLite.cxx:745
 TProofLite.cxx:746
 TProofLite.cxx:747
 TProofLite.cxx:748
 TProofLite.cxx:749
 TProofLite.cxx:750
 TProofLite.cxx:751
 TProofLite.cxx:752
 TProofLite.cxx:753
 TProofLite.cxx:754
 TProofLite.cxx:755
 TProofLite.cxx:756
 TProofLite.cxx:757
 TProofLite.cxx:758
 TProofLite.cxx:759
 TProofLite.cxx:760
 TProofLite.cxx:761
 TProofLite.cxx:762
 TProofLite.cxx:763
 TProofLite.cxx:764
 TProofLite.cxx:765
 TProofLite.cxx:766
 TProofLite.cxx:767
 TProofLite.cxx:768
 TProofLite.cxx:769
 TProofLite.cxx:770
 TProofLite.cxx:771
 TProofLite.cxx:772
 TProofLite.cxx:773
 TProofLite.cxx:774
 TProofLite.cxx:775
 TProofLite.cxx:776
 TProofLite.cxx:777
 TProofLite.cxx:778
 TProofLite.cxx:779
 TProofLite.cxx:780
 TProofLite.cxx:781
 TProofLite.cxx:782
 TProofLite.cxx:783
 TProofLite.cxx:784
 TProofLite.cxx:785
 TProofLite.cxx:786
 TProofLite.cxx:787
 TProofLite.cxx:788
 TProofLite.cxx:789
 TProofLite.cxx:790
 TProofLite.cxx:791
 TProofLite.cxx:792
 TProofLite.cxx:793
 TProofLite.cxx:794
 TProofLite.cxx:795
 TProofLite.cxx:796
 TProofLite.cxx:797
 TProofLite.cxx:798
 TProofLite.cxx:799
 TProofLite.cxx:800
 TProofLite.cxx:801
 TProofLite.cxx:802
 TProofLite.cxx:803
 TProofLite.cxx:804
 TProofLite.cxx:805
 TProofLite.cxx:806
 TProofLite.cxx:807
 TProofLite.cxx:808
 TProofLite.cxx:809
 TProofLite.cxx:810
 TProofLite.cxx:811
 TProofLite.cxx:812
 TProofLite.cxx:813
 TProofLite.cxx:814
 TProofLite.cxx:815
 TProofLite.cxx:816
 TProofLite.cxx:817
 TProofLite.cxx:818
 TProofLite.cxx:819
 TProofLite.cxx:820
 TProofLite.cxx:821
 TProofLite.cxx:822
 TProofLite.cxx:823
 TProofLite.cxx:824
 TProofLite.cxx:825
 TProofLite.cxx:826
 TProofLite.cxx:827
 TProofLite.cxx:828
 TProofLite.cxx:829
 TProofLite.cxx:830
 TProofLite.cxx:831
 TProofLite.cxx:832
 TProofLite.cxx:833
 TProofLite.cxx:834
 TProofLite.cxx:835
 TProofLite.cxx:836
 TProofLite.cxx:837
 TProofLite.cxx:838
 TProofLite.cxx:839
 TProofLite.cxx:840
 TProofLite.cxx:841
 TProofLite.cxx:842
 TProofLite.cxx:843
 TProofLite.cxx:844
 TProofLite.cxx:845
 TProofLite.cxx:846
 TProofLite.cxx:847
 TProofLite.cxx:848
 TProofLite.cxx:849
 TProofLite.cxx:850
 TProofLite.cxx:851
 TProofLite.cxx:852
 TProofLite.cxx:853
 TProofLite.cxx:854
 TProofLite.cxx:855
 TProofLite.cxx:856
 TProofLite.cxx:857
 TProofLite.cxx:858
 TProofLite.cxx:859
 TProofLite.cxx:860
 TProofLite.cxx:861
 TProofLite.cxx:862
 TProofLite.cxx:863
 TProofLite.cxx:864
 TProofLite.cxx:865
 TProofLite.cxx:866
 TProofLite.cxx:867
 TProofLite.cxx:868
 TProofLite.cxx:869
 TProofLite.cxx:870
 TProofLite.cxx:871
 TProofLite.cxx:872
 TProofLite.cxx:873
 TProofLite.cxx:874
 TProofLite.cxx:875
 TProofLite.cxx:876
 TProofLite.cxx:877
 TProofLite.cxx:878
 TProofLite.cxx:879
 TProofLite.cxx:880
 TProofLite.cxx:881
 TProofLite.cxx:882
 TProofLite.cxx:883
 TProofLite.cxx:884
 TProofLite.cxx:885
 TProofLite.cxx:886
 TProofLite.cxx:887
 TProofLite.cxx:888
 TProofLite.cxx:889
 TProofLite.cxx:890
 TProofLite.cxx:891
 TProofLite.cxx:892
 TProofLite.cxx:893
 TProofLite.cxx:894
 TProofLite.cxx:895
 TProofLite.cxx:896
 TProofLite.cxx:897
 TProofLite.cxx:898
 TProofLite.cxx:899
 TProofLite.cxx:900
 TProofLite.cxx:901
 TProofLite.cxx:902
 TProofLite.cxx:903
 TProofLite.cxx:904
 TProofLite.cxx:905
 TProofLite.cxx:906
 TProofLite.cxx:907
 TProofLite.cxx:908
 TProofLite.cxx:909
 TProofLite.cxx:910
 TProofLite.cxx:911
 TProofLite.cxx:912
 TProofLite.cxx:913
 TProofLite.cxx:914
 TProofLite.cxx:915
 TProofLite.cxx:916
 TProofLite.cxx:917
 TProofLite.cxx:918
 TProofLite.cxx:919
 TProofLite.cxx:920
 TProofLite.cxx:921
 TProofLite.cxx:922
 TProofLite.cxx:923
 TProofLite.cxx:924
 TProofLite.cxx:925
 TProofLite.cxx:926
 TProofLite.cxx:927
 TProofLite.cxx:928
 TProofLite.cxx:929
 TProofLite.cxx:930
 TProofLite.cxx:931
 TProofLite.cxx:932
 TProofLite.cxx:933
 TProofLite.cxx:934
 TProofLite.cxx:935
 TProofLite.cxx:936
 TProofLite.cxx:937
 TProofLite.cxx:938
 TProofLite.cxx:939
 TProofLite.cxx:940
 TProofLite.cxx:941
 TProofLite.cxx:942
 TProofLite.cxx:943
 TProofLite.cxx:944
 TProofLite.cxx:945
 TProofLite.cxx:946
 TProofLite.cxx:947
 TProofLite.cxx:948
 TProofLite.cxx:949
 TProofLite.cxx:950
 TProofLite.cxx:951
 TProofLite.cxx:952
 TProofLite.cxx:953
 TProofLite.cxx:954
 TProofLite.cxx:955
 TProofLite.cxx:956
 TProofLite.cxx:957
 TProofLite.cxx:958
 TProofLite.cxx:959
 TProofLite.cxx:960
 TProofLite.cxx:961
 TProofLite.cxx:962
 TProofLite.cxx:963
 TProofLite.cxx:964
 TProofLite.cxx:965
 TProofLite.cxx:966
 TProofLite.cxx:967
 TProofLite.cxx:968
 TProofLite.cxx:969
 TProofLite.cxx:970
 TProofLite.cxx:971
 TProofLite.cxx:972
 TProofLite.cxx:973
 TProofLite.cxx:974
 TProofLite.cxx:975
 TProofLite.cxx:976
 TProofLite.cxx:977
 TProofLite.cxx:978
 TProofLite.cxx:979
 TProofLite.cxx:980
 TProofLite.cxx:981
 TProofLite.cxx:982
 TProofLite.cxx:983
 TProofLite.cxx:984
 TProofLite.cxx:985
 TProofLite.cxx:986
 TProofLite.cxx:987
 TProofLite.cxx:988
 TProofLite.cxx:989
 TProofLite.cxx:990
 TProofLite.cxx:991
 TProofLite.cxx:992
 TProofLite.cxx:993
 TProofLite.cxx:994
 TProofLite.cxx:995
 TProofLite.cxx:996
 TProofLite.cxx:997
 TProofLite.cxx:998
 TProofLite.cxx:999
 TProofLite.cxx:1000
 TProofLite.cxx:1001
 TProofLite.cxx:1002
 TProofLite.cxx:1003
 TProofLite.cxx:1004
 TProofLite.cxx:1005
 TProofLite.cxx:1006
 TProofLite.cxx:1007
 TProofLite.cxx:1008
 TProofLite.cxx:1009
 TProofLite.cxx:1010
 TProofLite.cxx:1011
 TProofLite.cxx:1012
 TProofLite.cxx:1013
 TProofLite.cxx:1014
 TProofLite.cxx:1015
 TProofLite.cxx:1016
 TProofLite.cxx:1017
 TProofLite.cxx:1018
 TProofLite.cxx:1019
 TProofLite.cxx:1020
 TProofLite.cxx:1021
 TProofLite.cxx:1022
 TProofLite.cxx:1023
 TProofLite.cxx:1024
 TProofLite.cxx:1025
 TProofLite.cxx:1026
 TProofLite.cxx:1027
 TProofLite.cxx:1028
 TProofLite.cxx:1029
 TProofLite.cxx:1030
 TProofLite.cxx:1031
 TProofLite.cxx:1032
 TProofLite.cxx:1033
 TProofLite.cxx:1034
 TProofLite.cxx:1035
 TProofLite.cxx:1036
 TProofLite.cxx:1037
 TProofLite.cxx:1038
 TProofLite.cxx:1039
 TProofLite.cxx:1040
 TProofLite.cxx:1041
 TProofLite.cxx:1042
 TProofLite.cxx:1043
 TProofLite.cxx:1044
 TProofLite.cxx:1045
 TProofLite.cxx:1046
 TProofLite.cxx:1047
 TProofLite.cxx:1048
 TProofLite.cxx:1049
 TProofLite.cxx:1050
 TProofLite.cxx:1051
 TProofLite.cxx:1052
 TProofLite.cxx:1053
 TProofLite.cxx:1054
 TProofLite.cxx:1055
 TProofLite.cxx:1056
 TProofLite.cxx:1057
 TProofLite.cxx:1058
 TProofLite.cxx:1059
 TProofLite.cxx:1060
 TProofLite.cxx:1061
 TProofLite.cxx:1062
 TProofLite.cxx:1063
 TProofLite.cxx:1064
 TProofLite.cxx:1065
 TProofLite.cxx:1066
 TProofLite.cxx:1067
 TProofLite.cxx:1068
 TProofLite.cxx:1069
 TProofLite.cxx:1070
 TProofLite.cxx:1071
 TProofLite.cxx:1072
 TProofLite.cxx:1073
 TProofLite.cxx:1074
 TProofLite.cxx:1075
 TProofLite.cxx:1076
 TProofLite.cxx:1077
 TProofLite.cxx:1078
 TProofLite.cxx:1079
 TProofLite.cxx:1080
 TProofLite.cxx:1081
 TProofLite.cxx:1082
 TProofLite.cxx:1083
 TProofLite.cxx:1084
 TProofLite.cxx:1085
 TProofLite.cxx:1086
 TProofLite.cxx:1087
 TProofLite.cxx:1088
 TProofLite.cxx:1089
 TProofLite.cxx:1090
 TProofLite.cxx:1091
 TProofLite.cxx:1092
 TProofLite.cxx:1093
 TProofLite.cxx:1094
 TProofLite.cxx:1095
 TProofLite.cxx:1096
 TProofLite.cxx:1097
 TProofLite.cxx:1098
 TProofLite.cxx:1099
 TProofLite.cxx:1100
 TProofLite.cxx:1101
 TProofLite.cxx:1102
 TProofLite.cxx:1103
 TProofLite.cxx:1104
 TProofLite.cxx:1105
 TProofLite.cxx:1106
 TProofLite.cxx:1107
 TProofLite.cxx:1108
 TProofLite.cxx:1109
 TProofLite.cxx:1110
 TProofLite.cxx:1111
 TProofLite.cxx:1112
 TProofLite.cxx:1113
 TProofLite.cxx:1114
 TProofLite.cxx:1115
 TProofLite.cxx:1116
 TProofLite.cxx:1117
 TProofLite.cxx:1118
 TProofLite.cxx:1119
 TProofLite.cxx:1120
 TProofLite.cxx:1121
 TProofLite.cxx:1122
 TProofLite.cxx:1123
 TProofLite.cxx:1124
 TProofLite.cxx:1125
 TProofLite.cxx:1126
 TProofLite.cxx:1127
 TProofLite.cxx:1128
 TProofLite.cxx:1129
 TProofLite.cxx:1130
 TProofLite.cxx:1131
 TProofLite.cxx:1132
 TProofLite.cxx:1133
 TProofLite.cxx:1134
 TProofLite.cxx:1135
 TProofLite.cxx:1136
 TProofLite.cxx:1137
 TProofLite.cxx:1138
 TProofLite.cxx:1139
 TProofLite.cxx:1140
 TProofLite.cxx:1141
 TProofLite.cxx:1142
 TProofLite.cxx:1143
 TProofLite.cxx:1144
 TProofLite.cxx:1145
 TProofLite.cxx:1146
 TProofLite.cxx:1147
 TProofLite.cxx:1148
 TProofLite.cxx:1149
 TProofLite.cxx:1150
 TProofLite.cxx:1151
 TProofLite.cxx:1152
 TProofLite.cxx:1153
 TProofLite.cxx:1154
 TProofLite.cxx:1155
 TProofLite.cxx:1156
 TProofLite.cxx:1157
 TProofLite.cxx:1158
 TProofLite.cxx:1159
 TProofLite.cxx:1160
 TProofLite.cxx:1161
 TProofLite.cxx:1162
 TProofLite.cxx:1163
 TProofLite.cxx:1164
 TProofLite.cxx:1165
 TProofLite.cxx:1166
 TProofLite.cxx:1167
 TProofLite.cxx:1168
 TProofLite.cxx:1169
 TProofLite.cxx:1170
 TProofLite.cxx:1171
 TProofLite.cxx:1172
 TProofLite.cxx:1173
 TProofLite.cxx:1174
 TProofLite.cxx:1175
 TProofLite.cxx:1176
 TProofLite.cxx:1177
 TProofLite.cxx:1178
 TProofLite.cxx:1179
 TProofLite.cxx:1180
 TProofLite.cxx:1181
 TProofLite.cxx:1182
 TProofLite.cxx:1183
 TProofLite.cxx:1184
 TProofLite.cxx:1185
 TProofLite.cxx:1186
 TProofLite.cxx:1187
 TProofLite.cxx:1188
 TProofLite.cxx:1189
 TProofLite.cxx:1190
 TProofLite.cxx:1191
 TProofLite.cxx:1192
 TProofLite.cxx:1193
 TProofLite.cxx:1194
 TProofLite.cxx:1195
 TProofLite.cxx:1196
 TProofLite.cxx:1197
 TProofLite.cxx:1198
 TProofLite.cxx:1199
 TProofLite.cxx:1200
 TProofLite.cxx:1201
 TProofLite.cxx:1202
 TProofLite.cxx:1203
 TProofLite.cxx:1204
 TProofLite.cxx:1205
 TProofLite.cxx:1206
 TProofLite.cxx:1207
 TProofLite.cxx:1208
 TProofLite.cxx:1209
 TProofLite.cxx:1210
 TProofLite.cxx:1211
 TProofLite.cxx:1212
 TProofLite.cxx:1213
 TProofLite.cxx:1214
 TProofLite.cxx:1215
 TProofLite.cxx:1216
 TProofLite.cxx:1217
 TProofLite.cxx:1218
 TProofLite.cxx:1219
 TProofLite.cxx:1220
 TProofLite.cxx:1221
 TProofLite.cxx:1222
 TProofLite.cxx:1223
 TProofLite.cxx:1224
 TProofLite.cxx:1225
 TProofLite.cxx:1226
 TProofLite.cxx:1227
 TProofLite.cxx:1228
 TProofLite.cxx:1229
 TProofLite.cxx:1230
 TProofLite.cxx:1231
 TProofLite.cxx:1232
 TProofLite.cxx:1233
 TProofLite.cxx:1234
 TProofLite.cxx:1235
 TProofLite.cxx:1236
 TProofLite.cxx:1237
 TProofLite.cxx:1238
 TProofLite.cxx:1239
 TProofLite.cxx:1240
 TProofLite.cxx:1241
 TProofLite.cxx:1242
 TProofLite.cxx:1243
 TProofLite.cxx:1244
 TProofLite.cxx:1245
 TProofLite.cxx:1246
 TProofLite.cxx:1247
 TProofLite.cxx:1248
 TProofLite.cxx:1249
 TProofLite.cxx:1250
 TProofLite.cxx:1251
 TProofLite.cxx:1252
 TProofLite.cxx:1253
 TProofLite.cxx:1254
 TProofLite.cxx:1255
 TProofLite.cxx:1256
 TProofLite.cxx:1257
 TProofLite.cxx:1258
 TProofLite.cxx:1259
 TProofLite.cxx:1260
 TProofLite.cxx:1261
 TProofLite.cxx:1262
 TProofLite.cxx:1263
 TProofLite.cxx:1264
 TProofLite.cxx:1265
 TProofLite.cxx:1266
 TProofLite.cxx:1267
 TProofLite.cxx:1268
 TProofLite.cxx:1269
 TProofLite.cxx:1270
 TProofLite.cxx:1271
 TProofLite.cxx:1272
 TProofLite.cxx:1273
 TProofLite.cxx:1274
 TProofLite.cxx:1275
 TProofLite.cxx:1276
 TProofLite.cxx:1277
 TProofLite.cxx:1278
 TProofLite.cxx:1279
 TProofLite.cxx:1280
 TProofLite.cxx:1281
 TProofLite.cxx:1282
 TProofLite.cxx:1283
 TProofLite.cxx:1284
 TProofLite.cxx:1285
 TProofLite.cxx:1286
 TProofLite.cxx:1287
 TProofLite.cxx:1288
 TProofLite.cxx:1289
 TProofLite.cxx:1290
 TProofLite.cxx:1291
 TProofLite.cxx:1292
 TProofLite.cxx:1293
 TProofLite.cxx:1294
 TProofLite.cxx:1295
 TProofLite.cxx:1296
 TProofLite.cxx:1297
 TProofLite.cxx:1298
 TProofLite.cxx:1299
 TProofLite.cxx:1300
 TProofLite.cxx:1301
 TProofLite.cxx:1302
 TProofLite.cxx:1303
 TProofLite.cxx:1304
 TProofLite.cxx:1305
 TProofLite.cxx:1306
 TProofLite.cxx:1307
 TProofLite.cxx:1308
 TProofLite.cxx:1309
 TProofLite.cxx:1310
 TProofLite.cxx:1311
 TProofLite.cxx:1312
 TProofLite.cxx:1313
 TProofLite.cxx:1314
 TProofLite.cxx:1315
 TProofLite.cxx:1316
 TProofLite.cxx:1317
 TProofLite.cxx:1318
 TProofLite.cxx:1319
 TProofLite.cxx:1320
 TProofLite.cxx:1321
 TProofLite.cxx:1322
 TProofLite.cxx:1323
 TProofLite.cxx:1324
 TProofLite.cxx:1325
 TProofLite.cxx:1326
 TProofLite.cxx:1327
 TProofLite.cxx:1328
 TProofLite.cxx:1329
 TProofLite.cxx:1330
 TProofLite.cxx:1331
 TProofLite.cxx:1332
 TProofLite.cxx:1333
 TProofLite.cxx:1334
 TProofLite.cxx:1335
 TProofLite.cxx:1336
 TProofLite.cxx:1337
 TProofLite.cxx:1338
 TProofLite.cxx:1339
 TProofLite.cxx:1340
 TProofLite.cxx:1341
 TProofLite.cxx:1342
 TProofLite.cxx:1343
 TProofLite.cxx:1344
 TProofLite.cxx:1345
 TProofLite.cxx:1346
 TProofLite.cxx:1347
 TProofLite.cxx:1348
 TProofLite.cxx:1349
 TProofLite.cxx:1350
 TProofLite.cxx:1351
 TProofLite.cxx:1352
 TProofLite.cxx:1353
 TProofLite.cxx:1354
 TProofLite.cxx:1355
 TProofLite.cxx:1356
 TProofLite.cxx:1357
 TProofLite.cxx:1358
 TProofLite.cxx:1359
 TProofLite.cxx:1360
 TProofLite.cxx:1361
 TProofLite.cxx:1362
 TProofLite.cxx:1363
 TProofLite.cxx:1364
 TProofLite.cxx:1365
 TProofLite.cxx:1366
 TProofLite.cxx:1367
 TProofLite.cxx:1368
 TProofLite.cxx:1369
 TProofLite.cxx:1370
 TProofLite.cxx:1371
 TProofLite.cxx:1372
 TProofLite.cxx:1373
 TProofLite.cxx:1374
 TProofLite.cxx:1375
 TProofLite.cxx:1376
 TProofLite.cxx:1377
 TProofLite.cxx:1378
 TProofLite.cxx:1379
 TProofLite.cxx:1380
 TProofLite.cxx:1381
 TProofLite.cxx:1382
 TProofLite.cxx:1383
 TProofLite.cxx:1384
 TProofLite.cxx:1385
 TProofLite.cxx:1386
 TProofLite.cxx:1387
 TProofLite.cxx:1388
 TProofLite.cxx:1389
 TProofLite.cxx:1390
 TProofLite.cxx:1391
 TProofLite.cxx:1392
 TProofLite.cxx:1393
 TProofLite.cxx:1394
 TProofLite.cxx:1395
 TProofLite.cxx:1396
 TProofLite.cxx:1397
 TProofLite.cxx:1398
 TProofLite.cxx:1399
 TProofLite.cxx:1400
 TProofLite.cxx:1401
 TProofLite.cxx:1402
 TProofLite.cxx:1403
 TProofLite.cxx:1404
 TProofLite.cxx:1405
 TProofLite.cxx:1406
 TProofLite.cxx:1407
 TProofLite.cxx:1408
 TProofLite.cxx:1409
 TProofLite.cxx:1410
 TProofLite.cxx:1411
 TProofLite.cxx:1412
 TProofLite.cxx:1413
 TProofLite.cxx:1414
 TProofLite.cxx:1415
 TProofLite.cxx:1416
 TProofLite.cxx:1417
 TProofLite.cxx:1418
 TProofLite.cxx:1419
 TProofLite.cxx:1420
 TProofLite.cxx:1421
 TProofLite.cxx:1422
 TProofLite.cxx:1423
 TProofLite.cxx:1424
 TProofLite.cxx:1425
 TProofLite.cxx:1426
 TProofLite.cxx:1427
 TProofLite.cxx:1428
 TProofLite.cxx:1429
 TProofLite.cxx:1430
 TProofLite.cxx:1431
 TProofLite.cxx:1432
 TProofLite.cxx:1433
 TProofLite.cxx:1434
 TProofLite.cxx:1435
 TProofLite.cxx:1436
 TProofLite.cxx:1437
 TProofLite.cxx:1438
 TProofLite.cxx:1439
 TProofLite.cxx:1440
 TProofLite.cxx:1441
 TProofLite.cxx:1442
 TProofLite.cxx:1443
 TProofLite.cxx:1444
 TProofLite.cxx:1445
 TProofLite.cxx:1446
 TProofLite.cxx:1447
 TProofLite.cxx:1448
 TProofLite.cxx:1449
 TProofLite.cxx:1450
 TProofLite.cxx:1451
 TProofLite.cxx:1452
 TProofLite.cxx:1453
 TProofLite.cxx:1454
 TProofLite.cxx:1455
 TProofLite.cxx:1456
 TProofLite.cxx:1457
 TProofLite.cxx:1458
 TProofLite.cxx:1459
 TProofLite.cxx:1460
 TProofLite.cxx:1461
 TProofLite.cxx:1462
 TProofLite.cxx:1463
 TProofLite.cxx:1464
 TProofLite.cxx:1465
 TProofLite.cxx:1466
 TProofLite.cxx:1467
 TProofLite.cxx:1468
 TProofLite.cxx:1469
 TProofLite.cxx:1470
 TProofLite.cxx:1471
 TProofLite.cxx:1472
 TProofLite.cxx:1473
 TProofLite.cxx:1474
 TProofLite.cxx:1475
 TProofLite.cxx:1476
 TProofLite.cxx:1477
 TProofLite.cxx:1478
 TProofLite.cxx:1479
 TProofLite.cxx:1480
 TProofLite.cxx:1481
 TProofLite.cxx:1482
 TProofLite.cxx:1483
 TProofLite.cxx:1484
 TProofLite.cxx:1485
 TProofLite.cxx:1486
 TProofLite.cxx:1487
 TProofLite.cxx:1488
 TProofLite.cxx:1489
 TProofLite.cxx:1490
 TProofLite.cxx:1491
 TProofLite.cxx:1492
 TProofLite.cxx:1493
 TProofLite.cxx:1494
 TProofLite.cxx:1495
 TProofLite.cxx:1496
 TProofLite.cxx:1497
 TProofLite.cxx:1498
 TProofLite.cxx:1499
 TProofLite.cxx:1500
 TProofLite.cxx:1501
 TProofLite.cxx:1502
 TProofLite.cxx:1503
 TProofLite.cxx:1504
 TProofLite.cxx:1505
 TProofLite.cxx:1506
 TProofLite.cxx:1507
 TProofLite.cxx:1508
 TProofLite.cxx:1509
 TProofLite.cxx:1510
 TProofLite.cxx:1511
 TProofLite.cxx:1512
 TProofLite.cxx:1513
 TProofLite.cxx:1514
 TProofLite.cxx:1515
 TProofLite.cxx:1516
 TProofLite.cxx:1517
 TProofLite.cxx:1518
 TProofLite.cxx:1519
 TProofLite.cxx:1520
 TProofLite.cxx:1521
 TProofLite.cxx:1522
 TProofLite.cxx:1523
 TProofLite.cxx:1524
 TProofLite.cxx:1525
 TProofLite.cxx:1526
 TProofLite.cxx:1527
 TProofLite.cxx:1528
 TProofLite.cxx:1529
 TProofLite.cxx:1530
 TProofLite.cxx:1531
 TProofLite.cxx:1532
 TProofLite.cxx:1533
 TProofLite.cxx:1534
 TProofLite.cxx:1535
 TProofLite.cxx:1536
 TProofLite.cxx:1537
 TProofLite.cxx:1538
 TProofLite.cxx:1539
 TProofLite.cxx:1540
 TProofLite.cxx:1541
 TProofLite.cxx:1542
 TProofLite.cxx:1543
 TProofLite.cxx:1544
 TProofLite.cxx:1545
 TProofLite.cxx:1546
 TProofLite.cxx:1547
 TProofLite.cxx:1548
 TProofLite.cxx:1549
 TProofLite.cxx:1550
 TProofLite.cxx:1551
 TProofLite.cxx:1552
 TProofLite.cxx:1553
 TProofLite.cxx:1554
 TProofLite.cxx:1555
 TProofLite.cxx:1556
 TProofLite.cxx:1557
 TProofLite.cxx:1558
 TProofLite.cxx:1559
 TProofLite.cxx:1560
 TProofLite.cxx:1561
 TProofLite.cxx:1562
 TProofLite.cxx:1563
 TProofLite.cxx:1564
 TProofLite.cxx:1565
 TProofLite.cxx:1566
 TProofLite.cxx:1567
 TProofLite.cxx:1568
 TProofLite.cxx:1569
 TProofLite.cxx:1570
 TProofLite.cxx:1571
 TProofLite.cxx:1572
 TProofLite.cxx:1573
 TProofLite.cxx:1574
 TProofLite.cxx:1575
 TProofLite.cxx:1576
 TProofLite.cxx:1577
 TProofLite.cxx:1578
 TProofLite.cxx:1579
 TProofLite.cxx:1580
 TProofLite.cxx:1581
 TProofLite.cxx:1582
 TProofLite.cxx:1583
 TProofLite.cxx:1584
 TProofLite.cxx:1585
 TProofLite.cxx:1586
 TProofLite.cxx:1587
 TProofLite.cxx:1588
 TProofLite.cxx:1589
 TProofLite.cxx:1590
 TProofLite.cxx:1591
 TProofLite.cxx:1592
 TProofLite.cxx:1593
 TProofLite.cxx:1594
 TProofLite.cxx:1595
 TProofLite.cxx:1596
 TProofLite.cxx:1597
 TProofLite.cxx:1598
 TProofLite.cxx:1599
 TProofLite.cxx:1600
 TProofLite.cxx:1601
 TProofLite.cxx:1602
 TProofLite.cxx:1603
 TProofLite.cxx:1604
 TProofLite.cxx:1605
 TProofLite.cxx:1606
 TProofLite.cxx:1607
 TProofLite.cxx:1608
 TProofLite.cxx:1609
 TProofLite.cxx:1610
 TProofLite.cxx:1611
 TProofLite.cxx:1612
 TProofLite.cxx:1613
 TProofLite.cxx:1614
 TProofLite.cxx:1615
 TProofLite.cxx:1616
 TProofLite.cxx:1617
 TProofLite.cxx:1618
 TProofLite.cxx:1619
 TProofLite.cxx:1620
 TProofLite.cxx:1621
 TProofLite.cxx:1622
 TProofLite.cxx:1623
 TProofLite.cxx:1624
 TProofLite.cxx:1625
 TProofLite.cxx:1626
 TProofLite.cxx:1627
 TProofLite.cxx:1628
 TProofLite.cxx:1629
 TProofLite.cxx:1630
 TProofLite.cxx:1631
 TProofLite.cxx:1632
 TProofLite.cxx:1633
 TProofLite.cxx:1634
 TProofLite.cxx:1635
 TProofLite.cxx:1636
 TProofLite.cxx:1637
 TProofLite.cxx:1638
 TProofLite.cxx:1639
 TProofLite.cxx:1640
 TProofLite.cxx:1641
 TProofLite.cxx:1642
 TProofLite.cxx:1643
 TProofLite.cxx:1644
 TProofLite.cxx:1645
 TProofLite.cxx:1646
 TProofLite.cxx:1647
 TProofLite.cxx:1648
 TProofLite.cxx:1649
 TProofLite.cxx:1650
 TProofLite.cxx:1651
 TProofLite.cxx:1652
 TProofLite.cxx:1653
 TProofLite.cxx:1654
 TProofLite.cxx:1655
 TProofLite.cxx:1656
 TProofLite.cxx:1657
 TProofLite.cxx:1658
 TProofLite.cxx:1659
 TProofLite.cxx:1660
 TProofLite.cxx:1661
 TProofLite.cxx:1662
 TProofLite.cxx:1663
 TProofLite.cxx:1664
 TProofLite.cxx:1665
 TProofLite.cxx:1666
 TProofLite.cxx:1667
 TProofLite.cxx:1668
 TProofLite.cxx:1669
 TProofLite.cxx:1670
 TProofLite.cxx:1671
 TProofLite.cxx:1672
 TProofLite.cxx:1673
 TProofLite.cxx:1674
 TProofLite.cxx:1675
 TProofLite.cxx:1676
 TProofLite.cxx:1677
 TProofLite.cxx:1678
 TProofLite.cxx:1679
 TProofLite.cxx:1680
 TProofLite.cxx:1681
 TProofLite.cxx:1682
 TProofLite.cxx:1683
 TProofLite.cxx:1684
 TProofLite.cxx:1685
 TProofLite.cxx:1686
 TProofLite.cxx:1687
 TProofLite.cxx:1688
 TProofLite.cxx:1689
 TProofLite.cxx:1690
 TProofLite.cxx:1691
 TProofLite.cxx:1692
 TProofLite.cxx:1693
 TProofLite.cxx:1694
 TProofLite.cxx:1695
 TProofLite.cxx:1696
 TProofLite.cxx:1697
 TProofLite.cxx:1698
 TProofLite.cxx:1699
 TProofLite.cxx:1700
 TProofLite.cxx:1701
 TProofLite.cxx:1702
 TProofLite.cxx:1703
 TProofLite.cxx:1704
 TProofLite.cxx:1705
 TProofLite.cxx:1706
 TProofLite.cxx:1707
 TProofLite.cxx:1708
 TProofLite.cxx:1709
 TProofLite.cxx:1710
 TProofLite.cxx:1711
 TProofLite.cxx:1712
 TProofLite.cxx:1713
 TProofLite.cxx:1714
 TProofLite.cxx:1715
 TProofLite.cxx:1716
 TProofLite.cxx:1717
 TProofLite.cxx:1718
 TProofLite.cxx:1719
 TProofLite.cxx:1720
 TProofLite.cxx:1721
 TProofLite.cxx:1722
 TProofLite.cxx:1723
 TProofLite.cxx:1724
 TProofLite.cxx:1725
 TProofLite.cxx:1726
 TProofLite.cxx:1727
 TProofLite.cxx:1728
 TProofLite.cxx:1729
 TProofLite.cxx:1730
 TProofLite.cxx:1731
 TProofLite.cxx:1732
 TProofLite.cxx:1733
 TProofLite.cxx:1734
 TProofLite.cxx:1735
 TProofLite.cxx:1736
 TProofLite.cxx:1737
 TProofLite.cxx:1738
 TProofLite.cxx:1739
 TProofLite.cxx:1740
 TProofLite.cxx:1741
 TProofLite.cxx:1742
 TProofLite.cxx:1743
 TProofLite.cxx:1744
 TProofLite.cxx:1745
 TProofLite.cxx:1746
 TProofLite.cxx:1747
 TProofLite.cxx:1748
 TProofLite.cxx:1749
 TProofLite.cxx:1750
 TProofLite.cxx:1751
 TProofLite.cxx:1752
 TProofLite.cxx:1753
 TProofLite.cxx:1754
 TProofLite.cxx:1755
 TProofLite.cxx:1756
 TProofLite.cxx:1757
 TProofLite.cxx:1758
 TProofLite.cxx:1759
 TProofLite.cxx:1760
 TProofLite.cxx:1761
 TProofLite.cxx:1762
 TProofLite.cxx:1763
 TProofLite.cxx:1764
 TProofLite.cxx:1765
 TProofLite.cxx:1766
 TProofLite.cxx:1767
 TProofLite.cxx:1768
 TProofLite.cxx:1769
 TProofLite.cxx:1770
 TProofLite.cxx:1771
 TProofLite.cxx:1772
 TProofLite.cxx:1773
 TProofLite.cxx:1774
 TProofLite.cxx:1775
 TProofLite.cxx:1776
 TProofLite.cxx:1777
 TProofLite.cxx:1778
 TProofLite.cxx:1779
 TProofLite.cxx:1780
 TProofLite.cxx:1781
 TProofLite.cxx:1782
 TProofLite.cxx:1783
 TProofLite.cxx:1784
 TProofLite.cxx:1785
 TProofLite.cxx:1786
 TProofLite.cxx:1787
 TProofLite.cxx:1788
 TProofLite.cxx:1789
 TProofLite.cxx:1790
 TProofLite.cxx:1791
 TProofLite.cxx:1792
 TProofLite.cxx:1793
 TProofLite.cxx:1794
 TProofLite.cxx:1795
 TProofLite.cxx:1796
 TProofLite.cxx:1797
 TProofLite.cxx:1798
 TProofLite.cxx:1799
 TProofLite.cxx:1800
 TProofLite.cxx:1801
 TProofLite.cxx:1802
 TProofLite.cxx:1803
 TProofLite.cxx:1804
 TProofLite.cxx:1805
 TProofLite.cxx:1806
 TProofLite.cxx:1807
 TProofLite.cxx:1808
 TProofLite.cxx:1809
 TProofLite.cxx:1810
 TProofLite.cxx:1811
 TProofLite.cxx:1812
 TProofLite.cxx:1813
 TProofLite.cxx:1814
 TProofLite.cxx:1815
 TProofLite.cxx:1816
 TProofLite.cxx:1817
 TProofLite.cxx:1818
 TProofLite.cxx:1819
 TProofLite.cxx:1820
 TProofLite.cxx:1821
 TProofLite.cxx:1822
 TProofLite.cxx:1823
 TProofLite.cxx:1824
 TProofLite.cxx:1825
 TProofLite.cxx:1826
 TProofLite.cxx:1827
 TProofLite.cxx:1828
 TProofLite.cxx:1829
 TProofLite.cxx:1830
 TProofLite.cxx:1831
 TProofLite.cxx:1832
 TProofLite.cxx:1833
 TProofLite.cxx:1834
 TProofLite.cxx:1835
 TProofLite.cxx:1836
 TProofLite.cxx:1837
 TProofLite.cxx:1838
 TProofLite.cxx:1839
 TProofLite.cxx:1840
 TProofLite.cxx:1841
 TProofLite.cxx:1842
 TProofLite.cxx:1843
 TProofLite.cxx:1844
 TProofLite.cxx:1845
 TProofLite.cxx:1846
 TProofLite.cxx:1847
 TProofLite.cxx:1848
 TProofLite.cxx:1849
 TProofLite.cxx:1850
 TProofLite.cxx:1851
 TProofLite.cxx:1852
 TProofLite.cxx:1853
 TProofLite.cxx:1854
 TProofLite.cxx:1855
 TProofLite.cxx:1856
 TProofLite.cxx:1857
 TProofLite.cxx:1858
 TProofLite.cxx:1859
 TProofLite.cxx:1860
 TProofLite.cxx:1861
 TProofLite.cxx:1862
 TProofLite.cxx:1863
 TProofLite.cxx:1864
 TProofLite.cxx:1865
 TProofLite.cxx:1866
 TProofLite.cxx:1867
 TProofLite.cxx:1868
 TProofLite.cxx:1869
 TProofLite.cxx:1870
 TProofLite.cxx:1871
 TProofLite.cxx:1872
 TProofLite.cxx:1873
 TProofLite.cxx:1874
 TProofLite.cxx:1875
 TProofLite.cxx:1876
 TProofLite.cxx:1877
 TProofLite.cxx:1878
 TProofLite.cxx:1879
 TProofLite.cxx:1880
 TProofLite.cxx:1881
 TProofLite.cxx:1882
 TProofLite.cxx:1883
 TProofLite.cxx:1884
 TProofLite.cxx:1885
 TProofLite.cxx:1886
 TProofLite.cxx:1887
 TProofLite.cxx:1888
 TProofLite.cxx:1889
 TProofLite.cxx:1890
 TProofLite.cxx:1891
 TProofLite.cxx:1892
 TProofLite.cxx:1893
 TProofLite.cxx:1894
 TProofLite.cxx:1895
 TProofLite.cxx:1896
 TProofLite.cxx:1897
 TProofLite.cxx:1898
 TProofLite.cxx:1899
 TProofLite.cxx:1900
 TProofLite.cxx:1901
 TProofLite.cxx:1902
 TProofLite.cxx:1903
 TProofLite.cxx:1904
 TProofLite.cxx:1905
 TProofLite.cxx:1906
 TProofLite.cxx:1907
 TProofLite.cxx:1908
 TProofLite.cxx:1909
 TProofLite.cxx:1910
 TProofLite.cxx:1911
 TProofLite.cxx:1912
 TProofLite.cxx:1913
 TProofLite.cxx:1914
 TProofLite.cxx:1915
 TProofLite.cxx:1916
 TProofLite.cxx:1917
 TProofLite.cxx:1918
 TProofLite.cxx:1919
 TProofLite.cxx:1920
 TProofLite.cxx:1921
 TProofLite.cxx:1922
 TProofLite.cxx:1923
 TProofLite.cxx:1924
 TProofLite.cxx:1925
 TProofLite.cxx:1926
 TProofLite.cxx:1927
 TProofLite.cxx:1928
 TProofLite.cxx:1929
 TProofLite.cxx:1930
 TProofLite.cxx:1931
 TProofLite.cxx:1932
 TProofLite.cxx:1933
 TProofLite.cxx:1934
 TProofLite.cxx:1935
 TProofLite.cxx:1936
 TProofLite.cxx:1937
 TProofLite.cxx:1938
 TProofLite.cxx:1939
 TProofLite.cxx:1940
 TProofLite.cxx:1941
 TProofLite.cxx:1942
 TProofLite.cxx:1943
 TProofLite.cxx:1944
 TProofLite.cxx:1945
 TProofLite.cxx:1946
 TProofLite.cxx:1947
 TProofLite.cxx:1948
 TProofLite.cxx:1949
 TProofLite.cxx:1950
 TProofLite.cxx:1951
 TProofLite.cxx:1952
 TProofLite.cxx:1953
 TProofLite.cxx:1954
 TProofLite.cxx:1955
 TProofLite.cxx:1956
 TProofLite.cxx:1957
 TProofLite.cxx:1958
 TProofLite.cxx:1959
 TProofLite.cxx:1960
 TProofLite.cxx:1961
 TProofLite.cxx:1962
 TProofLite.cxx:1963
 TProofLite.cxx:1964
 TProofLite.cxx:1965
 TProofLite.cxx:1966
 TProofLite.cxx:1967
 TProofLite.cxx:1968
 TProofLite.cxx:1969
 TProofLite.cxx:1970
 TProofLite.cxx:1971
 TProofLite.cxx:1972
 TProofLite.cxx:1973
 TProofLite.cxx:1974
 TProofLite.cxx:1975
 TProofLite.cxx:1976
 TProofLite.cxx:1977
 TProofLite.cxx:1978
 TProofLite.cxx:1979
 TProofLite.cxx:1980
 TProofLite.cxx:1981
 TProofLite.cxx:1982
 TProofLite.cxx:1983
 TProofLite.cxx:1984
 TProofLite.cxx:1985
 TProofLite.cxx:1986
 TProofLite.cxx:1987
 TProofLite.cxx:1988
 TProofLite.cxx:1989
 TProofLite.cxx:1990
 TProofLite.cxx:1991
 TProofLite.cxx:1992
 TProofLite.cxx:1993
 TProofLite.cxx:1994
 TProofLite.cxx:1995
 TProofLite.cxx:1996
 TProofLite.cxx:1997
 TProofLite.cxx:1998
 TProofLite.cxx:1999
 TProofLite.cxx:2000
 TProofLite.cxx:2001
 TProofLite.cxx:2002
 TProofLite.cxx:2003
 TProofLite.cxx:2004
 TProofLite.cxx:2005
 TProofLite.cxx:2006
 TProofLite.cxx:2007
 TProofLite.cxx:2008
 TProofLite.cxx:2009
 TProofLite.cxx:2010
 TProofLite.cxx:2011
 TProofLite.cxx:2012
 TProofLite.cxx:2013
 TProofLite.cxx:2014
 TProofLite.cxx:2015
 TProofLite.cxx:2016
 TProofLite.cxx:2017
 TProofLite.cxx:2018
 TProofLite.cxx:2019
 TProofLite.cxx:2020
 TProofLite.cxx:2021
 TProofLite.cxx:2022
 TProofLite.cxx:2023
 TProofLite.cxx:2024
 TProofLite.cxx:2025
 TProofLite.cxx:2026
 TProofLite.cxx:2027
 TProofLite.cxx:2028
 TProofLite.cxx:2029
 TProofLite.cxx:2030
 TProofLite.cxx:2031
 TProofLite.cxx:2032
 TProofLite.cxx:2033
 TProofLite.cxx:2034
 TProofLite.cxx:2035
 TProofLite.cxx:2036
 TProofLite.cxx:2037
 TProofLite.cxx:2038
 TProofLite.cxx:2039
 TProofLite.cxx:2040
 TProofLite.cxx:2041
 TProofLite.cxx:2042
 TProofLite.cxx:2043
 TProofLite.cxx:2044
 TProofLite.cxx:2045
 TProofLite.cxx:2046
 TProofLite.cxx:2047
 TProofLite.cxx:2048
 TProofLite.cxx:2049
 TProofLite.cxx:2050
 TProofLite.cxx:2051
 TProofLite.cxx:2052
 TProofLite.cxx:2053
 TProofLite.cxx:2054
 TProofLite.cxx:2055
 TProofLite.cxx:2056
 TProofLite.cxx:2057
 TProofLite.cxx:2058
 TProofLite.cxx:2059
 TProofLite.cxx:2060
 TProofLite.cxx:2061
 TProofLite.cxx:2062
 TProofLite.cxx:2063
 TProofLite.cxx:2064
 TProofLite.cxx:2065
 TProofLite.cxx:2066
 TProofLite.cxx:2067
 TProofLite.cxx:2068
 TProofLite.cxx:2069
 TProofLite.cxx:2070
 TProofLite.cxx:2071
 TProofLite.cxx:2072
 TProofLite.cxx:2073
 TProofLite.cxx:2074
 TProofLite.cxx:2075
 TProofLite.cxx:2076
 TProofLite.cxx:2077
 TProofLite.cxx:2078
 TProofLite.cxx:2079
 TProofLite.cxx:2080
 TProofLite.cxx:2081
 TProofLite.cxx:2082
 TProofLite.cxx:2083
 TProofLite.cxx:2084
 TProofLite.cxx:2085
 TProofLite.cxx:2086
 TProofLite.cxx:2087
 TProofLite.cxx:2088
 TProofLite.cxx:2089
 TProofLite.cxx:2090
 TProofLite.cxx:2091
 TProofLite.cxx:2092
 TProofLite.cxx:2093
 TProofLite.cxx:2094
 TProofLite.cxx:2095
 TProofLite.cxx:2096
 TProofLite.cxx:2097
 TProofLite.cxx:2098
 TProofLite.cxx:2099
 TProofLite.cxx:2100
 TProofLite.cxx:2101
 TProofLite.cxx:2102
 TProofLite.cxx:2103
 TProofLite.cxx:2104
 TProofLite.cxx:2105
 TProofLite.cxx:2106
 TProofLite.cxx:2107
 TProofLite.cxx:2108
 TProofLite.cxx:2109
 TProofLite.cxx:2110
 TProofLite.cxx:2111
 TProofLite.cxx:2112
 TProofLite.cxx:2113
 TProofLite.cxx:2114
 TProofLite.cxx:2115
 TProofLite.cxx:2116
 TProofLite.cxx:2117
 TProofLite.cxx:2118
 TProofLite.cxx:2119
 TProofLite.cxx:2120
 TProofLite.cxx:2121
 TProofLite.cxx:2122
 TProofLite.cxx:2123
 TProofLite.cxx:2124
 TProofLite.cxx:2125
 TProofLite.cxx:2126
 TProofLite.cxx:2127
 TProofLite.cxx:2128
 TProofLite.cxx:2129
 TProofLite.cxx:2130
 TProofLite.cxx:2131
 TProofLite.cxx:2132
 TProofLite.cxx:2133
 TProofLite.cxx:2134
 TProofLite.cxx:2135
 TProofLite.cxx:2136
 TProofLite.cxx:2137
 TProofLite.cxx:2138
 TProofLite.cxx:2139
 TProofLite.cxx:2140
 TProofLite.cxx:2141
 TProofLite.cxx:2142
 TProofLite.cxx:2143
 TProofLite.cxx:2144
 TProofLite.cxx:2145
 TProofLite.cxx:2146
 TProofLite.cxx:2147
 TProofLite.cxx:2148
 TProofLite.cxx:2149
 TProofLite.cxx:2150
 TProofLite.cxx:2151
 TProofLite.cxx:2152
 TProofLite.cxx:2153
 TProofLite.cxx:2154
 TProofLite.cxx:2155
 TProofLite.cxx:2156
 TProofLite.cxx:2157
 TProofLite.cxx:2158
 TProofLite.cxx:2159
 TProofLite.cxx:2160
 TProofLite.cxx:2161
 TProofLite.cxx:2162
 TProofLite.cxx:2163
 TProofLite.cxx:2164
 TProofLite.cxx:2165
 TProofLite.cxx:2166
 TProofLite.cxx:2167
 TProofLite.cxx:2168
 TProofLite.cxx:2169
 TProofLite.cxx:2170
 TProofLite.cxx:2171
 TProofLite.cxx:2172
 TProofLite.cxx:2173
 TProofLite.cxx:2174
 TProofLite.cxx:2175
 TProofLite.cxx:2176
 TProofLite.cxx:2177
 TProofLite.cxx:2178
 TProofLite.cxx:2179
 TProofLite.cxx:2180
 TProofLite.cxx:2181
 TProofLite.cxx:2182
 TProofLite.cxx:2183
 TProofLite.cxx:2184
 TProofLite.cxx:2185
 TProofLite.cxx:2186
 TProofLite.cxx:2187
 TProofLite.cxx:2188
 TProofLite.cxx:2189
 TProofLite.cxx:2190
 TProofLite.cxx:2191
 TProofLite.cxx:2192
 TProofLite.cxx:2193
 TProofLite.cxx:2194
 TProofLite.cxx:2195
 TProofLite.cxx:2196
 TProofLite.cxx:2197
 TProofLite.cxx:2198
 TProofLite.cxx:2199
 TProofLite.cxx:2200
 TProofLite.cxx:2201
 TProofLite.cxx:2202
 TProofLite.cxx:2203
 TProofLite.cxx:2204
 TProofLite.cxx:2205
 TProofLite.cxx:2206
 TProofLite.cxx:2207
 TProofLite.cxx:2208
 TProofLite.cxx:2209
 TProofLite.cxx:2210
 TProofLite.cxx:2211
 TProofLite.cxx:2212
 TProofLite.cxx:2213
 TProofLite.cxx:2214
 TProofLite.cxx:2215
 TProofLite.cxx:2216
 TProofLite.cxx:2217
 TProofLite.cxx:2218
 TProofLite.cxx:2219
 TProofLite.cxx:2220
 TProofLite.cxx:2221
 TProofLite.cxx:2222
 TProofLite.cxx:2223
 TProofLite.cxx:2224
 TProofLite.cxx:2225
 TProofLite.cxx:2226
 TProofLite.cxx:2227
 TProofLite.cxx:2228
 TProofLite.cxx:2229
 TProofLite.cxx:2230
 TProofLite.cxx:2231
 TProofLite.cxx:2232
 TProofLite.cxx:2233
 TProofLite.cxx:2234
 TProofLite.cxx:2235
 TProofLite.cxx:2236
 TProofLite.cxx:2237
 TProofLite.cxx:2238
 TProofLite.cxx:2239
 TProofLite.cxx:2240
 TProofLite.cxx:2241
 TProofLite.cxx:2242
 TProofLite.cxx:2243
 TProofLite.cxx:2244
 TProofLite.cxx:2245
 TProofLite.cxx:2246
 TProofLite.cxx:2247
 TProofLite.cxx:2248
 TProofLite.cxx:2249
 TProofLite.cxx:2250
 TProofLite.cxx:2251
 TProofLite.cxx:2252
 TProofLite.cxx:2253
 TProofLite.cxx:2254
 TProofLite.cxx:2255
 TProofLite.cxx:2256
 TProofLite.cxx:2257
 TProofLite.cxx:2258
 TProofLite.cxx:2259
 TProofLite.cxx:2260
 TProofLite.cxx:2261
 TProofLite.cxx:2262
 TProofLite.cxx:2263
 TProofLite.cxx:2264
 TProofLite.cxx:2265
 TProofLite.cxx:2266
 TProofLite.cxx:2267
 TProofLite.cxx:2268
 TProofLite.cxx:2269
 TProofLite.cxx:2270
 TProofLite.cxx:2271
 TProofLite.cxx:2272
 TProofLite.cxx:2273
 TProofLite.cxx:2274
 TProofLite.cxx:2275
 TProofLite.cxx:2276
 TProofLite.cxx:2277
 TProofLite.cxx:2278
 TProofLite.cxx:2279
 TProofLite.cxx:2280
 TProofLite.cxx:2281
 TProofLite.cxx:2282
 TProofLite.cxx:2283
 TProofLite.cxx:2284
 TProofLite.cxx:2285
 TProofLite.cxx:2286
 TProofLite.cxx:2287
 TProofLite.cxx:2288
 TProofLite.cxx:2289
 TProofLite.cxx:2290
 TProofLite.cxx:2291
 TProofLite.cxx:2292
 TProofLite.cxx:2293
 TProofLite.cxx:2294
 TProofLite.cxx:2295
 TProofLite.cxx:2296
 TProofLite.cxx:2297
 TProofLite.cxx:2298
 TProofLite.cxx:2299
 TProofLite.cxx:2300
 TProofLite.cxx:2301
 TProofLite.cxx:2302
 TProofLite.cxx:2303
 TProofLite.cxx:2304
 TProofLite.cxx:2305
 TProofLite.cxx:2306
 TProofLite.cxx:2307
 TProofLite.cxx:2308
 TProofLite.cxx:2309
 TProofLite.cxx:2310
 TProofLite.cxx:2311
 TProofLite.cxx:2312
 TProofLite.cxx:2313
 TProofLite.cxx:2314
 TProofLite.cxx:2315
 TProofLite.cxx:2316
 TProofLite.cxx:2317
 TProofLite.cxx:2318
 TProofLite.cxx:2319
 TProofLite.cxx:2320
 TProofLite.cxx:2321
 TProofLite.cxx:2322
 TProofLite.cxx:2323
 TProofLite.cxx:2324
 TProofLite.cxx:2325
 TProofLite.cxx:2326
 TProofLite.cxx:2327
 TProofLite.cxx:2328
 TProofLite.cxx:2329
 TProofLite.cxx:2330
 TProofLite.cxx:2331
 TProofLite.cxx:2332
 TProofLite.cxx:2333
 TProofLite.cxx:2334
 TProofLite.cxx:2335
 TProofLite.cxx:2336
 TProofLite.cxx:2337
 TProofLite.cxx:2338
 TProofLite.cxx:2339
 TProofLite.cxx:2340
 TProofLite.cxx:2341
 TProofLite.cxx:2342
 TProofLite.cxx:2343
 TProofLite.cxx:2344
 TProofLite.cxx:2345
 TProofLite.cxx:2346
 TProofLite.cxx:2347
 TProofLite.cxx:2348
 TProofLite.cxx:2349
 TProofLite.cxx:2350
 TProofLite.cxx:2351
 TProofLite.cxx:2352
 TProofLite.cxx:2353
 TProofLite.cxx:2354
 TProofLite.cxx:2355
 TProofLite.cxx:2356
 TProofLite.cxx:2357
 TProofLite.cxx:2358
 TProofLite.cxx:2359
 TProofLite.cxx:2360
 TProofLite.cxx:2361
 TProofLite.cxx:2362
 TProofLite.cxx:2363
 TProofLite.cxx:2364
 TProofLite.cxx:2365
 TProofLite.cxx:2366
 TProofLite.cxx:2367
 TProofLite.cxx:2368
 TProofLite.cxx:2369
 TProofLite.cxx:2370
 TProofLite.cxx:2371
 TProofLite.cxx:2372
 TProofLite.cxx:2373
 TProofLite.cxx:2374
 TProofLite.cxx:2375
 TProofLite.cxx:2376
 TProofLite.cxx:2377
 TProofLite.cxx:2378
 TProofLite.cxx:2379
 TProofLite.cxx:2380
 TProofLite.cxx:2381
 TProofLite.cxx:2382
 TProofLite.cxx:2383
 TProofLite.cxx:2384
 TProofLite.cxx:2385
 TProofLite.cxx:2386
 TProofLite.cxx:2387
 TProofLite.cxx:2388
 TProofLite.cxx:2389
 TProofLite.cxx:2390
 TProofLite.cxx:2391
 TProofLite.cxx:2392
 TProofLite.cxx:2393
 TProofLite.cxx:2394
 TProofLite.cxx:2395
 TProofLite.cxx:2396
 TProofLite.cxx:2397
 TProofLite.cxx:2398
 TProofLite.cxx:2399
 TProofLite.cxx:2400
 TProofLite.cxx:2401
 TProofLite.cxx:2402
 TProofLite.cxx:2403
 TProofLite.cxx:2404
 TProofLite.cxx:2405
 TProofLite.cxx:2406
 TProofLite.cxx:2407
 TProofLite.cxx:2408
 TProofLite.cxx:2409
 TProofLite.cxx:2410
 TProofLite.cxx:2411
 TProofLite.cxx:2412
 TProofLite.cxx:2413
 TProofLite.cxx:2414
 TProofLite.cxx:2415
 TProofLite.cxx:2416
 TProofLite.cxx:2417
 TProofLite.cxx:2418
 TProofLite.cxx:2419
 TProofLite.cxx:2420
 TProofLite.cxx:2421
 TProofLite.cxx:2422
 TProofLite.cxx:2423
 TProofLite.cxx:2424
 TProofLite.cxx:2425
 TProofLite.cxx:2426
 TProofLite.cxx:2427
 TProofLite.cxx:2428
 TProofLite.cxx:2429
 TProofLite.cxx:2430
 TProofLite.cxx:2431
 TProofLite.cxx:2432
 TProofLite.cxx:2433
 TProofLite.cxx:2434
 TProofLite.cxx:2435
 TProofLite.cxx:2436
 TProofLite.cxx:2437
 TProofLite.cxx:2438
 TProofLite.cxx:2439
 TProofLite.cxx:2440
 TProofLite.cxx:2441
 TProofLite.cxx:2442
 TProofLite.cxx:2443
 TProofLite.cxx:2444
 TProofLite.cxx:2445
 TProofLite.cxx:2446
 TProofLite.cxx:2447
 TProofLite.cxx:2448
 TProofLite.cxx:2449
 TProofLite.cxx:2450
 TProofLite.cxx:2451
 TProofLite.cxx:2452
 TProofLite.cxx:2453
 TProofLite.cxx:2454
 TProofLite.cxx:2455
 TProofLite.cxx:2456
 TProofLite.cxx:2457
 TProofLite.cxx:2458
 TProofLite.cxx:2459
 TProofLite.cxx:2460
 TProofLite.cxx:2461
 TProofLite.cxx:2462
 TProofLite.cxx:2463
 TProofLite.cxx:2464
 TProofLite.cxx:2465
 TProofLite.cxx:2466
 TProofLite.cxx:2467
 TProofLite.cxx:2468
 TProofLite.cxx:2469
 TProofLite.cxx:2470
 TProofLite.cxx:2471
 TProofLite.cxx:2472
 TProofLite.cxx:2473
 TProofLite.cxx:2474
 TProofLite.cxx:2475
 TProofLite.cxx:2476
 TProofLite.cxx:2477
 TProofLite.cxx:2478
 TProofLite.cxx:2479
 TProofLite.cxx:2480
 TProofLite.cxx:2481
 TProofLite.cxx:2482
 TProofLite.cxx:2483
 TProofLite.cxx:2484
 TProofLite.cxx:2485
 TProofLite.cxx:2486
 TProofLite.cxx:2487
 TProofLite.cxx:2488
 TProofLite.cxx:2489
 TProofLite.cxx:2490
 TProofLite.cxx:2491
 TProofLite.cxx:2492
 TProofLite.cxx:2493
 TProofLite.cxx:2494
 TProofLite.cxx:2495
 TProofLite.cxx:2496
 TProofLite.cxx:2497
 TProofLite.cxx:2498
 TProofLite.cxx:2499
 TProofLite.cxx:2500
 TProofLite.cxx:2501
 TProofLite.cxx:2502
 TProofLite.cxx:2503
 TProofLite.cxx:2504
 TProofLite.cxx:2505
 TProofLite.cxx:2506
 TProofLite.cxx:2507
 TProofLite.cxx:2508
 TProofLite.cxx:2509
 TProofLite.cxx:2510
 TProofLite.cxx:2511
 TProofLite.cxx:2512
 TProofLite.cxx:2513
 TProofLite.cxx:2514
 TProofLite.cxx:2515
 TProofLite.cxx:2516
 TProofLite.cxx:2517
 TProofLite.cxx:2518
 TProofLite.cxx:2519
 TProofLite.cxx:2520
 TProofLite.cxx:2521
 TProofLite.cxx:2522
 TProofLite.cxx:2523
 TProofLite.cxx:2524
 TProofLite.cxx:2525
 TProofLite.cxx:2526
 TProofLite.cxx:2527
 TProofLite.cxx:2528
 TProofLite.cxx:2529
 TProofLite.cxx:2530
 TProofLite.cxx:2531
 TProofLite.cxx:2532
 TProofLite.cxx:2533
 TProofLite.cxx:2534
 TProofLite.cxx:2535
 TProofLite.cxx:2536
 TProofLite.cxx:2537
 TProofLite.cxx:2538
 TProofLite.cxx:2539
 TProofLite.cxx:2540
 TProofLite.cxx:2541
 TProofLite.cxx:2542
 TProofLite.cxx:2543
 TProofLite.cxx:2544
 TProofLite.cxx:2545
 TProofLite.cxx:2546
 TProofLite.cxx:2547
 TProofLite.cxx:2548
 TProofLite.cxx:2549