-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Implement propagate_const in the framework #13093
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,6 +166,7 @@ The interface is too complex for general use. | |
#include "DataFormats/Provenance/interface/EventID.h" | ||
#include "DataFormats/Provenance/interface/ProcessHistoryID.h" | ||
#include "DataFormats/Provenance/interface/RunID.h" | ||
#include "FWCore/Utilities/interface/propagate_const_safe.h" | ||
#include "FWCore/Utilities/interface/value_ptr.h" | ||
|
||
#include <memory> | ||
|
@@ -1020,7 +1021,7 @@ namespace edm { | |
RunNumber_t currentRun_; | ||
LuminosityBlockNumber_t currentLumi_; | ||
EntryNumber_t numberOfEvents_; | ||
std::shared_ptr<EventFinder> eventFinder_; | ||
edm::propagate_const<std::shared_ptr<EventFinder>> eventFinder_; | ||
std::vector<RunOrLumiIndexes> runOrLumiIndexes_; | ||
std::vector<EventNumber_t> eventNumbers_; | ||
std::vector<EventEntry> eventEntries_; | ||
|
@@ -1042,7 +1043,7 @@ namespace edm { | |
void fillRunOrLumiIndexes() const; | ||
|
||
void fillUnsortedEventNumbers() const; | ||
void resetEventFinder() const {transient_.eventFinder_.reset();} | ||
void resetEventFinder() const {transient_.eventFinder_ = nullptr;} // propagate_const<T> has no reset() function | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like we should investigate why |
||
std::vector<EventEntry>& eventEntries() const {return transient_.eventEntries_;} | ||
std::vector<EventNumber_t>& eventNumbers() const {return transient_.eventNumbers_;} | ||
void sortEvents() const; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,7 @@ ProductRegistry is frozen. | |
#include "FWCore/Utilities/interface/ProductHolderIndex.h" | ||
#include "FWCore/Utilities/interface/ProductKindOfType.h" | ||
#include "FWCore/Utilities/interface/TypeID.h" | ||
#include "FWCore/Utilities/interface/propagate_const_safe.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would have prefered to just depend on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Dr15Jones This will be done in my next commit |
||
|
||
#include <iosfwd> | ||
#include <memory> | ||
|
@@ -334,9 +335,9 @@ namespace edm { | |
ProductHolderIndex index_; | ||
}; | ||
|
||
std::unique_ptr<std::set<Item> > items_; | ||
edm::propagate_const<std::unique_ptr<std::set<Item>>> items_; | ||
|
||
std::unique_ptr<std::set<std::string> > processItems_; | ||
edm::propagate_const<std::unique_ptr<std::set<std::string>>> processItems_; | ||
}; | ||
} | ||
#endif |
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.
This include nor the one it replaced appears to be needed.
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.
@Dr15Jones Correct. It will be removed in my next commit to this PR.