ROOT  6.06/09
Reference Guide
TNtupleD.h
Go to the documentation of this file.
1 // @(#)root/tree:$Id$
2 // Author: Rene Brun 06/04/96
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TNtupleD
13 #define ROOT_TNtupleD
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TNtupleD //
19 // //
20 // A simple tree with branches of doubles. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TTree
25 #include "TTree.h"
26 #endif
27 
28 class TBrowser;
29 
30 class TNtupleD : public TTree {
31 
32 protected:
33  Int_t fNvar; // Number of columns
34  Double_t *fArgs; //! [fNvar] Array of variables
35 
36  virtual Int_t Fill();
37 
38 private:
39  TNtupleD(const TNtupleD&); // not implemented
40  TNtupleD& operator=(const TNtupleD&); // not implemented
41 
42 public:
43  TNtupleD();
44  TNtupleD(const char *name,const char *title, const char *varlist, Int_t bufsize=32000);
45  virtual ~TNtupleD();
46 
47  virtual void Browse(TBrowser *b);
48  virtual Int_t Fill(const Double_t *x);
49  virtual Int_t Fill(Double_t x0, Double_t x1, Double_t x2=0, Double_t x3=0,
50  Double_t x4=0, Double_t x5=0, Double_t x6=0, Double_t x7=0,
51  Double_t x8=0, Double_t x9=0, Double_t x10=0,
52  Double_t x11=0, Double_t x12=0, Double_t x13=0,
53  Double_t x14=0);
54  virtual Int_t GetNvar() const { return fNvar; }
55  Double_t *GetArgs() const { return fArgs; }
56  virtual Long64_t ReadStream(std::istream& inputstream, const char *branchDescriptor="", char delimiter = ' ');
57  virtual void ResetBranchAddress(TBranch *);
58  void ResetBranchAddresses();
59 
60  ClassDef(TNtupleD,1) //A simple tree with branches of floats.
61 };
62 
63 #endif
virtual ~TNtupleD()
Default destructor for an Ntuple.
Definition: TNtupleD.cxx:101
virtual Int_t Fill()
[fNvar] Array of variables
Definition: TNtupleD.cxx:147
long long Long64_t
Definition: RtypesCore.h:69
A simple TTree restricted to a list of double variables only.
Definition: TNtupleD.h:30
virtual void Browse(TBrowser *b)
Browse content.
Definition: TNtupleD.cxx:136
int Int_t
Definition: RtypesCore.h:41
static const double x2[5]
Double_t x[n]
Definition: legend1.C:17
Double_t * fArgs
Definition: TNtupleD.h:34
TNtupleD & operator=(const TNtupleD &)
static const double x4[22]
ClassDef(TAttLine, 2)
Int_t fNvar
Definition: TNtupleD.h:33
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
virtual Long64_t ReadStream(std::istream &inputstream, const char *branchDescriptor="", char delimiter= ' ')
Read from filename as many columns as variables in the ntuple the function returns the number of rows...
Definition: TNtupleD.cxx:197
Double_t * GetArgs() const
Definition: TNtupleD.h:55
virtual Int_t GetNvar() const
Definition: TNtupleD.h:54
static const double x1[5]
double Double_t
Definition: RtypesCore.h:55
virtual void ResetBranchAddress(TBranch *)
Reset the branch addresses to the internal fArgs array.
Definition: TNtupleD.cxx:111
#define name(a, b)
Definition: linkTestLib0.cpp:5
A TTree object has a header with a name and a title.
Definition: TTree.h:94
A TTree is a list of TBranches.
Definition: TBranch.h:58
void ResetBranchAddresses()
Reset the branch addresses to the internal fArgs array.
Definition: TNtupleD.cxx:125
static const double x3[11]