Warning, file /include/root/TQueryResult.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TQueryResult
0013 #define ROOT_TQueryResult
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "TNamed.h"
0025 #include "TDatime.h"
0026 #include "TString.h"
0027
0028 #ifdef R__LESS_INCLUDES
0029 class TMacro;
0030 #else
0031 #include "TMacro.h"
0032 #endif
0033
0034 class TBrowser;
0035 class TTreePlayer;
0036 class TQueryResult;
0037
0038 bool operator==(const TQueryResult &qr1, const TQueryResult &qr2);
0039
0040
0041 class TQueryResult : public TNamed {
0042
0043 friend class TTreePlayer;
0044 friend class TProofPlayerLite;
0045 friend class TProofPlayerRemote;
0046 friend class TProof;
0047 friend class TProofLite;
0048 friend class TProofServ;
0049 friend class TQueryResultManager;
0050
0051 public:
0052 enum EQueryStatus {
0053 kAborted = 0, kSubmitted, kRunning, kStopped, kCompleted
0054 };
0055
0056 protected:
0057 Int_t fSeqNum;
0058 bool fDraw;
0059 EQueryStatus fStatus;
0060 TDatime fStart;
0061 TDatime fEnd;
0062 Float_t fUsedCPU;
0063 TString fOptions;
0064 TList *fInputList;
0065 Long64_t fEntries;
0066 Long64_t fFirst;
0067 Long64_t fBytes;
0068 TMacro *fLogFile;
0069 TMacro *fSelecHdr;
0070 TMacro *fSelecImp;
0071 TString fLibList;
0072 TString fParList;
0073 TList *fOutputList;
0074 bool fFinalized;
0075 bool fArchived;
0076 TString fResultFile;
0077 Float_t fPrepTime;
0078 Float_t fInitTime;
0079 Float_t fProcTime;
0080 Float_t fMergeTime;
0081 Float_t fRecvTime;
0082 Float_t fTermTime;
0083 Int_t fNumWrks;
0084 Int_t fNumMergers;
0085
0086 TQueryResult(Int_t seqnum, const char *opt, TList *inlist,
0087 Long64_t entries, Long64_t first,
0088 const char *selec);
0089
0090 void AddInput(TObject *obj);
0091 void AddLogLine(const char *logline);
0092 TQueryResult *CloneInfo();
0093 virtual void RecordEnd(EQueryStatus status, TList *outlist = nullptr);
0094 void SaveSelector(const char *selec);
0095 void SetArchived(const char *archfile);
0096 virtual void SetFinalized() { fFinalized = true; }
0097 virtual void SetInputList(TList *in, bool adopt = true);
0098 virtual void SetOutputList(TList *out, bool adopt = true);
0099 virtual void SetProcessInfo(Long64_t ent, Float_t cpu = 0.,
0100 Long64_t siz = -1,
0101 Float_t inittime = 0., Float_t proctime = 0.);
0102 void SetPrepTime(Float_t preptime) { fPrepTime = preptime; }
0103 void SetMergeTime(Float_t mergetime) { fMergeTime = mergetime; }
0104 void SetRecvTime(Float_t recvtime) { fRecvTime = recvtime; }
0105 void SetTermTime(Float_t termtime) { fTermTime = termtime; }
0106 void SetNumMergers(Int_t nmergers) { fNumMergers = nmergers; }
0107
0108 public:
0109 TQueryResult() : fSeqNum(-1), fDraw(false), fStatus(kSubmitted), fUsedCPU(0.),
0110 fInputList(nullptr), fEntries(-1), fFirst(-1), fBytes(0),
0111 fLogFile(nullptr), fSelecHdr(nullptr), fSelecImp(nullptr),
0112 fLibList("-"), fOutputList(nullptr),
0113 fFinalized(false), fArchived(false), fPrepTime(0.),
0114 fInitTime(0.), fProcTime(0.), fMergeTime(0.),
0115 fRecvTime(-1), fTermTime(0.), fNumWrks(-1), fNumMergers(-1) { }
0116 ~TQueryResult() override;
0117
0118 void Browse(TBrowser *b = nullptr) override;
0119
0120 Int_t GetSeqNum() const { return fSeqNum; }
0121 EQueryStatus GetStatus() const { return fStatus; }
0122 TDatime GetStartTime() const { return fStart; }
0123 TDatime GetEndTime() const { return fEnd; }
0124 const char *GetOptions() const { return fOptions; }
0125 TList *GetInputList() { return fInputList; }
0126 TObject *GetInputObject(const char *classname) const;
0127 Long64_t GetEntries() const { return fEntries; }
0128 Long64_t GetFirst() const { return fFirst; }
0129 Long64_t GetBytes() const { return fBytes; }
0130 Float_t GetUsedCPU() const { return fUsedCPU; }
0131 TMacro *GetLogFile() const { return fLogFile; }
0132 TMacro *GetSelecHdr() const { return fSelecHdr; }
0133 TMacro *GetSelecImp() const { return fSelecImp; }
0134 const char *GetLibList() const { return fLibList; }
0135 const char *GetParList() const { return fParList; }
0136 TList *GetOutputList() { return fOutputList; }
0137 const char *GetResultFile() const { return fResultFile; }
0138 Float_t GetPrepTime() const { return fPrepTime; }
0139 Float_t GetInitTime() const { return fInitTime; }
0140 Float_t GetProcTime() const { return fProcTime; }
0141 Float_t GetMergeTime() const { return fMergeTime; }
0142 Float_t GetRecvTime() const { return fRecvTime; }
0143 Float_t GetTermTime() const { return fTermTime; }
0144 Int_t GetNumWrks() const { return fNumWrks; }
0145 Int_t GetNumMergers() const { return fNumMergers; }
0146
0147 bool IsArchived() const { return fArchived; }
0148 virtual bool IsDone() const { return (fStatus > kRunning); }
0149 bool IsDraw() const { return fDraw; }
0150 bool IsFinalized() const { return fFinalized; }
0151
0152 bool Matches(const char *ref);
0153
0154 void Print(Option_t *opt = "") const override;
0155
0156 ClassDefOverride(TQueryResult,5)
0157 };
0158
0159 inline bool operator!=(const TQueryResult &qr1, const TQueryResult &qr2)
0160 { return !(qr1 == qr2); }
0161
0162 #endif