17 #ifndef Calibration_H_
18 #define Calibration_H_
83 Calibration(
const std::string& name,
const std::string& confile =
"calibration.xml",
size_t reserv = 50 );
102 long getValue(
const long raw,
bool crop_raw =
false );
133 long getRawValue(
const long cal,
bool range =
false );
162 void build(
const std::string& name,
const std::string& confile, xmlNode* node = 0 );
172 void setCacheSize(
size_t sz );
174 inline size_t getCacheSize()
const
179 void setCacheResortCycle(
size_t n );
180 inline size_t getCacheResotrCycle() const noexcept
182 return numCacheResort;
186 friend std::ostream& operator<<(std::ostream& os, Calibration& c );
187 friend std::ostream& operator<<(std::ostream& os, Calibration* c );
201 inline bool operator < (
const Point& p )
const
231 inline bool operator < (
const Part& p )
const noexcept
236 inline Point leftPoint()
const noexcept
240 inline Point rightPoint()
const noexcept
272 typedef std::vector<Part> PartsVec;
274 inline std::string getName()
281 long minRaw, maxRaw, minVal, maxVal, rightVal, leftVal, rightRaw, leftRaw;
283 void insertToCache(
const long raw,
const long val );
293 CacheInfo() noexcept: val(0), raw(
outOfRange), cnt(0) {}
294 CacheInfo(
const long r,
const long v ) noexcept: val(v), raw(r), cnt(0) {}
302 inline bool operator<(
const CacheInfo& r )
const noexcept
315 typedef std::deque<CacheInfo> ValueCache;
317 size_t numCacheResort;
318 size_t numCallToCache;
323 #endif // Calibration_H_