00001 #ifndef SCTTEST_SCANINFO_H
00002 #define SCTTEST_SCANINFO_H
00003
00004 #include <string>
00005 #include <boost/shared_ptr.hpp>
00006 #include <cmath>
00007 #include "CommonWithDsp/sctStructure.h"
00008 #include "CommonWithDsp/ABCD/ABCDscans.h"
00009
00010 using std::string;
00011 using std::fabs;
00012 using boost::shared_ptr;
00013
00014 namespace SctTest {
00015 class ScanInfo {
00016 public:
00017 bool operator<(const ScanInfo& s2) const {
00018 return serialNum < s2.serialNum || scanVar < s2.scanVar;
00019 }
00020
00021 string serialNum;
00022 unsigned short scanVar;
00023 };
00024
00025 class ThresholdScanDetails {
00026 public:
00027 ThresholdScanDetails() {}
00028 ThresholdScanDetails(const ABCDModule& config);
00029
00030 bool operator==(const ThresholdScanDetails& s2) const {
00031 return fabs(charge - s2.charge) < 0.1 && range == s2.range && trims == s2.trims;
00032 }
00033
00034 double charge;
00035 int range;
00036 int trims;
00037 string fileName;
00038 };
00039
00040 class StrobeDelayScanDetails {
00041 public:
00042 StrobeDelayScanDetails() {}
00043 StrobeDelayScanDetails(const ABCDModule& config);
00044
00045 bool operator==(const StrobeDelayScanDetails& s2) const {
00046 return fabs(charge - s2.charge) < 0.1 && fabs(threshold - s2.threshold) < 0.1;
00047 }
00048
00049 double charge;
00050 double threshold;
00051 string fileName;
00052 };
00053
00054
00055 }
00056
00057
00058 #endif //SCTTEST_SCANINFO_H