Controller.hpp

Go to the documentation of this file.
00001 #ifndef CAFE_CONTROLLER_HPP__
00002 #define CAFE_CONTROLLER_HPP__
00003 
00004 #include <list>
00005 #include "cafe/Processor.hpp"
00006 
00007 class TFile;
00008 
00009 namespace cafe {
00010 
00011     class Event;
00012 
00039     class Controller : public Processor {
00040     public:
00041         Controller(const char *name);
00042         Controller(const char *name, const std::list<cafe::Processor*>& procs);
00043         ~Controller();
00044 
00047 
00048         virtual void begin();
00049         virtual void finish();
00050         virtual void inputFileOpened(TFile *file);
00051         virtual void inputFileClosing(TFile *file);
00052         virtual bool processEvent(Event& event);
00054 
00055         virtual void setDebug(unsigned int level);
00056 
00058         bool add(const std::string& name, const std::string& instance = "");
00059 
00061         bool add(Processor *proc);
00062 
00064         bool add(bool (*func)(Event&), const std::string& instance);
00065 
00066     protected:
00068         bool add(const std::list<Processor*>& procs);
00069 
00070     protected:
00071         std::list<Processor*> _processors;
00072         std::vector<std::string> _untag;
00073         std::vector<std::string> _tag;
00074 
00075     private:
00076         TFile *_outfile;
00077 
00078     public:
00079         ClassDef(Controller, 0);
00080     };
00081 
00082 }
00083 
00084 #endif // CAFE_CONTROLLER_HPP__

Generated on Thu Apr 3 04:14:22 2008 for CAF by doxygen 1.3.4