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