00001
00002 #ifndef _JAFAR_DATAREADER_SENSORBASE_HPP_
00003 #define _JAFAR_DATAREADER_SENSORBASE_HPP_
00004
00005 #include <string>
00006
00007 #include "datareader/DataReader.hpp"
00008
00009 namespace jafar {
00010 namespace datareader {
00011 class DataReader;
00012 class SensorBase {
00013 public:
00020 inline SensorBase(DataReader* dr, std::string name, std::string calibrationFileName, std::string configurationFileName, std::string maskFileName) : m_dataReader(dr), m_name(name), m_calibrationFileName(calibrationFileName), m_configurationFileName(configurationFileName), m_maskFileName(maskFileName), m_hasMask(maskFileName!="") {}
00024 inline std::string calibrationFileName() { return m_dataReader->dataPath() + "config/" + m_calibrationFileName; }
00025
00026 inline std::string configurationFileName() { return m_dataReader->dataPath() + m_configurationFileName; }
00027
00028 inline std::string maskFileName() { return m_dataReader->dataPath() + m_maskFileName; }
00029 inline bool hasMask() { return m_hasMask; }
00030
00031 private:
00032 DataReader* m_dataReader;
00033 std::string m_name;
00034 std::string m_calibrationFileName;
00035 std::string m_configurationFileName;
00036 std::string m_maskFileName;
00037 bool m_hasMask;
00038 };
00039 }
00040 }
00041
00042 #endif