diff --git a/include/hdf5libs/HDF5FileLayout.hpp b/include/hdf5libs/HDF5FileLayout.hpp index b82f7c3..066a224 100644 --- a/include/hdf5libs/HDF5FileLayout.hpp +++ b/include/hdf5libs/HDF5FileLayout.hpp @@ -206,31 +206,6 @@ class HDF5FileLayout */ std::map m_detector_group_name_to_type_map; - // quick powers of ten lookup - constexpr static uint64_t m_powers_ten[] // NOLINT(build/unsigned) - = { - 1, // 1e0 - 10, // 1e1 - 100, // 1e2 - 1000, // 1e3 - 10000, // 1e4 - 100000, // 1e5 - 1000000, // 1e6 - 10000000, // 1e7 - 100000000, // 1e8 - 1000000000, // 1e9 - 10000000000, // 1e10 - 100000000000, // 1e11 - 1000000000000, // 1e12 - 10000000000000, // 1e13 - 100000000000000, // 1e14 - 1000000000000000, // 1e15 - 10000000000000000, // 1e16 - 100000000000000000, // 1e17 - 1000000000000000000, // 1e18 - 10000000000000000000u // 1e19 - }; - /** * @brief Fill path parameters maps from FileLayoutParams */ diff --git a/schema/hdf5libs/hdf5filelayout.jsonnet b/schema/hdf5libs/hdf5filelayout.jsonnet index 280c85c..960c9b4 100644 --- a/schema/hdf5libs/hdf5filelayout.jsonnet +++ b/schema/hdf5libs/hdf5filelayout.jsonnet @@ -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", diff --git a/src/HDF5FileLayout.cpp b/src/HDF5FileLayout.cpp index 4f58bd0..936992a 100644 --- a/src/HDF5FileLayout.cpp +++ b/src/HDF5FileLayout.cpp @@ -65,21 +65,10 @@ HDF5FileLayout::get_record_number_string(uint64_t record_number, // NOLINT(build std::ostringstream record_number_string; 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)); - width = 0; // tells it to revert to normal width - } - record_number_string << m_conf_params.record_name_prefix << std::setw(width) << std::setfill('0') << record_number; if (m_conf_params.digits_for_sequence_number > 0) { - 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)); - width = 0; // tells it to revert to normal width - } record_number_string << "." << std::setw(width) << std::setfill('0') << seq_num; }