/* * StatisticProcess.hh * * Created on: Nov 05, 2014 * Author: AKKA */ #ifndef STATISTICPROCESS_HH_ #define STATISTICPROCESS_HH_ #include #include #include #include "AMDA_exception.hh" #include "DataClient.hh" #include "Parameter.hh" #include "StatisticOperation.hh" namespace AMDA { namespace Parameters { //class StatisticOperation; /** * @class StatisticProcess * @brief A StatisticProcess is used to compute a statistic result in input data. * @details This class implement AMDA::Parameters::DataClient interface */ class StatisticProcess : public AMDA::Parameters::DataClient { public: /** * * Default constructor. */ StatisticProcess(Parameter ¶meter, bool isCoverageIndependantOfResultType, int index = -1); /** * Default destructor. */ virtual ~StatisticProcess(); /** * @overload DataClient::establishConnection */ virtual void establishConnection(); /** * @brief initializes time attribute */ virtual TimeStamp init(TimeIntervalListSPtr pTimeIntervalList); /* * @brief Set arguments map */ void setArguments(std::map& args); /* * @brief create statistic operation */ virtual void createOperation(void) = 0; /* * @brief get result dimension definition */ std::string getResultDimDefinition(bool forCoverage = false); /** * @brief compute statistic result and push it in a vector of string */ void compute(std::vector &result, std::vector &coverage); /* * @brief get UCD of the statistic process */ virtual std::string getUCD(void); protected: static log4cxx::LoggerPtr _logger; Parameter& _parameter; std::map _args; bool _isCoverageIndependantOfResultType; int _index; TimeIntervalListSPtr _timeIntervalList; TimeIntervalList::iterator _currentTimeInterval; StatisticOperationBase* _operation; }; typedef boost::shared_ptr StatisticProcessSPtr; } /* namespace Parameters */ } /* namespace AMDA */ #endif /* STATISTICPROCESS_HH_ */