Project

General

Profile

Support #20849

Updated by Kyle Knoepfel over 2 years ago

the function below is very handy.

It would be even more handy if, in case the corresponding product is not found,
it returned a nullptr instead of unsuccessfully trying to dereference it.

-many thanks, Pasha

<pre><code class="cpp">
template <typename PROD>
inline PROD const*
art::DataViewImpl::getPointerByLabel(InputTag coart::DataViewImpl::getPointerByLabel(InputTag const& tag)nst& tag) const
{
Handle<PROD> h;
getByLabel(tag, h);
return &(*h);
}
</code></pre>


Back