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 42 of file LArPropertiesStandardTestHelpers.h.
Definition at line 44 of file LArPropertiesStandardTestHelpers.h.
References fhicl::ParameterSet::get_if_present(), and MF_LOG_TRACE.
47 std::string ServiceProviderPath;
48 if (pset.get_if_present(
"service_provider", ServiceProviderPath)) {
49 std::string ServiceProviderName = ServiceProviderPath;
50 size_t iSlash = ServiceProviderPath.rfind(
'/');
51 if (iSlash != std::string::npos) ServiceProviderName.erase(0, iSlash + 1);
53 if (ServiceProviderName ==
"LArPropertiesServiceStandard") {
55 <<
"Verified service implementation for LArPropertiesService: '" << ServiceProviderPath
60 <<
"This set up is for a LArPropertiesStandard provider.\n" 61 "Your configuration specifies a '" 62 << ServiceProviderPath
63 <<
"' service implementation that is not known to use that provider.";
70 return std::make_unique<detinfo::LArPropertiesStandard>(pset);
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
The documentation for this struct was generated from the following file: