1 #ifndef art_Framework_Services_Registry_detail_ServiceWrapper_h 2 #define art_Framework_Services_Registry_detail_ServiceWrapper_h 12 class ActivityRegistry;
13 class ModuleDescription;
14 class ProducingService;
26 std::is_constructible_v<T, fhicl::ParameterSet const&, ActivityRegistry&>,
31 !std::is_base_of_v<ProducingService, T>,
32 "\n\nart-error: A service that inherits from art::ProducingService\n" 33 " cannot have a constructor that takes an ActivityRegistry&\n" 34 " argument. Contact artists@fnal.gov for guidance.\n");
35 return std::make_shared<T>(
ps, areg);
39 std::enable_if_t<!std::is_constructible_v<
T,
45 return std::make_shared<T>(
ps);
67 typename = std::enable_if_t<std::is_base_of_v<U, T>>>
68 std::unique_ptr<ServiceWrapper<U>>
71 return std::make_unique<ServiceWrapper<U>>(
81 if constexpr (std::is_base_of_v<ProducingService, T>) {
std::shared_ptr< T > service_ptr_
std::enable_if_t< std::is_constructible_v< T, fhicl::ParameterSet const &, ActivityRegistry & >, std::shared_ptr< T > > makeServiceFrom(fhicl::ParameterSet const &ps, ActivityRegistry &areg)
ServiceWrapper & operator=(ServiceWrapper const &)=delete
std::vector< BranchDescription > ProductDescriptions
ServiceWrapper(std::shared_ptr< T > &&p)
static constexpr double ps
std::unique_ptr< ServiceWrapper< U > > getAs() const
void registerProducts(ProductDescriptions &productsToProduce, ProducingServiceSignals &signals, ModuleDescription const &md) override
ServiceWrapper(ServiceWrapper const &)=delete
ServiceWrapper(fhicl::ParameterSet const &ps, ActivityRegistry &areg)