ROOT logo
// @(#)root/tree:$Id: TFriendElement.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Rene Brun   07/04/2001

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/
#ifndef ROOT_TFriendElement
#define ROOT_TFriendElement


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TFriendElement                                                       //
//                                                                      //
// A TFriendElement TF describes a TTree object TF in a file.           //
// When a TFriendElement TF is added to the the list of friends of an   //
// existing TTree T, any variable from TF can be referenced in a query  //
// to T.                                                                //
//                                                                      //
//////////////////////////////////////////////////////////////////////////


#ifndef ROOT_TNamed
#include "TNamed.h"
#endif

class TFile;
class TTree;
class TClass;

class TFriendElement : public TNamed {

protected:
   TTree        *fParentTree;  //!pointer to the parent TTree
   TTree        *fTree;        //!pointer to the TTree described by this element
   TFile        *fFile;        //!pointer to the file containing the friend TTree
   TString       fTreeName;    // name of the friend TTree
   Bool_t        fOwnFile;     // true if file is managed by this class

   TFriendElement(const TFriendElement&);
   TFriendElement& operator=(const TFriendElement&);

public:
   enum { kFromChain = BIT(11) };
   TFriendElement();
   TFriendElement(TTree *tree, const char *treename, const char *filename);
   TFriendElement(TTree *tree, const char *treename, TFile *file);
   TFriendElement(TTree *tree, TTree* friendtree, const char *alias);
   virtual ~TFriendElement();
   virtual TTree      *Connect();
   virtual TTree      *DisConnect();
   virtual TFile      *GetFile();
   virtual TTree      *GetParentTree() const {return fParentTree;}
   virtual TTree      *GetTree();
   virtual const char *GetTreeName() const {return fTreeName.Data();}
   virtual void        ls(Option_t *option="") const;

   ClassDef(TFriendElement,2)  //A friend element of another TTree
};

#endif

 TFriendElement.h:1
 TFriendElement.h:2
 TFriendElement.h:3
 TFriendElement.h:4
 TFriendElement.h:5
 TFriendElement.h:6
 TFriendElement.h:7
 TFriendElement.h:8
 TFriendElement.h:9
 TFriendElement.h:10
 TFriendElement.h:11
 TFriendElement.h:12
 TFriendElement.h:13
 TFriendElement.h:14
 TFriendElement.h:15
 TFriendElement.h:16
 TFriendElement.h:17
 TFriendElement.h:18
 TFriendElement.h:19
 TFriendElement.h:20
 TFriendElement.h:21
 TFriendElement.h:22
 TFriendElement.h:23
 TFriendElement.h:24
 TFriendElement.h:25
 TFriendElement.h:26
 TFriendElement.h:27
 TFriendElement.h:28
 TFriendElement.h:29
 TFriendElement.h:30
 TFriendElement.h:31
 TFriendElement.h:32
 TFriendElement.h:33
 TFriendElement.h:34
 TFriendElement.h:35
 TFriendElement.h:36
 TFriendElement.h:37
 TFriendElement.h:38
 TFriendElement.h:39
 TFriendElement.h:40
 TFriendElement.h:41
 TFriendElement.h:42
 TFriendElement.h:43
 TFriendElement.h:44
 TFriendElement.h:45
 TFriendElement.h:46
 TFriendElement.h:47
 TFriendElement.h:48
 TFriendElement.h:49
 TFriendElement.h:50
 TFriendElement.h:51
 TFriendElement.h:52
 TFriendElement.h:53
 TFriendElement.h:54
 TFriendElement.h:55
 TFriendElement.h:56
 TFriendElement.h:57
 TFriendElement.h:58
 TFriendElement.h:59
 TFriendElement.h:60
 TFriendElement.h:61
 TFriendElement.h:62
 TFriendElement.h:63
 TFriendElement.h:64
 TFriendElement.h:65
 TFriendElement.h:66