TNtuple.h

Go to the documentation of this file.
00001 // @(#)root/tree:$Id: TNtuple.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Rene Brun   06/04/96
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TNtuple
00013 #define ROOT_TNtuple
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TNtuple                                                              //
00019 //                                                                      //
00020 // A simple tree with branches of floats.                               //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TTree
00025 #include "TTree.h"
00026 #endif
00027 
00028 class TBrowser;
00029 
00030 class TNtuple : public TTree {
00031 
00032 protected:
00033    Int_t       fNvar;            //  Number of columns
00034    Float_t    *fArgs;            //! [fNvar] Array of variables
00035 
00036    virtual Int_t  Fill();
00037 
00038 private:
00039    TNtuple(const TNtuple&);             // not implemented
00040    TNtuple& operator=(const TNtuple&);  // not implmeneted
00041 
00042 public:
00043    TNtuple();
00044    TNtuple(const char *name,const char *title, const char *varlist, Int_t bufsize=32000);
00045    virtual ~TNtuple();
00046 
00047    virtual void      Browse(TBrowser *b);
00048    virtual Int_t     Fill(const Float_t *x);
00049            Int_t     Fill(Int_t x0) { return Fill((Float_t)x0); }
00050            Int_t     Fill(Double_t x0) { return Fill((Float_t)x0); }
00051    virtual Int_t     Fill(Float_t x0, Float_t x1=0, Float_t x2=0, Float_t x3=0,
00052                           Float_t x4=0, Float_t x5=0, Float_t x6=0, Float_t x7=0,
00053                           Float_t x8=0, Float_t x9=0, Float_t x10=0,
00054                           Float_t x11=0, Float_t x12=0, Float_t x13=0,
00055                           Float_t x14=0);
00056    virtual Int_t     GetNvar() const { return fNvar; }
00057            Float_t  *GetArgs() const { return fArgs; }
00058    virtual Long64_t  ReadFile(const char *filename, const char *branchDescriptor="");
00059    virtual void      ResetBranchAddress(TBranch *);
00060            void      ResetBranchAddresses();
00061 
00062    ClassDef(TNtuple,2);  //A simple tree with branches of floats.
00063 };
00064 
00065 #endif

Generated on Tue Jul 5 14:27:41 2011 for ROOT_528-00b_version by  doxygen 1.5.1