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
migrate modules used by the HLT menu to multithreading (various) #10958
migrate modules used by the HLT menu to multithreading (various) #10958
Conversation
- L1GtVhdlWriterCore: get rid of an unnecessary const_cast - L1GtTriggerMenuXmlParser: fix the input parameter of strtol
A new Pull Request was created by @fwyzard (Andrea Bocci) for CMSSW_7_6_X. migrate to modules used by the HLT menu multithreading (part 1) It involves the following packages: HLTrigger/HLTcore @Martin-Grunewald, @perrotta, @cmsbuild, @mulhearn, @fwyzard can you please review it and eventually sign? Thanks. |
@@ -224,7 +223,7 @@ class Data { | |||
|
|||
// l1 values and status | |||
const L1GlobalTriggerReadoutRecord * m_l1tResults; | |||
const L1GtTriggerMenu * m_l1tMenu; | |||
std::unique_ptr<L1GtTriggerMenu> m_l1tMenu; |
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.
Should this be std::unique_ptr<const L1GtTriggerMenu>
?
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.
Ah, I see it can't because of the call to buildGtConditionMap
. Would it be possible to change L1GtTriggerMenu
to have a constructor which calls that function?
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 just checked the code for L1GtTriggerMenu
and the copy constructor does call buildGtConditionMap
so you don't have to.
@fwyzard I believe I have the proper solution to your This is why people were calling The trick is to use an 'Initializer' for the I think the following should work: with namespace cond {
struct L1GtTriggerMenuInitializer {
void operator()( L1GtTriggerMenu& iMenu) const {
iMenu. buildGtConditionMap();
}
};
}
REGISTER_PLUGIN_INIT(L1GtTriggerMenuRcd, L1GtTriggerMenu, cond::L1GtTriggerMenuInitializer); |
Hi Chris,
thanks for your comments.
I was working on a separate branch to implement something like that, and
discussing a possible solution on the AlCa hypernews... what you propose
should indeed fix the problem, I'll try it later today.
About std::make_unique<>, can we actually use it?
It's only in C++14, not in C++11.
|
CMSSW_7_6 now uses the C++14 flags for the compiler. |
hi Chris, namespace {
struct L1GtTriggerMenuInitializer { void operator()(L1GtTriggerMenu & _) { _.buildGtConditionMap(); } };
}
REGISTER_PLUGIN_INIT(L1GtTriggerMenuRcd, L1GtTriggerMenu, L1GtTriggerMenuInitializer); while this does not: REGISTER_PLUGIN_INIT(L1GtTriggerMenuRcd, L1GtTriggerMenu, [](L1GtTriggerMenu & _){ _.buildGtConditionMap(); }); and neither does: REGISTER_PLUGIN_INIT(L1GtTriggerMenuRcd, L1GtTriggerMenu, std::mem_fn(& L1GtTriggerMenu::buildGtConditionMap)); ? |
63f6762
to
978abf1
Compare
978abf1
to
dca8ada
Compare
L1GtTriggerMenu is now properly initialised by the EventSetup framework, so there is no longer need to call (const_cast<L1GtTriggerMenu *>(l1GtTriggerMenu))->buildGtConditionMap(); or to keep a local copy for that purpose
- change most configuration parameters into const members - change into a stream::EDProducer
e513792
to
80fa995
Compare
@cmsbuild please test |
The tests are being triggered in jenkins. |
+1 |
tracked at #10964 |
You asked about why certain alternate forms of |
Right. Understood, thanks. |
+1 |
+1 |
+1 |
…part1 migrate to modules used by the HLT menu multithreading (various)
This is the part of #10909 that affects more than one group.
I'm still working on it, to see if there is a more efficient solution.