Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TLeafG.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/tree:$Id$
0002 // Author: Enrico Guiraud
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2020, 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_TLeafG
0013 #define ROOT_TLeafG
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TLeafG                                                               //
0019 //                                                                      //
0020 // A TLeaf for a long integer data type.                                //
0021 //                                                                      //
0022 //////////////////////////////////////////////////////////////////////////
0023 
0024 
0025 #include "TLeaf.h"
0026 
0027 class TLeafG : public TLeaf {
0028 
0029 protected:
0030    Long_t     fMinimum;       ///<  Minimum value if leaf range is specified
0031    Long_t     fMaximum;       ///<  Maximum value if leaf range is specified
0032    Long_t    *fValue;         ///<! Pointer to data buffer
0033    Long_t   **fPointer;       ///<! Address of pointer to data buffer
0034 
0035 public:
0036    TLeafG();
0037    TLeafG(TBranch *parent, const char *name, const char *type);
0038    ~TLeafG() override;
0039 
0040    void            Export(TClonesArray *list, Int_t n) override;
0041    void            FillBasket(TBuffer &b) override;
0042    DeserializeType GetDeserializeType() const override { return DeserializeType::kInPlace; }
0043    const char     *GetTypeName() const override;
0044    Int_t           GetMaximum() const override { return (Int_t)fMaximum; }
0045    Int_t           GetMinimum() const override { return (Int_t)fMinimum; }
0046    Double_t        GetValue(Int_t i=0) const override;
0047    Long64_t        GetValueLong64(Int_t i = 0) const override;
0048    LongDouble_t    GetValueLongDouble(Int_t i = 0) const override;
0049    void           *GetValuePointer() const override { return fValue; }
0050    bool            IncludeRange(TLeaf *) override;
0051    void            Import(TClonesArray *list, Int_t n) override;
0052    void            PrintValue(Int_t i=0) const override;
0053    void            ReadBasket(TBuffer &b) override;
0054    void            ReadBasketExport(TBuffer &b, TClonesArray *list, Int_t n) override;
0055    bool            ReadBasketFast(TBuffer&, Long64_t) override;
0056    void            ReadValue(std::istream& s, Char_t delim = ' ') override;
0057    void            SetAddress(void *add=nullptr) override;
0058    virtual void    SetMaximum(Long_t max) {fMaximum = max;}
0059    virtual void    SetMinimum(Long_t min) {fMinimum = min;}
0060 
0061    ClassDefOverride(TLeafG,1);  //A TLeaf for a long integer data type.
0062 };
0063 
0064 // if leaf is a simple type, i must be set to 0
0065 // if leaf is an array, i is the array element number to be returned
0066 inline Long64_t TLeafG::GetValueLong64(Int_t i) const { return fValue[i]; }
0067 
0068 #endif