StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjTreeReaderTwoTrees.h
1 // -*- mode: c++;-*-
2 // $Id: StjTreeReaderTwoTrees.h,v 1.2 2009/12/03 09:57:37 pibero Exp $
3 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
4 #ifndef STJTREEREADERTWOTREES_H
5 #define STJTREEREADERTWOTREES_H
6 
7 #include "StjTreeReader.h"
8 
10 
11 public:
12  StjTreeReaderTwoTrees(TTree *tree1, TTree *tree2)
13  : _tree1(tree1), _tree2(tree2) { }
14  virtual ~StjTreeReaderTwoTrees() { }
15 
16  virtual void Init();
17 
18  virtual Long64_t GetEntryWithIndex(const StjTreeIndex& idx);
19  virtual Long64_t GetEntryWithIndex(Int_t major, Int_t minor);
20 
21 protected:
22 
23  virtual void SetBranchAddress(TTree *tree) { StjTreeReader::SetBranchAddress(tree); }
24  virtual void SetBranchAddress(TTree *tree1, TTree *tree2) { }
25 
26  virtual void clearEntry() = 0;
27  virtual void readEntry() = 0;
28 
29  TTree* _tree1;
30  TTree* _tree2;
31 
32  ClassDef(StjTreeReaderTwoTrees, 1)
33 
34 };
35 
36 #endif // STJTREEREADERTWOTREES_H