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

Interface.h

Go to the documentation of this file.
00001 #ifndef ANP_INTERFACE_H
00002 #define ANP_INTERFACE_H
00003 
00004 // $Id: Interface.h,v 1.9 2008/02/09 19:15:19 rustem Exp $
00005 //
00006 // This is an interface class that allows a user to obtain
00007 // data from PhysicsNtuple algorithms without explicitly
00008 // including all necessary algorithms. This class contains
00009 // 4 interface methods:
00010 //
00011 // 1) bool FillSnarl(TObject *record);
00012 //       In this function record is NtpStRecord pointer,
00013 //       it MUST be called once per snarl with current NtpStRecord.
00014 //       Return false if failed to read NtpStRecord.
00015 //
00016 // 2) float GetVar(const std::string &vname, TObject *object) const;
00017 //       This function returns internal PhysicsNtuple variables by name,
00018 //       object must be a pointer to NtpSRTrack or NtpSREvent.
00019 //
00020 // 3) void Config(const Registry &reg)
00021 //       Interface must be configured once with Registry configuration.
00022 //
00023 // 4) std::map<short, float> GetData(TObject *object);
00024 //       This function is included mostly for backward compatibility and
00025 //       internal use. It is no longer a recommended method to access 
00026 //       PhysicsNtuple variables.
00027 //
00028 
00029 // C++
00030 #include <string>
00031 #include <map>
00032 
00033 class DataBlock;
00034 class Registry;
00035 class TObject;
00036 
00037 namespace Anp
00038 {
00039    class Record;
00040    class RunAlgSnarl;
00041    class RunAlgStore;
00042 
00043    class Interface
00044    {
00045    public:
00046       
00047       Interface();
00048       ~Interface();     
00049 
00050       bool FillSnarl(TObject *record);
00051 
00052       float GetVar(const std::string &vname, TObject *object) const;
00053 
00054       void Config(const Registry &reg);
00055 
00056       const std::map<short, float> GetData(TObject *object) const;
00057 
00058    private:
00059 
00060       typedef std::map<std::string, int> KeyMap;
00061 
00062    private:
00063 
00064       RunAlgStore *fAlgStore;
00065       RunAlgSnarl *fAlgSnarl;
00066       DataBlock   *fBlock;
00067       Record      *fRecord;
00068 
00069       bool fPrint;
00070       bool fQuiet;
00071       bool fValid;
00072 
00073       unsigned int fNSnarlPass;
00074       unsigned int fNSnarlFail;
00075 
00076       mutable unsigned int fNEvent;
00077       mutable unsigned int fNTrack;
00078       
00079       double fDefault;
00080       KeyMap fKeys;
00081    };
00082 }
00083 
00084 #endif

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