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 legacy DAQ modules to stream or global modules #6403
migrate legacy DAQ modules to stream or global modules #6403
Conversation
|
||
for (unsigned int i : fedlist_) | ||
if (rawdata->FEDData(i).size() > 0) | ||
fedcoll->FEDData(i) = rawdata->FEDData(i); |
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 think it should be fine to copy the FEDRawData in this way, instead of memcpy'ing by hand.
Does anyone know if there are counter indications for the simple approach ?
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.
Not that I could see any. Both FEDRawData::data() and FEDRawDataCollection::data() return the beginning of the buffer, i.e. there are no headers chopped off or added.
A new Pull Request was created by @fwyzard (Andrea Bocci) for CMSSW_7_3_X. migrate legacy DAQ modules to stream or global modules It involves the following packages: EventFilter/FEDInterface @mommsen, @cmsbuild, @nclopezo, @emeschi can you please review it and eventually sign? Thanks. |
e.put(bare_product); | ||
event.getByToken(token_, rawdata); | ||
|
||
std::auto_ptr<FEDRawDataCollection> fedcoll( new FEDRawDataCollection() ); |
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.
Can we get rid of the depreciated auto_ptr?
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've tried to use std::unique_ptr, but a drop-in replacement doesn't compile.
It does compile with std::unique_ptr if I do
event.put(std::move(fedcoll));
at the end, but I do not know if this is supposed to work on the framework side, or not :-(
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.
Using unique_ptr does work and does require the use of move
@mommsen - are you happy to +1 these changes now? |
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_3_X IBs unless changes or unless it breaks tests. This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @nclopezo, @ktf, @smuzaffar |
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_3_X IBs unless changes (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @nclopezo, @ktf, @smuzaffar |
+1 |
migrate legacy DAQ modules to stream or global modules
No description provided.