2 #include "artdaq/ArtModules/detail/DummyProductCache.h"
3 #include "canvas/Utilities/Exception.h"
10 auto it = dummies_.find(wrappedName);
11 if (it == dummies_.cend()) {
12 TClass* cp = TClass::GetClass(wrappedName.c_str());
14 throw art::Exception(art::errors::DictionaryNotFound)
15 <<
"TClass::GetClass() returned null pointer for name: "
19 std::unique_ptr<EDProduct> dummy {
reinterpret_cast<EDProduct*
>(cp->New())};
20 it = dummies_.emplace(wrappedName, move(dummy)).first;
22 return it->second.get();
EDProduct const * product(std::string const &wrappedName)
Retrieve a product handle from the cache.