Set up a detinfo::LArPropertiesStandard from a parameter set.
More...
#include <LArPropertiesStandardTestHelpers.h>
template<>
struct testing::ProviderSetupClass< detinfo::LArPropertiesStandard >
Set up a detinfo::LArPropertiesStandard from a parameter set.
- Returns
- pointer to a newly created and set up LArPropertiesService
This function specialization enables the support of SetupProvider()
methods of testing::TesterEnvironment
.
Definition at line 43 of file LArPropertiesStandardTestHelpers.h.
Definition at line 46 of file LArPropertiesStandardTestHelpers.h.
50 if (pset.get_if_present(
"service_provider", ServiceProviderPath)) {
51 std::string ServiceProviderName = ServiceProviderPath;
52 size_t iSlash = ServiceProviderPath.rfind(
'/');
53 if (iSlash != std::string::npos)
54 ServiceProviderName.erase(0, iSlash + 1);
56 if (ServiceProviderName ==
"LArPropertiesServiceStandard") {
58 <<
"Verified service implementation for LArPropertiesService: '" 59 << ServiceProviderPath <<
"'";
63 <<
"This set up is for a LArPropertiesStandard provider.\n" 64 "Your configuration specifies a '" << ServiceProviderPath
65 <<
"' service implementation that is not known to use that provider.";
72 return std::make_unique<detinfo::LArPropertiesStandard>(pset);
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
The documentation for this struct was generated from the following file: