Add a new type to CxxUtils for arrays of optional values
This merge request adds a type to the CxxUtils
package, the OptionalArray
,
which for a given template type T wraps the
std::array<std::optional<T>>
type. It adds several useful helper
methods which make the type more ergonomic to use. This can be used
later in applications such as the Trk::TrackSummary
, or other places
where an array of optional values is required.
I've done my best to add comments and tests for maintainability.
This merge request doesn't change any existing code, and should thus not break anything.
Merge request reports
Activity
added Core master review-pending-level-1 labels
CI Result FAILURE (hash 2e9a9602)Athena AthSimulation AthGeneration AnalysisBase externals cmake make required tests optional tests Full details available on this CI monitor view
Athena: number of compilation errors 0, warnings 1
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 20394]- Resolved by Stephen Nicholas Swatman
Hey
Some points/question
-
I guess it would be good to have a review expert
-
I guess one should assume that this to be used generally outside the tracking realm and an the particular EDM applications to find its way to
cxxUtils
-
The general comment /question is you envision this like an "adaptor" / a set of "helper methods" (like imaging the *this aka std::array as arg to something like the coalesce) or as kind of
container
- Do you envision the main usage to be the
method_x
in which case why not just set offunctions
/helpers
/alg
and the need to hide a payload in aclass
e.g
- Do you envision the main usage to be the
template<typename T, size_t N> void coalesce_l(OptionalArray<T, N> & modify , const OptionalArray<T, N> & rhs);
-
Do you envision it like a wrapper/adaptor class. In which case should one be able to get back the data after the operations? i.e if I pass my array of optional to this type and coalesce should I still be able to get it back and pass it to an
std::algorithm
, or another interface boundary expecting anstd::array
or proper type? -
Do you envision it as a stand alone container (no data() , no free helpers , as is now?) in which case do we need
[]
,begin
,end
the main bits of thestd::array
container
Edited by Christos Anastopoulos -
CI Result SUCCESS (hash 2e9a9602)Athena AthSimulation AthGeneration AnalysisBase externals cmake make required tests optional tests Full details available on this CI monitor view
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 20446]added review-pending-level-2 label and removed review-pending-level-1 label
added review-pending-expert label and removed review-pending-level-2 label
- Resolved by Stephen Nicholas Swatman
I already made a number of comments on the code.
- Resolved by Stephen Nicholas Swatman
- Resolved by Stephen Nicholas Swatman
- Resolved by Stephen Nicholas Swatman
- Resolved by Stephen Nicholas Swatman
- Resolved by Stephen Nicholas Swatman
added review-user-action-required label and removed review-pending-expert label
added review-pending-level-1 label and removed review-user-action-required label
CI Result SUCCESS (hash d53e0526)Athena AthSimulation AthGeneration AnalysisBase externals cmake make required tests optional tests Full details available on this CI monitor view
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 21455] CI Result SUCCESS (hash 370388fa)Athena AthSimulation AthGeneration AnalysisBase externals cmake make required tests optional tests Full details available on this CI monitor view
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 21457]Looks good to me, adding review-pending-expert again to approve.
Cheers, Volker (L1)
added review-pending-expert label and removed review-pending-level-1 label
ping @ssnyder can you take another look (as I guess you are the expert here)
added review-approved label
mentioned in commit 404bac6f
removed review-pending-expert label
added sweep:ignore label