Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // @(#)root/treeplayer:$Id$
0002 // Author: Markus Frank 01/02/2006
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers and al.        *
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_TFormLeafInfoReference
0013 #define ROOT_TFormLeafInfoReference
0014 
0015 #include "TFormLeafInfo.h"
0016 
0017 // Forward declarations
0018 class TVirtualRefProxy;
0019 
0020 class TFormLeafInfoReference : public TFormLeafInfo {
0021    typedef TVirtualRefProxy Proxy;
0022 public:
0023    Proxy*      fProxy;         ///<! Cached pointer to reference proxy
0024    TBranch*    fBranch;        ///<! Cached pointer to branch object
0025 public:
0026    /// Initializing constructor
0027    TFormLeafInfoReference(TClass* classptr, TStreamerElement* element, int off);
0028    /// Copy constructor
0029    TFormLeafInfoReference(const TFormLeafInfoReference& orig);
0030    /// Default destructor
0031    ~TFormLeafInfoReference() override;
0032    /// Exception safe swap.
0033    void Swap(TFormLeafInfoReference &other);
0034    /// Exception safe assignment operator.
0035    TFormLeafInfoReference &operator=(const TFormLeafInfoReference &orig);
0036    /// Virtual copy constructor
0037    TFormLeafInfo* DeepCopy()  const override;
0038 
0039    /// Access to the info's proxy
0040    Proxy*           GetProxy()        const      {  return fProxy;        }
0041    /// Access to the info's connected branch
0042    TBranch*         GetBranch()       const      {  return fBranch;       }
0043    /// Access to the info's connected branch
0044    void             SetBranch(TBranch* branch) override
0045    {  fBranch = branch; if ( fNext ) fNext->SetBranch(branch);            }
0046    /// Access to the offset of the data
0047    virtual Int_t    GetOffset()       const     {  return fOffset;       }
0048    /// Return true only if the underlying data is an integral value
0049    bool     IsInteger()       const override     {  return false;         }
0050    /// Return true only if the underlying data is a string
0051    bool     IsString()        const override     {  return false;         }
0052    /// Return true only if the underlying data is a reference
0053    bool     IsReference()     const override     {  return true;          }
0054    /// Access to target class pointer (if available)
0055    TClass*  GetClass()        const override;
0056    /// Access to the value class of the reference proxy
0057    virtual TClass*  GetValueClass(TLeaf* from);
0058    /// Access to the value class from the object pointer
0059    virtual TClass*  GetValueClass(void* from);
0060    /// Return the address of the local value
0061    void    *GetLocalValuePointer( TLeaf *from, Int_t instance = 0) override;
0062    /// Return the address of the local value
0063    void    *GetLocalValuePointer(char *from, Int_t instance = 0) override;
0064    /// Return true if any of underlying data has a array size counter
0065    bool HasCounter() const override;
0066    /// Return the size of the underlying array for the current entry in the TTree.
0067    Int_t ReadCounterValue(char *where) override;
0068    /// Return the current size of the array container
0069    Int_t GetCounterValue(TLeaf* leaf) override;
0070 
0071    /// Access value of referenced object (macro from TFormLeafInfo.g)
0072    DECLARE_GETVAL( , override);
0073    /// Read value of referenced object
0074    DECLARE_READVAL( , override);
0075    /// TFormLeafInfo overload: Update (and propagate) cached information
0076    bool     Update() override;
0077 };
0078 
0079 #endif /* ROOT_TFormLeafInfoReference */