Skip to content

Commit 6989901

Browse files
committed
filename of pages with rdh error saved
1 parent 559e12b commit 6989901

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

doc/releaseNotes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,3 +530,6 @@ This file describes the main feature changes for each readout.exe released versi
530530
- added equipment-*.dropPagesWithError: if set, the pages with RDH errors are discarded (requires rdhCheckEnabled or rdhUseFirstInPage). This may be used if downstream software is not robust to RDH errors.
531531
- Disabled unused RDMA features (still available by switch in CMake)
532532
- Added feature for memory banks real time monitoring. Enabled by setting membanksMonitorRate in /etc/o2.d/readout-defaults.cfg. Output (high-rate text) can be seen locally in real time with `tail -f /tmp/readout-monitor-mempool-(id)`. The status of each page in the bank is displayed.
533+
534+
## next
535+
- Updated naming of files saved to disk when equipment-*.saveErrorPagesMax is set. Now includes timestamp, equipment id, and file counter: e.g. /tmp/readout-t1678288819-eq1-superpage.1.raw

src/ReadoutEquipment.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,11 +1031,12 @@ int ReadoutEquipment::processRdh(DataBlockContainerReference& block)
10311031
if (isPageError) {
10321032
if (saveErrorPagesCount < cfgSaveErrorPagesMax) {
10331033
saveErrorPagesCount++;
1034-
std::string fn = cfgSaveErrorPagesPath + "/readout.superpage." + std::to_string(saveErrorPagesCount) + ".raw";
1035-
theLog.log(LogInfoSupport, "Equipment %d : saving superpage %p with errors to disk : %s (%d bytes)", id, blockData, fn.c_str(), blockHeader.dataSize);
1034+
char fn[256];
1035+
snprintf(fn, 256, "%s/readout-t%d-eq%d-superpage.%d.raw", cfgSaveErrorPagesPath.c_str(), (int)time(NULL), (int)id, (int)saveErrorPagesCount);
1036+
theLog.log(LogInfoSupport, "Equipment %d : saving superpage %p with errors to disk : %s (%d bytes)", id, blockData, fn, blockHeader.dataSize);
10361037
FILE *fp;
10371038
bool success = 0;
1038-
fp = fopen(fn.c_str(), "wb");
1039+
fp = fopen(fn, "wb");
10391040
if (fp != nullptr) {
10401041
if (fwrite(blockData, blockHeader.dataSize, 1, fp) == 1) {
10411042
success = 1;

0 commit comments

Comments
 (0)