#ifndef _rdet_RBadStationSQLManager_h_ #define _rdet_RBadStationSQLManager_h_ #include #include #include #include #include #include #include #include #include #ifdef AUGER_SQLITE_ENABLED # include #else # include #endif namespace utl { class TabulatedFunction; class TabulatedFunctionComplexLgAmpPhase; } namespace rdet { struct BadPeriod { unsigned long long int reason; unsigned long startGPSSecond; unsigned long stopGPSSecond; std::string comment; std::string reporter; BadPeriod() : reason(0), startGPSSecond(0), stopGPSSecond(0) { } }; /** \class RBadStationSQLManager \brief Manager for RD Bad Stations \author C. Glaser \version $Id$ \date 15 February 2013 \ingroup managers */ class RBadStationSQLManager : public det::VSQLManager { public: RBadStationSQLManager() : fBadPeriodList() { } virtual ~RBadStationSQLManager() { } void Init(const std::string& configLink); VMANAGER_GETDATA_NOTFOUND(double) //VMANAGER_GETDATA_NOTFOUND(std::vector) VMANAGER_GETDATA_CALL(InternalGetData, std::vector) VMANAGER_GETDATA_NOTFOUND(std::string) VMANAGER_GETDATA_NOTFOUND(int) //VMANAGER_GETDATA_CALL(InternalGetData, unsigned long long int) VMANAGER_GETDATA_NOTFOUND(std::vector) VMANAGER_GETDATA_NOTFOUND(std::vector) VMANAGER_GETDATA_NOTFOUND(std::list) VMANAGER_GETDATA_NOTFOUND(std::list) VMANAGER_GETDATA_NOTFOUND(std::list) VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunctionComplexLgAmpPhase) VMANAGER_GETDATA_NOTFOUND(std::map) VMANAGER_GETDATA_NOTFOUND(std::vector) VMANAGER_GETDATA_NOTFOUND(std::vector >) VMANAGER_GETDATA_NOTFOUND(std::list >) VMANAGER_GETDATA_NOTFOUND(std::map) VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunction) private: Status InternalGetData(std::vector& returnData, const std::string& componentProperty, const std::string& componentName, const IndexMap& /*componentIndex*/) const; //VMANAGER_GETDATA_HANDLE_DENIED virtual Status GenericGetData(Handle& returnData, const std::string& component, const std::string& property, const IndexMap& index) const; int GetBadPeriod(const int stationId) const; unsigned long long int GetBadPeriodFromBuffer(const int stationId) const; bool BufferBadPeriodTable() const; // stores all bad periods for all station, the station id (e.g. "110" for AERA_10) is the key mutable std::map > fBadPeriodList; }; } #endif