Changeset 13167 for trunk/FACT++/src/PixelMap.h
- Timestamp:
- 03/22/12 14:51:05 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/PixelMap.h
r12699 r13167 204 204 } 205 205 206 bool Read(const std::string &fname) 207 { 208 std::ifstream fin(fname); 209 210 int l = 0; 211 212 std::string buf; 213 while (getline(fin, buf, '\n')) 214 { 215 if (l>416) 216 break; 217 218 buf = Tools::Trim(buf); 219 if (buf[0]=='#') 220 continue; 221 222 std::stringstream str(buf); 223 224 BiasMapEntry entry; 225 226 str >> entry.hv_board; 227 str >> entry.hv_channel; 228 str >> entry.Vnom; 229 str >> entry.Voff; 230 231 if (entry.hv_channel+32*entry.hv_board>=416) 232 { 233 #ifdef DEBUG 234 cerr << "Invalid board/channel read from " << fname << "." << endl; 235 #endif 236 return false; 237 } 238 239 (*this)[l++] = entry; 240 } 241 242 return l==416; 243 } 206 void Retrieve(const std::string &database); 207 void Read(const std::string &fname); 244 208 245 209 const BiasMapEntry &hv(int board, int channel) const
Note:
See TracChangeset
for help on using the changeset viewer.