Skip to content

Commit

Permalink
Only create an internal pointer if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Jun 30, 2023
1 parent 1452c20 commit eab2e2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion k4FWCore/include/k4FWCore/DataHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ DataHandle<T>::DataHandle(const std::string& descriptor, Gaudi::DataHandle::Mode

podio_data_service = dynamic_cast<PodioDataSvc*>(m_eds.get());
if (nullptr != podio_data_service) {
m_dataPtr = new T();
if constexpr (std::is_integral_v<T> || std::is_floating_point_v<T>) {
m_dataPtr = new T();
}
} else {
// This is the legacy implementation kept for a transition period
PodioLegacyDataSvc* plds;
Expand Down

0 comments on commit eab2e2b

Please sign in to comment.