-
Notifications
You must be signed in to change notification settings - Fork 158
[QC-985]: Configurable Reductors #2517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- field reductorParameters inside of dataSources is used - internally we use CustomParameters so json config has same format as extendedTaskParameters
knopers8
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you
| #include "QualityControl/ConditionAccess.h" | ||
| #include <TH1I.h> | ||
| #include <TTree.h> | ||
| #include <boost/test/tools/old/interface.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unwanted header added automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@justonedev1 please fix it when you are back.
| // https://stackoverflow.com/questions/424104/can-i-access-private-members-from-outside-the-class-without-using-friends | ||
| template <typename Accessor, typename Accessor::type Member> | ||
| struct DeclareGlobalGet { | ||
| friend typename Accessor::type get(Accessor) { return Member; } | ||
| }; | ||
|
|
||
| struct TrendingTaskReductorAccessor { | ||
| using type = std::unordered_map<std::string, std::unique_ptr<Reductor>> TrendingTask::*; | ||
| friend type get(TrendingTaskReductorAccessor); | ||
| }; | ||
|
|
||
| struct ReductorConfigAccessor { | ||
| using type = CustomParameters Reductor::*; | ||
| friend type get(ReductorConfigAccessor); | ||
| }; | ||
|
|
||
| template struct DeclareGlobalGet<TrendingTaskReductorAccessor, &TrendingTask::mReductors>; | ||
| template struct DeclareGlobalGet<ReductorConfigAccessor, &Reductor::mCustomParameters>; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to admit, I spent 2 hours trying to understand it and I did not manage. Not saying that the solution is bad though, but I need some learning.
[Framework] classes inherited from Reductor are now configurable