Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AlgStore.h

Go to the documentation of this file.
00001 #ifndef ANP_ALGSTORE_H
00002 #define ANP_ALGSTORE_H
00003 
00004 //
00005 // ABC for snarl based algorithm
00006 // 
00007 // This algorithm is executed once for each snarl. It serves as
00008 // interface to MINOS data classes that inherit from TObject.
00009 // This algorithm is (should be) stateless object that only fills
00010 // PhysicsNtuple data structures.
00011 //
00012 //
00013 // Two virtual functions
00014 //
00015 // Run() is executed on every snarl
00016 //       TObject pointer is often MomNavigator
00017 //
00018 // Config() is called after algorithm is created
00019 //          it passed registry with configuration parameters
00020 //
00021 //
00022 
00023 // C++
00024 #include <string>
00025 #include <iostream>
00026 
00027 // Local
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

Generated on Mon Feb 15 11:06:20 2010 for loon by  doxygen 1.3.9.1