#ifndef TBaseTree_h #define TBaseTree_h #include "Utilities/ExRootAnalysis/interface/TSimpleBranch.h" #include "TROOT.h" #include class TFile; class TTree; class TBaseTree { private: static const Int_t maxElecEntries = 30; static const Int_t maxGenEntries = 30; static const Int_t maxJetEntries = 30; public: TBaseTree(const TString &name); ~TBaseTree(); template TSimpleBranch *NewBranch(const TString &name, Int_t maxsize) { TSimpleBranch *branch = new TSimpleBranch(name, maxsize, fNewTree); fBranches.insert(branch); return branch; } void Clear(); void Fill(); void Write(); private: TFile *fNewFile; TTree *fNewTree; std::set fBranches; }; #endif /* TBaseTree */