TLeafB.h

Go to the documentation of this file.
00001 // @(#)root/tree:$Id: TLeafB.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_TLeafB
00013 #define ROOT_TLeafB
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TLeafB                                                               //
00019 //                                                                      //
00020 // A TLeaf for an 8 bit Integer data type.                              //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TLeaf
00025 #include "TLeaf.h"
00026 #endif
00027 
00028 class TLeafB : public TLeaf {
00029 
00030 protected:
00031    Char_t       fMinimum;         //Minimum value if leaf range is specified
00032    Char_t       fMaximum;         //Maximum value if leaf range is specified
00033    Char_t       *fValue;          //!Pointer to data buffer
00034    Char_t       **fPointer;       //!Address of a pointer to data buffer!
00035 
00036 public:
00037    TLeafB();
00038    TLeafB(TBranch *parent, const char* name, const char* type);
00039    virtual ~TLeafB();
00040 
00041    virtual void    Export(TClonesArray* list, Int_t n);
00042    virtual void    FillBasket(TBuffer& b);
00043    virtual Int_t   GetMaximum() const { return fMaximum; }
00044    virtual Int_t   GetMinimum() const { return fMinimum; }
00045    const char     *GetTypeName() const;
00046    Double_t        GetValue(Int_t i = 0) const { return IsUnsigned() ? (Double_t)((UChar_t) fValue[i]) : (Double_t)fValue[i]; }
00047    virtual void   *GetValuePointer() const { return fValue; }
00048    virtual void    Import(TClonesArray* list, Int_t n);
00049    virtual void    PrintValue(Int_t i = 0) const;
00050    virtual void    ReadBasket(TBuffer&);
00051    virtual void    ReadBasketExport(TBuffer&, TClonesArray* list, Int_t n);
00052    virtual void    ReadValue(istream&);
00053    virtual void    SetAddress(void* addr = 0);
00054    virtual void    SetMaximum(Char_t max) { fMaximum = max; }
00055    virtual void    SetMinimum(Char_t min) { fMinimum = min; }
00056    
00057    ClassDef(TLeafB,1);  //A TLeaf for an 8 bit Integer data type.
00058 };
00059 
00060 #endif

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