00001 #ifndef CAFE_SELECTOR_HPP__
00002 #define CAFE_SELECTOR_HPP__
00003
00004 #include "TSelector.h"
00005 #include "cafe/Event.hpp"
00006 #include "cafe/Controller.hpp"
00007
00008 class TTree;
00009
00010 namespace cafe {
00011
00012 #if ROOT_VERSION_CODE >= ROOT_VERSION(4,2,0)
00013 typedef Long64_t Entry_t;
00014 #else
00015 typedef Int_t Entry_t;
00016 #endif
00017
00018
00030 class Selector : public Controller, public TSelector {
00031 public:
00032 Selector(const char *name);
00033
00034
00035 virtual void Begin(TTree *tree);
00036 virtual void Init(TTree *tree);
00037 virtual void Terminate();
00038 virtual Bool_t Process(Entry_t entry);
00039 virtual Int_t Version() const;
00040
00041 private:
00042 TTree *_tree;
00043 Event _event;
00044 public:
00045 ClassDef(Selector, 0);
00046 };
00047
00048 }
00049
00050 #endif // CAFE_SELECTOR_HPP__