- Timestamp:
- 06/27/11 17:22:21 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/EventBuilderWrapper.h
r11202 r11203 1162 1162 1163 1163 } __attribute__((__packed__));; 1164 /*1165 template<typename T>1166 vector<T> CheckVals(const PEVNT_HEADER *fadhd, const T *val, bool &rc)1167 {1168 const size_t offset = reinterpret_cast<const char*>(val)-reinterpret_cast<const char*>(fadhd);1169 1170 vector<T> vec(40);1171 1172 vec[0] = *val;1173 1174 rc = true;1175 for (int i=1; i<40; i++)1176 {1177 1178 const T &t = *reinterpret_cast<const T*>(reinterpret_cast<const char*>(fadhd+i)+offset);1179 if (t!=*val)1180 rc = false;1181 1182 vec[i] = t;1183 }1184 1185 return vec;1186 }1187 1188 template<typename T>1189 vector<uint8_t> CheckBits(const PEVNT_HEADER *fadhd, const T &val, T &rc)1190 {1191 const size_t offset = reinterpret_cast<const char*>(&val)-reinterpret_cast<const char*>(fadhd);1192 1193 vector<uint8_t> vec(40);1194 1195 rc = 0;1196 for (int i=0; i<40; i++)1197 {1198 const T &t = *reinterpret_cast<const T*>(reinterpret_cast<const char*>(fadhd+i)+offset);1199 1200 rc |= val^t;1201 1202 vec[i] = t;1203 }1204 1205 // Return 1 for all bits which are identical1206 // 0 for all other bits1207 rc = ~rc;1208 return vec;1209 }*/1210 1211 1164 1212 1165 int eventCheck(PEVNT_HEADER *fadhd, EVENT *event)
Note:
See TracChangeset
for help on using the changeset viewer.