Rev 203 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 203 | Rev 207 | ||
---|---|---|---|
Line 294... | Line 294... | ||
294 | m_evTimestamp = *(localtime ( &rawtime )); |
294 | m_evTimestamp = *(localtime ( &rawtime )); |
295 | struct timeval mtime; |
295 | struct timeval mtime; |
296 | gettimeofday(&mtime, NULL); |
296 | gettimeofday(&mtime, NULL); |
297 | 297 | ||
298 | if (m_evSerial == 0) { |
298 | if (m_evSerial == 0) { |
- | 299 | memcpy(p, "DRS2", 4); // File identifier and version |
|
- | 300 | p += 4; |
|
299 | // time calibration header |
301 | // time calibration header |
300 | memcpy(p, "TIME", 4); |
302 | memcpy(p, "TIME", 4); |
301 | p += 4; |
303 | p += 4; |
302 | - | ||
303 | for (int b=0 ; b<m_nBoards ; b++) { |
304 | for (int b=0 ; b<m_nBoards ; b++) { |
304 | // store board serial number |
305 | // store board serial number |
305 | sprintf((char *)p, "B#"); |
306 | sprintf((char *)p, "B#"); |
306 | p += 2; |
307 | p += 2; |
307 | *(unsigned short *)p = drs->GetBoard(b)->GetBoardSerialNumber(); |
308 | *(unsigned short *)p = drs->GetBoard(b)->GetBoardSerialNumber(); |
Line 367... | Line 368... | ||
367 | 368 | ||
368 | for (int i=0 ; i<4 ; i++) { |
369 | for (int i=0 ; i<4 ; i++) { |
369 | if (DRSParameters->mask & (0x1<<i)) { |
370 | if (DRSParameters->mask & (0x1<<i)) { |
370 | sprintf((char *)p, "C%03d", i+1); |
371 | sprintf((char *)p, "C%03d", i+1); |
371 | p += 4; |
372 | p += 4; |
- | 373 | unsigned int s = drs->GetBoard(b)->GetScaler(i); |
|
- | 374 | memcpy(p, &s, sizeof(int)); |
|
- | 375 | p += sizeof(int); |
|
372 | for (int j=0 ; j<m_waveDepth ; j++) { |
376 | for (int j=0 ; j<m_waveDepth ; j++) { |
373 | // save binary date as 16-bit value: |
377 | // save binary date as 16-bit value: |
374 | // 0 = -0.5V, 65535 = +0.5V for range 0 |
378 | // 0 = -0.5V, 65535 = +0.5V for range 0 |
375 | // 0 = -0.05V, 65535 = +0.95V for range 0.45 |
379 | // 0 = -0.05V, 65535 = +0.95V for range 0.45 |
376 | if (m_waveDepth == 2048) { |
380 | if (m_waveDepth == 2048) { |