/** \file Declaration of class atm::VModel \author Anonymous \version $Id$ \date 18 Jun 2003 */ #ifndef _atm_VModel_h_ #define _atm_VModel_h_ #include #include #include #define REGISTER_MODEL(_baseClass_, _modelName_, _ModelType_) \ public: \ static std::string GetRegistrationId() { return _modelName_; } \ static _baseClass_* Create() { static _ModelType_ model; return &model; } \ private: \ utl::ObjectRegistrar< \ _ModelType_, \ utl::ObjectFactory< \ _baseClass_*, \ std::string \ > \ > fAutoModelReg namespace atm { /** \class VModel \brief Base class of atmospheric functions \author Stefano Argiro' \date 18 Jun 2003 \ingroup atm_models */ class VModel { public: virtual ~VModel() { } virtual void Init() = 0; /// True if a data source is for the given model /** This method is meant to be checked to determine whether the given model is able to find valid data to evaluate. Typically it will always be true for parametric models which rely on an XML file, and will be true or false for database-based models, depending on whether or not relevant data are found in the DB for the current detector time */ virtual bool HasData() const = 0; /// alter Model by nSigma standard deviations virtual void SetUncertaintyBound(const double nSigma) const; protected: VModel() : fNSigmaCounter(0) { } private: // count how often virtual AlterByNSigma is called mutable unsigned int fNSigmaCounter; }; } #endif // Configure (x)emacs for this file ... // Local Variables: // mode: c++ // End: