WIP: Modernize the Trk::TrackSummary class
- Sep 11, 2020
-
-
Stephen Nicholas Swatman authored
These new helper methods allow us to more easily combine and update TrackSummary objects. We don't use them yet, but these will be useful for upcoming changes.
Verifiedf19a0703 -
Stephen Nicholas Swatman authored
Previously we were storing this as an unsigned long. Modern C++ has the std::bitset type, which makes this more convenient.
Verified9c12ed39 -
Stephen Nicholas Swatman authored
Again, we were using variable length arrays (std::vector) here, even though we know the size of these vectors at compile time. Therefore, we migrate this to std::array, removing some overhead.
Verifiedf46a9975 -
Stephen Nicholas Swatman authored
Currently, we have a few implementation details in a .icc file which is included as a header level. That's very unfortunate and doesn't work well with the architecture of Athena as it can cause unexpected ABI incompatibilities. We move these methods to a .cxx file so they are compiled into their own object file.
Verified30700082 -
Stephen Nicholas Swatman authored
Previously, TrackSummary used raw pointers with an assumption of ownership. We have changed this to smart pointers to simplify the code and improve memory safety.
Verifiededfe7a44 -
Stephen Nicholas Swatman authored
Previously, we were using a vector of integers, with the value of -1 indicating a missing value. This is more conveniently represented as a fixed-sized array of optional integers, which capture the possibility of non-existing values using an additional inhabitant, instead of piggy-backing an existing inhabitant.
Verifiedb1d39df8 -
Stephen Nicholas Swatman authored
There is also the TrackSummaryCnv code base which is friends with the TrackSummary and uses its members directly. We rewrite some of that code to use our new helper methods.
Verified7fd08858 -
Stephen Nicholas Swatman authored
We added a bunch of helper methods in the previous commit, but they are not used yet. This commit makes sure that InDetTrackSummaryHelperTool uses these new helper methods.
Verified35ace399 -
Stephen Nicholas Swatman authored
This commit adds several helper methods to make the use of TrackSummary more ergonomic. For example, we add methods for setting information values, getting them in older formats, and incrementing values.
Verifiedb5611543 -
Stephen Nicholas Swatman authored
Some of this code looks like a tornado went through it. We make some changes to make the code more readable and aesthetically pleasing, but we don't make any actual code changes.
Verifieda62a9c67
-