MuonCablingTools: cleanup/optimization of DBline class
Compare changes
Files
6- Frank Winklmeier authored
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 of `new`s. These functions were not used anymore and the code comments said those are obsolete and replaced by the equivalent `dbhex`, etc. version. Also delete the now obsolete `setdbfmtflag` 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 of `get` 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 the `isspace` check already. - General code cleanup and improvements. hex/dec prefix optional Revert to stoll
@@ -7,10 +7,10 @@
@@ -21,15 +21,15 @@
@@ -41,7 +41,7 @@
@@ -50,7 +50,7 @@
@@ -58,18 +58,18 @@
@@ -124,47 +124,25 @@
@@ -173,7 +151,7 @@
@@ -192,26 +170,26 @@
@@ -239,7 +217,7 @@
@@ -258,34 +236,36 @@
@@ -298,90 +278,61 @@ private:
@@ -394,11 +345,11 @@ public:
@@ -408,11 +359,19 @@ public: