00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef ST_JET_EVENT_READER_H
00010 #define ST_JET_EVENT_READER_H
00011
00012
00013 #include <vector>
00014 using std::vector;
00015
00016
00017 class TChain;
00018
00019
00020 class StJetEvent;
00021 class StJetEventAnalyzer;
00022 class StJetSkimEvent;
00023
00024
00025 #include "TObject.h"
00026
00027 class StJetEventReader : public TObject {
00028 public:
00029 StJetEventReader(const char* jetfile, const char* skimfile);
00030 ~StJetEventReader();
00031
00032
00033 StJetEvent* getJetEvent(const char* branchname) const;
00034 StJetSkimEvent* getSkimEvent(const char* branchname) const;
00035
00036
00037 void addJetBranch(const char* branchname);
00038 void addSkimBranch(const char* branchname);
00039 void attach(StJetEventAnalyzer* a) { mAnalyzers.push_back(a); }
00040
00041
00042 bool next() const;
00043 bool operator()() const { return next(); }
00044 void eventLoop(int nentries);
00045
00046 private:
00047 TChain* mJetChain;
00048 TChain* mSkimChain;
00049 mutable int mEntry;
00050 vector<StJetEventAnalyzer*> mAnalyzers;
00051
00052 ClassDef(StJetEventReader,1);
00053 };
00054
00055 #endif // ST_JET_EVENT_READER_H