ROOT logo
// @(#)root/tree:$Id: TNtuple.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Rene Brun   06/04/96

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TNtuple
#define ROOT_TNtuple


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TNtuple                                                              //
//                                                                      //
// A simple tree with branches of floats.                               //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TTree
#include "TTree.h"
#endif

class TBrowser;

class TNtuple : public TTree {

protected:
   Int_t       fNvar;            //  Number of columns
   Float_t    *fArgs;            //! [fNvar] Array of variables

   virtual Int_t  Fill();

private:
   TNtuple(const TNtuple&);             // not implemented
   TNtuple& operator=(const TNtuple&);  // not implmeneted

public:
   TNtuple();
   TNtuple(const char *name,const char *title, const char *varlist, Int_t bufsize=32000);
   virtual ~TNtuple();

   virtual void      Browse(TBrowser *b);
   virtual Int_t     Fill(const Float_t *x);
           Int_t     Fill(Int_t x0) { return Fill((Float_t)x0); }
           Int_t     Fill(Double_t x0) { return Fill((Float_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);
   virtual Int_t     GetNvar() const { return fNvar; }
           Float_t  *GetArgs() const { return fArgs; }
   virtual Long64_t  ReadFile(const char *filename, const char *branchDescriptor="");
   virtual void      ResetBranchAddress(TBranch *);
           void      ResetBranchAddresses();

   ClassDef(TNtuple,2);  //A simple tree with branches of floats.
};

#endif
 TNtuple.h:1
 TNtuple.h:2
 TNtuple.h:3
 TNtuple.h:4
 TNtuple.h:5
 TNtuple.h:6
 TNtuple.h:7
 TNtuple.h:8
 TNtuple.h:9
 TNtuple.h:10
 TNtuple.h:11
 TNtuple.h:12
 TNtuple.h:13
 TNtuple.h:14
 TNtuple.h:15
 TNtuple.h:16
 TNtuple.h:17
 TNtuple.h:18
 TNtuple.h:19
 TNtuple.h:20
 TNtuple.h:21
 TNtuple.h:22
 TNtuple.h:23
 TNtuple.h:24
 TNtuple.h:25
 TNtuple.h:26
 TNtuple.h:27
 TNtuple.h:28
 TNtuple.h:29
 TNtuple.h:30
 TNtuple.h:31
 TNtuple.h:32
 TNtuple.h:33
 TNtuple.h:34
 TNtuple.h:35
 TNtuple.h:36
 TNtuple.h:37
 TNtuple.h:38
 TNtuple.h:39
 TNtuple.h:40
 TNtuple.h:41
 TNtuple.h:42
 TNtuple.h:43
 TNtuple.h:44
 TNtuple.h:45
 TNtuple.h:46
 TNtuple.h:47
 TNtuple.h:48
 TNtuple.h:49
 TNtuple.h:50
 TNtuple.h:51
 TNtuple.h:52
 TNtuple.h:53
 TNtuple.h:54
 TNtuple.h:55
 TNtuple.h:56
 TNtuple.h:57
 TNtuple.h:58
 TNtuple.h:59
 TNtuple.h:60
 TNtuple.h:61
 TNtuple.h:62
 TNtuple.h:63
 TNtuple.h:64
 TNtuple.h:65