Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:12

0001 // @(#)root/tree:$Id$
0002 // Author: Rene Brun   12/01/96
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TLeafF
0013 #define ROOT_TLeafF
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TLeafF                                                               //
0019 //                                                                      //
0020 // A TLeaf for a 32 bit floating point data type.                       //
0021 //                                                                      //
0022 //////////////////////////////////////////////////////////////////////////
0023 
0024 #include "TLeaf.h"
0025 
0026 class TLeafF : public TLeaf {
0027 
0028 protected:
0029    Float_t       fMinimum;         ///<  Minimum value if leaf range is specified
0030    Float_t       fMaximum;         ///<  Maximum value if leaf range is specified
0031    Float_t       *fValue;          ///<! Pointer to data buffer
0032    Float_t       **fPointer;       ///<! Address of pointer to data buffer!
0033 
0034 public:
0035    TLeafF();
0036    TLeafF(TBranch *parent, const char *name, const char *type);
0037    ~TLeafF() override;
0038 
0039    void            Export(TClonesArray *list, Int_t n) override;
0040    void            FillBasket(TBuffer &b) override;
0041    DeserializeType GetDeserializeType() const override { return DeserializeType::kInPlace; }
0042    const char     *GetTypeName() const override { return "Float_t"; }
0043    Double_t        GetValue(Int_t i=0) const override;
0044    void           *GetValuePointer() const override { return fValue; }
0045    void            Import(TClonesArray *list, Int_t n) override;
0046    void            PrintValue(Int_t i=0) const override;
0047    void            ReadBasket(TBuffer &b) override;
0048    void            ReadBasketExport(TBuffer &b, TClonesArray *list, Int_t n) override;
0049    void            ReadValue(std::istream& s, Char_t delim = ' ') override;
0050    void            SetAddress(void *add = nullptr) override;
0051 
0052    bool            ReadBasketFast(TBuffer&, Long64_t) override;
0053 
0054    ClassDefOverride(TLeafF,1);  //A TLeaf for a 32 bit floating point data type.
0055 };
0056 
0057 // if leaf is a simple type, i must be set to 0
0058 // if leaf is an array, i is the array element number to be returned
0059 inline Double_t TLeafF::GetValue(Int_t i) const { return fValue[i]; }
0060 
0061 #endif