NTree.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \brief This is a simple tree class
3 /// \author jpaley@anl.gov
4 /// \date
5 ////////////////////////////////////////////////////////////////////////
6 #ifndef NTREE_H
7 #define NTREE_H
8 
9 #include <vector>
10 #include <iostream>
11 
12 namespace util {
13 
14  template<class T> class NTree {
15 
16  public:
19  std::vector<NTree> fChild;
20 
21  void Print();
22  };
23 
24  template<class T> void NTree<T>::Print() {
25  if (fChild.empty()) {
26  std::cout << &fTree << " <- ";
27  }
28  else {
29  for (unsigned int i=0; i<fChild.size(); ++i)
30  fChild[i].Print();
32  }
33  }
34 }
35 
36 
37 #endif
Filter events based on their run/event numbers.
std::vector< NTree > fChild
Definition: NTree.h:19
NTree * fParent
Definition: NTree.h:17
OStream cout
Definition: OStream.cxx:6
void Print()
Definition: NTree.h:24
T fTree
Definition: NTree.h:18
double T
Definition: Xdiff_gwt.C:5