MuonCablingTools: cleanup/optimization of DBline class
Cleanup and optimization of the DBline
class that is used to parse RPC
text configurations (usually read from COOL):
- Add a unit test for the
DBline
class that will make future changes easier to validate. - Remove the obsolete I/O formatters (
hex
,dec
,oct
) that were using excessive amounts ofnew
s. These functions were not used anymore and the code comments said those are obsolete and replaced by the equivalentdbhex
, etc. version. Also delete the now obsoletesetdbfmtflag
to switch between the old/new formatters. - Update the documentation. It said floats are supported but that was never the case.
- Delete unsupported stream operators for floating point types. Also remove operators for pointer types (why would anybody use those?).
- Use
std::string_view
where possible. - Use delegating constructor to avoid copy&paste.
- Remove internal "store" that was not being used.
- Use
std::getline
instead ofget
to read full line. This is a slight change of behavior as now the terminating newline will be part of the data. In practice this makes no difference as any whitespace is ignored via theisspace
check already. - General code cleanup and improvements.
- Also make the necessary adjustments in
RPC_CondCabling
.
Edited by Frank Winklmeier