![]() |
|
|||
File indexing completed on 2025-07-05 09:09:41
0001 // @(#)root/tree:$Id$ 0002 // Author: Fons Rademakers 30/11/99 0003 0004 /************************************************************************* 0005 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * 0006 * All rights reserved. * 0007 * * 0008 * For the licensing terms see $ROOTSYS/LICENSE. * 0009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 0010 *************************************************************************/ 0011 0012 #ifndef ROOT_TTreeResult 0013 #define ROOT_TTreeResult 0014 0015 0016 ////////////////////////////////////////////////////////////////////////// 0017 // // 0018 // TTreeResult // 0019 // // 0020 // Class defining interface to a TTree query result with the same // 0021 // interface as for SQL databases. A TTreeResult is returned by // 0022 // TTree::Query() (actually TTreePlayer::Query()). // 0023 // // 0024 // Related classes are TTreeRow. // 0025 // // 0026 ////////////////////////////////////////////////////////////////////////// 0027 0028 #include "TSQLResult.h" 0029 0030 class TString; 0031 class TObjArray; 0032 0033 0034 class TTreeResult : public TSQLResult { 0035 0036 friend class TTreePlayer; 0037 0038 private: 0039 Int_t fColumnCount; ///< number of columns in result 0040 TString *fFields; ///<[fColumnCount] array containing field strings 0041 TObjArray *fResult; ///< query result (TTreeRow objects) 0042 Int_t fNextRow; ///< row iterator 0043 0044 bool IsValid(Int_t field); 0045 void AddField(Int_t field, const char *fieldname); 0046 void AddRow(TSQLRow *row); 0047 0048 public: 0049 TTreeResult(); 0050 TTreeResult(Int_t nfields); 0051 ~TTreeResult() override; 0052 0053 void Close(Option_t *option="") override; 0054 Int_t GetFieldCount() override; 0055 const char *GetFieldName(Int_t field) override; 0056 TObjArray *GetRows() const { return fResult; } 0057 TSQLRow *Next() override; 0058 0059 ClassDefOverride(TTreeResult,1) // TTree query result 0060 }; 0061 0062 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |