00001 // @(#)root/tree:$Id: TLeafF.h 36407 2010-10-22 02:04:08Z pcanal $ 00002 // Author: Rene Brun 12/01/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_TLeafF 00013 #define ROOT_TLeafF 00014 00015 00016 ////////////////////////////////////////////////////////////////////////// 00017 // // 00018 // TLeafF // 00019 // // 00020 // A TLeaf for a 32 bit floating point data type. // 00021 // // 00022 ////////////////////////////////////////////////////////////////////////// 00023 00024 #ifndef ROOT_TLeaf 00025 #include "TLeaf.h" 00026 #endif 00027 00028 class TLeafF : public TLeaf { 00029 00030 protected: 00031 Float_t fMinimum; //Minimum value if leaf range is specified 00032 Float_t fMaximum; //Maximum value if leaf range is specified 00033 Float_t *fValue; //!Pointer to data buffer 00034 Float_t **fPointer; //!Addresss of pointer to data buffer! 00035 00036 public: 00037 TLeafF(); 00038 TLeafF(TBranch *parent, const char *name, const char *type); 00039 virtual ~TLeafF(); 00040 00041 virtual void Export(TClonesArray *list, Int_t n); 00042 virtual void FillBasket(TBuffer &b); 00043 const char *GetTypeName() const {return "Float_t";} 00044 Double_t GetValue(Int_t i=0) const; 00045 virtual void *GetValuePointer() const {return fValue;} 00046 virtual void Import(TClonesArray *list, Int_t n); 00047 virtual void PrintValue(Int_t i=0) const; 00048 virtual void ReadBasket(TBuffer &b); 00049 virtual void ReadBasketExport(TBuffer &b, TClonesArray *list, Int_t n); 00050 virtual void ReadValue(istream & s); 00051 virtual void SetAddress(void *add=0); 00052 00053 ClassDef(TLeafF,1); //A TLeaf for a 32 bit floating point data type. 00054 }; 00055 00056 // if leaf is a simple type, i must be set to 0 00057 // if leaf is an array, i is the array element number to be returned 00058 inline Double_t TLeafF::GetValue(Int_t i) const { return fValue[i]; } 00059 00060 #endif