Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TChainElement.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: Rene Brun   11/02/97
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 #ifndef ROOT_TChainElement
0012 #define ROOT_TChainElement
0013 
0014 
0015 //////////////////////////////////////////////////////////////////////////
0016 //                                                                      //
0017 // TChainElement                                                        //
0018 //                                                                      //
0019 // Describes a component of a TChain.                                   //
0020 //                                                                      //
0021 //////////////////////////////////////////////////////////////////////////
0022 
0023 
0024 #include "TNamed.h"
0025 
0026 class TBranch;
0027 
0028 class TChainElement : public TNamed {
0029 
0030    /// TChainElement status bits
0031    enum EStatusBits {
0032       kHasBeenLookedUp = BIT(15)
0033    };
0034 
0035 protected:
0036    Long64_t      fEntries;           ///<  Number of entries in the tree of this chain element
0037    Int_t         fNPackets;          ///<  Number of packets
0038    Int_t         fPacketSize;        ///<  Number of events in one packet for parallel root
0039    Int_t         fStatus;            ///<  branch status when used as a branch
0040    void         *fBaddress;          ///<! branch address when used as a branch
0041    TString       fBaddressClassName; ///<! Name of the class pointed to by fBaddress
0042    UInt_t        fBaddressType;      ///<! Type of the value pointed to by fBaddress
0043    bool          fBaddressIsPtr : 1; ///<! True if the address is a pointer to an address
0044    bool          fDecomposedObj : 1; ///<! True if the address needs the branch in MakeClass/DecomposedObj mode.
0045    bool          fCheckedType : 1;   ///<! True if the branch type and the address type have been checked.
0046    char         *fPackets;           ///<! Packet descriptor string
0047    TBranch     **fBranchPtr;         ///<! Address of user branch pointer (to updated upon loading a file)
0048    Int_t         fLoadResult;        ///<! Return value of TChain::LoadTree(); 0 means success
0049 
0050 public:
0051    TChainElement();
0052    TChainElement(const char *title, const char *filename);
0053    ~TChainElement() override;
0054    virtual void        CreatePackets();
0055    virtual void       *GetBaddress() const {return fBaddress;}
0056    virtual const char *GetBaddressClassName() const { return fBaddressClassName; }
0057    virtual bool        GetBaddressIsPtr() const { return fBaddressIsPtr; }
0058    virtual UInt_t      GetBaddressType() const { return fBaddressType; }
0059    virtual TBranch   **GetBranchPtr() const { return fBranchPtr; }
0060    virtual Long64_t    GetEntries() const {return fEntries;}
0061            Int_t       GetLoadResult() const { return fLoadResult; }
0062            bool        GetCheckedType() const { return fCheckedType; }
0063            bool        GetDecomposedObj() const { return fDecomposedObj; }
0064    virtual char       *GetPackets() const {return fPackets;}
0065    virtual Int_t       GetPacketSize() const {return fPacketSize;}
0066    virtual Int_t       GetStatus() const {return fStatus;}
0067    virtual bool        HasBeenLookedUp() { return TestBit(kHasBeenLookedUp); }
0068    void        ls(Option_t *option="") const override;
0069    virtual void        SetBaddress(void *add) {fBaddress = add;}
0070    virtual void        SetBaddressClassName(const char* clname) { fBaddressClassName = clname; }
0071    virtual void        SetBaddressIsPtr(bool isptr) { fBaddressIsPtr = isptr; }
0072    virtual void        SetBaddressType(UInt_t type) { fBaddressType = type; }
0073    virtual void        SetBranchPtr(TBranch **ptr) { fBranchPtr = ptr; }
0074            void        SetCheckedType(bool m) { fCheckedType = m; }
0075            void        SetDecomposedObj(bool m) { fDecomposedObj = m; }
0076            void        SetLoadResult(Int_t result) { fLoadResult = result; }
0077    virtual void        SetLookedUp(bool y = true);
0078    virtual void        SetNumberEntries(Long64_t n) {fEntries=n;}
0079    virtual void        SetPacketSize(Int_t size = 100);
0080    virtual void        SetStatus(Int_t status) {fStatus = status;}
0081 
0082    ClassDefOverride(TChainElement,2);  //A chain element
0083 };
0084 
0085 #endif
0086