// @(#)root/base:$Id$
// Author: Philippe Canal 13/05/2003

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

#ifndef ROOT_TBranchProxyDirector
#define ROOT_TBranchProxyDirector

#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif

#include <list>

#ifdef R__OLDHPACC
namespace std {
   using ::list;
}
#endif

class TH1F;
class TTree;

namespace ROOT {
   class TBranchProxy;
   class TFriendProxy;

   class TBranchProxyDirector {

      //This class could actually be the selector itself.
      TTree   *fTree;  // TTree we are currently looking at.
      Long64_t fEntry; // Entry currently being read.

      std::list<TBranchProxy*> fDirected;
      std::list<TFriendProxy*> fFriends;

      TBranchProxyDirector(const TBranchProxyDirector &) : fTree(0), fEntry(-1) {;}
      TBranchProxyDirector& operator=(const TBranchProxyDirector&) {return *this;}

   public:

      TBranchProxyDirector(TTree* tree, Long64_t i);
      TBranchProxyDirector(TTree* tree, Int_t i);     // cint has (had?) a problem casting int to long long

      void     Attach(TBranchProxy* p);
      void     Attach(TFriendProxy* f);
      TH1F*    CreateHistogram(const char *options);
      Long64_t GetReadEntry() const { return fEntry; }
      TTree*   GetTree() const { return fTree; };
      // void   Print();
      void     SetReadEntry(Long64_t entry);
      TTree*   SetTree(TTree *newtree);

   };

} /* namespace ROOT */

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