ROOT logo
// @(#)root/tree:$Id: TLeafF.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Rene Brun   12/01/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_TLeafF
#define ROOT_TLeafF


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TLeafF                                                               //
//                                                                      //
// A TLeaf for a 32 bit floating point data type.                       //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TLeaf
#include "TLeaf.h"
#endif

class TLeafF : public TLeaf {

protected:
   Float_t       fMinimum;         //Minimum value if leaf range is specified
   Float_t       fMaximum;         //Maximum value if leaf range is specified
   Float_t       *fValue;          //!Pointer to data buffer
   Float_t       **fPointer;       //!Addresss of pointer to data buffer!

public:
   TLeafF();
   TLeafF(TBranch *parent, const char *name, const char *type);
   virtual ~TLeafF();
   
   virtual void    Export(TClonesArray *list, Int_t n);
   virtual void    FillBasket(TBuffer &b);
   const char     *GetTypeName() const {return "Float_t";}
   Double_t        GetValue(Int_t i=0) const;
   virtual void   *GetValuePointer() const {return fValue;}
   virtual void    Import(TClonesArray *list, Int_t n);
   virtual void    PrintValue(Int_t i=0) const;
   virtual void    ReadBasket(TBuffer &b);
   virtual void    ReadBasketExport(TBuffer &b, TClonesArray *list, Int_t n);
   virtual void    ReadValue(ifstream & s);
   virtual void    SetAddress(void *add=0);
   
   ClassDef(TLeafF,1);  //A TLeaf for a 32 bit floating point data type.
};

// if leaf is a simple type, i must be set to 0
// if leaf is an array, i is the array element number to be returned
inline Double_t TLeafF::GetValue(Int_t i) const { return fValue[i]; }

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