library: libTree #include "TNtuple.h"

# TNtuple

class description - source file - inheritance tree (.ps)

## class TNtuple : public TTree

| Inheritance Chart:

`TObject`

<-

`TNamed`

`TAttLine`

`TAttFill`

`TAttMarker`

<-

`TTree`

<-

`TNtuple`

        protected:

          virtual Int_t Fill()

        public:

                          TNtuple()
                          TNtuple(const char* name, const char* title, const char* varlist, Int_t bufsize = 32000)
                  virtual ~TNtuple()
             virtual void Browse(TBrowser* b)
           static TClass* Class()
            virtual Int_t Fill(const Float_t* x)
                    Int_t Fill(Int_t x0)
                    Int_t Fill(Double_t x0)
            virtual Int_t Fill(Float_t x0, Float_t x1 = 0, Float_t x2 = 0, Float_t x3 = 0, Float_t x4 = 0, Float_t x5 = 0, Float_t x6 = 0, Float_t x7 = 0, Float_t x8 = 0, Float_t x9 = 0, Float_t x10 = 0, Float_t x11 = 0, Float_t x12 = 0, Float_t x13 = 0, Float_t x14 = 0)
                 Float_t* GetArgs() const
            virtual Int_t GetNvar() const
          virtual TClass* IsA() const
            virtual Int_t ReadFile(const char* filename)
             virtual void ResetBranchAddresses()
             virtual void ShowMembers(TMemberInspector& insp, char* parent)
             virtual void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)

### Data Members

        protected:

             Int_t fNvar  Number of columns
          Float_t* fArgs  ! [fNvar] Array of variables

## Class Description

     TNtuple

     A simple tree restricted to a list of float variables only.

     Each variable goes to a separate branch.

      A Ntuple is created via
         TNtuple(name,title,varlist,bufsize)
      It is filled via:
         TNtuple::Fill(*x)  or
         TNtuple::Fill(v1,v2,v3.....)

TNtuple(): TTree()

    *-*-*-*-*-*Default constructor for Ntuple*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*        ==============================

TNtuple(const char *name, const char *title, const char *varlist, Int_t bufsize) :TTree(name,title)

    *-*-*-*-*-*-*-*-*-*-*-*-*Create an Ntuple*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*                      ================
           The parameter varlist describes the list of the ntuple variables
           separated by a colon:
             example:  "x:y:z:energy"
           For each variable in the list a separate branch is created.

           Use TTree to create branches with variables of different data types.
    *-*

~TNtuple()

    *-*-*-*-*-*Default destructor for an Ntuple*-*-*-*-*-*-*-*-*-*-*-*
    *-*        ================================

void ResetBranchAddresses()

     Reset the branch addresses to the internal fArgs array. Use this
     method when the addresses were changed via calls to SetBranchAddress().

void Browse(TBrowser *b)

Int_t Fill()

    *-*-*-*-*-*-*-*-*Fill a Ntuple with current values in fArgs*-*-*-*-*-*-*
    *-*              ==========================================
     Note that this function is protected.
     Currently called only by TChain::Merge

Int_t Fill(const Float_t *x)

     Fill a Ntuple with an array of floats

Int_t Fill(Float_t x0,Float_t x1,Float_t x2,Float_t x3,Float_t x4 ,Float_t x5,Float_t x6,Float_t x7,Float_t x8,Float_t x9 ,Float_t x10,Float_t x11,Float_t x12,Float_t x13,Float_t x14)

     Fill a Ntuple: Each Ntuple item is an argument

Int_t ReadFile(const char *filename)

     Read from filename as many columns as variables in the ntuple
     the function returns the number of rows found in the file

void Streamer(TBuffer &b)

    *-*-*-*-*-*-*-*-*Stream a class object*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*              =========================================

### Inline Functions

                  Int_t Fill(Double_t x0)
                  Int_t Fill(Float_t x0, Float_t x1 = 0, Float_t x2 = 0, Float_t x3 = 0, Float_t x4 = 0, Float_t x5 = 0, Float_t x6 = 0, Float_t x7 = 0, Float_t x8 = 0, Float_t x9 = 0, Float_t x10 = 0, Float_t x11 = 0, Float_t x12 = 0, Float_t x13 = 0, Float_t x14 = 0)
                  Int_t GetNvar() const
               Float_t* GetArgs() const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void StreamerNVirtual(TBuffer& b)

Author: Rene Brun 06/04/96
Last update: root/tree:$Name: $:$Id: TNtuple.cxx,v 1.8 2004/07/01 21:27:36 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *