Skip to content

Commit

Permalink
edm::get function now uses edm::Event::get call
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr15Jones committed Jan 19, 2019
1 parent 0b15543 commit 6d61969
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions FWCore/Framework/interface/Event.h
Original file line number Diff line number Diff line change
@@ -740,27 +740,24 @@ namespace edm {
// Will throw an exception if the collection is not available.

template <typename T>
T const& get(Event const& event, InputTag const& tag) {
T const& get(Event const& event, InputTag const& tag) noexcept(false) {
Handle<T> handle;
event.getByLabel(tag, handle);
// throw if the handle is not valid
return * handle.product();
}

template <typename T>
T const& get(Event const& event, EDGetToken const& token) {
T const& get(Event const& event, EDGetToken const& token) noexcept(false) {
Handle<T> handle;
event.getByToken(token, handle);
// throw if the handle is not valid
return * handle.product();
}

template <typename T>
T const& get(Event const& event, EDGetTokenT<T> const& token) {
Handle<T> handle;
event.getByToken(token, handle);
// throw if the handle is not valid
return * handle.product();
T const& get(Event const& event, EDGetTokenT<T> const& token) noexcept(false) {
return event.get(token);
}

}

0 comments on commit 6d61969

Please sign in to comment.