Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabled the warning messages about too many digits for TR numbers #84

Merged
merged 3 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions schema/hdf5libs/hdf5filelayout.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ local types = {
s.field("record_name_prefix", self.hdf_string, "TriggerRecord",
doc="Prefix for the record name"),
s.field("digits_for_record_number", self.count, 6,
doc="Number of digits to use for the record number in the record name inside the HDF5 file"),
doc="Minimum number of digits to use for the record number in the record name inside the HDF5 file"),
s.field("digits_for_sequence_number", self.count, 4,
doc="Number of digits to use for the sequence number in the TriggerRecord name inside the HDF5 file"),
doc="Minimum number of digits to use for the sequence number in the TriggerRecord name inside the HDF5 file"),
s.field("record_header_dataset_name", self.hdf_string, "TriggerRecordHeader",
doc="Dataset name for the record header"),
s.field("raw_data_group_name", self.hdf_string, "RawData",
Expand Down
4 changes: 2 additions & 2 deletions src/HDF5FileLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ HDF5FileLayout::get_record_number_string(uint64_t record_number, // NOLINT(build
int width = m_conf_params.digits_for_record_number;

if (record_number >= m_powers_ten[m_conf_params.digits_for_record_number]) {
ers::warning(FileLayoutNotEnoughDigitsForPath(ERS_HERE, record_number, m_conf_params.digits_for_record_number));
//ers::warning(FileLayoutNotEnoughDigitsForPath(ERS_HERE, record_number, m_conf_params.digits_for_record_number));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would vote for either removing this line entirely, or perhaps making it a TLOG_DEBUG so we still have visibility when the minimum is insufficient.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Eric suggested, I removed the lines entirely. (And, in fact, I took the opportunity to remove a few more lines of unnecessary code.)

width = 0; // tells it to revert to normal width
}

Expand All @@ -77,7 +77,7 @@ HDF5FileLayout::get_record_number_string(uint64_t record_number, // NOLINT(build

width = m_conf_params.digits_for_sequence_number;
if (seq_num >= m_powers_ten[m_conf_params.digits_for_sequence_number]) {
ers::warning(FileLayoutNotEnoughDigitsForPath(ERS_HERE, seq_num, m_conf_params.digits_for_sequence_number));
//ers::warning(FileLayoutNotEnoughDigitsForPath(ERS_HERE, seq_num, m_conf_params.digits_for_sequence_number));
width = 0; // tells it to revert to normal width
}
record_number_string << "." << std::setw(width) << std::setfill('0') << seq_num;
Expand Down