00001 #ifndef CSCObjects_CSCDBCrosstalk_h 00002 #define CSCObjects_CSCDBCrosstalk_h 00003 00004 #include <iosfwd> 00005 #include <vector> 00006 00007 class CSCDBCrosstalk 00008 { 00009 public: 00010 CSCDBCrosstalk() {} 00011 ~CSCDBCrosstalk() {} 00012 00013 struct Item{ 00014 short int xtalk_slope_right; 00015 short int xtalk_intercept_right; 00016 short int xtalk_slope_left; 00017 short int xtalk_intercept_left; 00018 }; 00019 int factor_slope; 00020 int factor_intercept; 00021 00022 enum factors{FSLOPE=10000000, FINTERCEPT=100000}; 00023 00024 typedef std::vector<Item> CrosstalkContainer; 00025 CrosstalkContainer crosstalk; 00026 00027 const Item & item( int index ) const { return crosstalk[index]; } 00028 short int rslope( int index ) const { return crosstalk[index].xtalk_slope_right; } 00029 short int rinter( int index ) const { return crosstalk[index].xtalk_intercept_right; } 00030 short int lslope( int index ) const { return crosstalk[index].xtalk_slope_left; } 00031 short int linter( int index ) const { return crosstalk[index].xtalk_intercept_left; } 00032 int sscale() const { return factor_slope; } 00033 int iscale() const { return factor_intercept; } 00034 }; 00035 00036 std::ostream & operator<<(std::ostream & os, const CSCDBCrosstalk & cscdb); 00037 00038 #endif 00039