Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:31

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_TTreeRow
0013 #define ROOT_TTreeRow
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TTreeRow                                                             //
0019 //                                                                      //
0020 // Class defining interface to a row of a TTree query result.           //
0021 // Objects of this class are created by TTreeResult methods.            //
0022 //                                                                      //
0023 // Related classes are TTreeResult.                                     //
0024 //                                                                      //
0025 //////////////////////////////////////////////////////////////////////////
0026 
0027 #include "TSQLRow.h"
0028 
0029 class TTreeRow : public TSQLRow {
0030 
0031 friend class TTreeResult;
0032 friend class TTreePlayer;
0033 
0034 private:
0035    Int_t        fColumnCount;  ///< number of columns in row
0036    Int_t       *fFields;       ///<[fColumnCount] index in fRow of the end of each field
0037    char        *fRow;          ///< string with all the fColumnCount fields
0038    TTreeRow    *fOriginal;     ///<! pointer to original row
0039 
0040    TTreeRow(TSQLRow *original);
0041    bool    IsValid(Int_t field);
0042 
0043    TTreeRow(const TTreeRow&) = delete;
0044    TTreeRow &operator=(const TTreeRow&) = delete;
0045 
0046 public:
0047    TTreeRow();
0048    TTreeRow(Int_t nfields);
0049    TTreeRow(Int_t nfields, const Int_t *fields, const char *row);
0050    ~TTreeRow() override;
0051 
0052    void        Close(Option_t *option="") override;
0053    ULong_t     GetFieldLength(Int_t field) override;
0054    const char *GetField(Int_t field) override;
0055    void        SetRow(const Int_t *fields, const char *row);
0056 
0057    ClassDefOverride(TTreeRow,1)  // One row of a TTree query result
0058 };
0059 
0060 #endif