TChainElement.h

Go to the documentation of this file.
00001 // @(#)root/tree:$Id: TChainElement.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Rene Brun   11/02/97
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 #ifndef ROOT_TChainElement
00012 #define ROOT_TChainElement
00013 
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TChainElement                                                        //
00018 //                                                                      //
00019 // Describes a component of a TChain.                                   //
00020 //                                                                      //
00021 //////////////////////////////////////////////////////////////////////////
00022 
00023 
00024 #ifndef ROOT_TNamed
00025 #include "TNamed.h"
00026 #endif
00027 
00028 class TBranch;
00029 
00030 class TChainElement : public TNamed {
00031 
00032    // TChainElement status bits
00033    enum EStatusBits {
00034       kHasBeenLookedUp = BIT(15)
00035    };
00036 
00037 protected:
00038    Long64_t      fEntries;          //Number of entries in the tree of this chain element
00039    Int_t         fNPackets;         //Number of packets
00040    Int_t         fPacketSize;       //Number of events in one packet for parallel root
00041    Int_t         fStatus;           //branch status when used as a branch
00042    void         *fBaddress;         //!branch address when used as a branch
00043    TString       fBaddressClassName;//!Name of the class pointed to by fBaddress
00044    UInt_t        fBaddressType;     //!Type of the value pointed to by fBaddress
00045    Bool_t        fBaddressIsPtr;    //!True if the address is a pointer to an address
00046    char         *fPackets;          //!Packet descriptor string
00047    TBranch     **fBranchPtr;        //!Address of user branch pointer (to updated upon loading a file)
00048 
00049 public:
00050    TChainElement();
00051    TChainElement(const char *title, const char *filename);
00052    virtual ~TChainElement();
00053    virtual void        CreatePackets();
00054    virtual void       *GetBaddress() const {return fBaddress;}
00055    virtual const char *GetBaddressClassName() const { return fBaddressClassName; }
00056    virtual Bool_t      GetBaddressIsPtr() const { return fBaddressIsPtr; }
00057    virtual UInt_t      GetBaddressType() const { return fBaddressType; }
00058    virtual TBranch   **GetBranchPtr() const { return fBranchPtr; }
00059    virtual Long64_t    GetEntries() const {return fEntries;}
00060    virtual char       *GetPackets() const {return fPackets;}
00061    virtual Int_t       GetPacketSize() const {return fPacketSize;}
00062    virtual Int_t       GetStatus() const {return fStatus;}
00063    virtual Bool_t      HasBeenLookedUp() { return TestBit(kHasBeenLookedUp); }
00064    virtual void        ls(Option_t *option="") const;
00065    virtual void        SetBaddress(void *add) {fBaddress = add;}
00066    virtual void        SetBaddressClassName(const char* clname) { fBaddressClassName = clname; }
00067    virtual void        SetBaddressIsPtr(Bool_t isptr) { fBaddressIsPtr = isptr; }
00068    virtual void        SetBaddressType(UInt_t type) { fBaddressType = type; }
00069    virtual void        SetBranchPtr(TBranch **ptr) { fBranchPtr = ptr; }
00070    virtual void        SetLookedUp(Bool_t y = kTRUE);
00071    virtual void        SetNumberEntries(Long64_t n) {fEntries=n;}
00072    virtual void        SetPacketSize(Int_t size = 100);
00073    virtual void        SetStatus(Int_t status) {fStatus = status;}
00074 
00075    ClassDef(TChainElement,2);  //A chain element
00076 };
00077 
00078 #endif
00079 

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