00001 #ifndef ANP_ALGEVENT_H
00002 #define ANP_ALGEVENT_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <string>
00026
00027
00028 #include "PhysicsNtuple/Handle.h"
00029 #include "PhysicsNtuple/Record.h"
00030
00031 class DataBlock;
00032 class Registry;
00033 class TDirectory;
00034
00035 namespace Anp
00036 {
00037 class AlgEvent: public virtual Base
00038 {
00039 public:
00040
00041 AlgEvent();
00042 virtual ~AlgEvent() ;
00043
00044 virtual bool Run(Event &event, const Record &record, bool pass) = 0;
00045
00046 virtual void Config(const Registry &);
00047
00048 virtual void Set(TDirectory *);
00049
00050 virtual void End(const DataBlock &);
00051
00052 void Name(const std::string &value);
00053 const std::string& Name() const;
00054
00055 private:
00056
00057 AlgEvent(const AlgEvent &);
00058 AlgEvent& operator=(const AlgEvent &);
00059
00060 private:
00061
00062 std::string fName;
00063
00064 };
00065
00066 typedef Anp::Handle<Anp::AlgEvent> AlgEventPtr;
00067
00068
00069
00070
00071
00072 inline AlgEvent::AlgEvent() : fName("generic")
00073 {
00074 }
00075
00076 inline AlgEvent::~AlgEvent()
00077 {
00078 }
00079
00080 inline void AlgEvent::Config(const Registry &)
00081 {
00082 }
00083
00084 inline void AlgEvent::Set(TDirectory *)
00085 {
00086 }
00087
00088 inline void AlgEvent::End(const DataBlock &)
00089 {
00090 }
00091
00092 inline void AlgEvent::Name(const std::string &value)
00093 {
00094 fName = value;
00095 }
00096
00097 inline const std::string& AlgEvent::Name() const
00098 {
00099 return fName;
00100 }
00101 }
00102
00103 #endif