Set up a detinfo::DetectorClocksStandard from a parameter set.
More...
#include <DetectorClocksStandardTestHelpers.h>
template<>
struct testing::ProviderSetupClass< detinfo::DetectorClocksStandard >
Set up a detinfo::DetectorClocksStandard from a parameter set.
- Returns
- pointer to a newly created and set up DetectorClocksService
This function specialization enables the support of SetupProvider()
methods of testing::TesterEnvironment
.
Definition at line 42 of file DetectorClocksStandardTestHelpers.h.
Definition at line 45 of file DetectorClocksStandardTestHelpers.h.
48 std::string ServiceProviderPath;
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") {
55 MF_LOG_TRACE(
"setupProvider")
56 <<
"Verified service implementation for DetectorClocksService: '" << ServiceProviderPath
60 mf::LogWarning(
"setupProvider")
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);
The documentation for this struct was generated from the following file: