File indexing completed on 2026-04-09 07:49:43
0001 #pragma once
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include <string>
0020 #include <sstream>
0021 #include <iomanip>
0022
0023 struct sphit
0024 {
0025 unsigned iindex ;
0026 unsigned sensor_identifier ;
0027 unsigned sensor_index ;
0028
0029
0030 void zero();
0031 std::string desc() const ;
0032
0033 static bool Equal(const sphit& a, const sphit& b);
0034 bool operator==(const sphit& other) const ;
0035 };
0036
0037
0038 inline bool sphit::Equal(const sphit& a, const sphit& b )
0039 {
0040 return a.iindex == b.iindex &&
0041 a.sensor_identifier == b.sensor_identifier &&
0042 a.sensor_index == b.sensor_index
0043 ;
0044 }
0045
0046 inline bool sphit::operator==(const sphit& other) const
0047 {
0048 return Equal(*this, other);
0049 }
0050
0051 inline void sphit::zero()
0052 {
0053 iindex = 0 ;
0054 sensor_identifier = 0 ;
0055 sensor_index = 0 ;
0056 }
0057
0058 inline std::string sphit::desc() const
0059 {
0060 std::stringstream ss ;
0061 ss << "sphit::desc"
0062 << " iindex " << std::setw(7) << iindex
0063 << " sensor_identifier " << std::setw(7) << sensor_identifier
0064 << " sensor_index " << std::setw(7) << sensor_index
0065 ;
0066 std::string s = ss.str();
0067 return s ;
0068 }
0069
0070