17 #ifndef LARDATA_DETECTORINFO_DETECTORCLOCKSSTANDARDTESTHELPERS_H 18 #define LARDATA_DETECTORINFO_DETECTORCLOCKSSTANDARDTESTHELPERS_H 1 44 static std::unique_ptr<detinfo::DetectorClocksStandard>
49 if (pset.
get_if_present(
"service_provider", ServiceProviderPath)) {
50 std::string ServiceProviderName = ServiceProviderPath;
51 size_t iSlash = ServiceProviderPath.rfind(
'/');
52 if (iSlash != std::string::npos) ServiceProviderName.erase(0, iSlash + 1);
54 if (ServiceProviderName ==
"DetectorClocksServiceStandard") {
56 <<
"Verified service implementation for DetectorClocksService: '" << ServiceProviderPath
61 <<
"This set up is for a DetectorClocksStandard provider.\n" 62 "Your configuration specifies a '" 63 << ServiceProviderPath
64 <<
"' service implementation" 65 " that is not known to use that provider.";
72 auto detClocks = std::make_unique<detinfo::DetectorClocksStandard>(pset);
107 template <
typename TestEnv>
114 TestEnv>(env,
"DetectorClocksService");
120 #endif // LARDATA_DETECTORINFO_DETECTORCLOCKSSTANDARDTESTHELPERS_H
Environment helper to set up a service provider.
Class to create and set up a new provider.
static std::unique_ptr< detinfo::DetectorClocksStandard > setup(fhicl::ParameterSet const &pset)
General LArSoft Utilities.
Class used for the conversion of times between different formats and references.
Prov * SimpleEnvironmentStandardSetupByName(TestEnv &env, std::string service_name)
Basic implementation of a environment setup helper.
std::optional< T > get_if_present(std::string const &key) const
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
Implementation of detinfo::DetectorClocks interface with fixed settings from configuration.
static detinfo::DetectorClocksStandard * setup(TestEnv &env)