00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TProofLite
00013 #define ROOT_TProofLite
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef ROOT_TProof
00028 #include "TProof.h"
00029 #endif
00030
00031 class TDSet;
00032 class TList;
00033 class TQueryResultManager;
00034 class TDataSetManager;
00035 class TProofLockPath;
00036 class TProofMgr;
00037 class TProofQueryResult;
00038 class TServerSocket;
00039 class TSelector;
00040
00041 class TProofLite : public TProof {
00042
00043 friend class TProofPlayerLite;
00044
00045 private:
00046 Int_t fNWorkers;
00047 TString fSandbox;
00048 TString fCacheDir;
00049 TString fQueryDir;
00050 TString fDataSetDir;
00051 TString fSockPath;
00052 TServerSocket *fServSock;
00053 Bool_t fForkStartup;
00054
00055 TString fVarExp;
00056 TString fSelection;
00057
00058 TProofLockPath *fCacheLock;
00059 TProofLockPath *fQueryLock;
00060 TQueryResultManager *fQMgr;
00061
00062 TDataSetManager *fDataSetManager;
00063
00064 static Int_t fgWrksMax;
00065
00066 TProofLite(const TProofLite &);
00067 void operator=(const TProofLite &);
00068
00069 Int_t CleanupSandbox();
00070 Int_t CreateSandbox();
00071 void FindUniqueSlaves();
00072 void NotifyStartUp(const char *action, Int_t done, Int_t tot);
00073 Int_t SetProofServEnv(const char *ord);
00074 Int_t InitDataSetManager();
00075 Int_t RegisterDataSets(TList *in, TList *out);
00076 void ResolveKeywords(TString &s, const char *logfile);
00077
00078 void SendInputDataFile();
00079
00080 protected:
00081 TProofLite() : TProof() { }
00082
00083 Int_t CreateSymLinks(TList *files);
00084 Int_t Init(const char *masterurl, const char *conffile,
00085 const char *confdir, Int_t loglevel,
00086 const char *alias = 0);
00087 TProofQueryResult *MakeQueryResult(Long64_t nent, const char *opt,
00088 Long64_t fst, TDSet *dset,
00089 const char *selec);
00090 void SetQueryRunning(TProofQueryResult *pq);
00091 Int_t SetupWorkers(Int_t opt = 0, TList *wrks = 0);
00092 Int_t CopyMacroToCache(const char *macro, Int_t headerRequired = 0,
00093 TSelector **selector = 0, Int_t opt = 0);
00094
00095 public:
00096 TProofLite(const char *masterurl, const char *conffile = kPROOF_ConfFile,
00097 const char *confdir = kPROOF_ConfDir, Int_t loglevel = 0,
00098 const char *alias = 0, TProofMgr *mgr = 0);
00099 virtual ~TProofLite();
00100
00101 void Print(Option_t *option="") const;
00102
00103 Long64_t DrawSelect(TDSet *dset, const char *varexp,
00104 const char *selection = "",
00105 Option_t *option = "", Long64_t nentries = -1,
00106 Long64_t firstentry = 0);
00107 Long64_t Process(TDSet *dset, const char *sel, Option_t *o = "",
00108 Long64_t nent = -1, Long64_t fst = 0);
00109 Long64_t Process(TFileCollection *fc, const char *sel, Option_t *o = "",
00110 Long64_t nent = -1, Long64_t fst = 0)
00111 { return TProof::Process(fc, sel, o, nent, fst); }
00112 Long64_t Process(const char *dsname, const char *sel, Option_t *o = "",
00113 Long64_t nent = -1, Long64_t fst = 0, TObject *enl = 0)
00114 { return TProof::Process(dsname, sel, o, nent, fst, enl); }
00115 Long64_t Process(const char *sel, Long64_t nent, Option_t *o = "")
00116 { return TProof::Process(sel, nent, o); }
00117
00118
00119 void ShowCache(Bool_t all = kFALSE);
00120 void ClearCache(const char *file = 0);
00121 Int_t Load(const char *macro, Bool_t notOnClient = kFALSE, Bool_t uniqueOnly = kTRUE,
00122 TList *wrks = 0);
00123
00124
00125 TList *GetListOfQueries(Option_t *opt = "");
00126 Int_t Remove(const char *ref, Bool_t all);
00127
00128
00129 Bool_t RegisterDataSet(const char *dsName, TFileCollection *ds, const char *opt = "");
00130 Bool_t ExistsDataSet(const char *uri);
00131 TMap *GetDataSets(const char *uri = "", const char * = 0);
00132 void ShowDataSets(const char *uri = "", const char * = 0);
00133 TFileCollection *GetDataSet(const char *uri, const char * = 0);
00134 Int_t RemoveDataSet(const char *uri, const char * = 0);
00135 Int_t VerifyDataSet(const char *uri, const char * = 0);
00136 Int_t SetDataSetTreeName( const char *dataset, const char *treename);
00137 void ShowDataSetCache(const char *dataset = 0);
00138 void ClearDataSetCache(const char *dataset = 0);
00139
00140
00141 TTree *GetTreeHeader(TDSet *tdset);
00142
00143 static Int_t GetNumberOfWorkers(const char *url = 0);
00144
00145 ClassDef(TProofLite,0)
00146 };
00147
00148 #endif