17 #ifndef LARDATA_DETECTORINFO_LARPROPERTIESSTANDARDTESTHELPERS_H 18 #define LARDATA_DETECTORINFO_LARPROPERTIESSTANDARDTESTHELPERS_H 1 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);
99 template <
typename TestEnv>
105 TestEnv>(env,
"LArPropertiesService");
111 #endif // LARDATA_DETECTORINFO_LARPROPERTIESSTANDARDTESTHELPERS_H
static std::unique_ptr< detinfo::LArPropertiesStandard > setup(fhicl::ParameterSet const &pset)
Helper classes to be used together with LArSoft's unit test.
Service provider with utility LAr functions.
Environment helper to set up a service provider.
Class to create and set up a new provider.
static detinfo::LArPropertiesStandard * setup(TestEnv &env)
General LArSoft Utilities.
Prov * SimpleEnvironmentStandardSetupByName(TestEnv &env, std::string service_name)
Basic implementation of a environment setup helper.
Properties related to liquid argon environment in the detector.
std::optional< T > get_if_present(std::string const &key) const
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning