14 #include "cetlib/HorizontalRule.h" 15 #include "cetlib_except/demangle.h" 26 std::unique_ptr<detail::ServiceHelperBase>&& helper)
27 : config_{pset},
helper_{std::move(helper)}
33 std::unique_ptr<detail::ServiceHelperBase>&& helper,
41 std::unique_ptr<detail::ServiceHelperBase>&& helper)
77 "ServiceCacheEntry::makeAndCacheService called on a service interface!");
88 std::ostringstream err_stream;
89 constexpr cet::HorizontalRule rule{100};
91 << rule(
'=') <<
"\n\n" 92 <<
"!! The following service has been misconfigured: !!" 94 << rule(
'-') <<
"\n\nservice_type: " 99 << rule(
'=') <<
"\n\n";
104 <<
"cet::exception caught during construction of service type " 105 << cet::demangle_symbol(
helper_->get_typeid().name()) <<
":\n";
109 <<
"std::exception caught during construction of service type " 110 << cet::demangle_symbol(
helper_->get_typeid().name()) <<
": " << e.what();
112 catch (std::string
const&
s) {
114 <<
"String exception during construction of service type " 115 << cet::demangle_symbol(
helper_->get_typeid().name()) <<
": " << s;
119 <<
"String exception during construction of service type " 120 << cet::demangle_symbol(
helper_->get_typeid().name()) <<
":\n";
131 service_->registerProducts(mpr, productsToProduce, signals, md);
std::string bold_fontify(std::string const &s)
virtual std::unique_ptr< ServiceWrapperBase > make(fhicl::ParameterSet const &cfg, ActivityRegistry ®, size_t nSchedules) const =0
bool is_interface() const
void convertService(WrapperBase_ptr &swb) const
std::vector< BranchDescription > ProductDescriptions
std::stack< WrapperBase_ptr > ServiceStack
virtual std::unique_ptr< ServiceWrapperBase > make(fhicl::ParameterSet const &cfg, ActivityRegistry ®) const =0
void registerProducts(MasterProductRegistry &mpr, ProductDescriptions &productsToProduce, ProducingServiceSignals &signals, ModuleDescription const &md)
std::shared_ptr< detail::ServiceWrapperBase > WrapperBase_ptr
T get(std::string const &key) const
ServiceScope serviceScope() const
void createService(ActivityRegistry ®, detail::ServiceStack &creationOrder) const
static size_t & nSchedules()
WrapperBase_ptr getService(ActivityRegistry ®, detail::ServiceStack &creationOrder) const
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
char const * what() const noexcept override
fhicl::ParameterSet config_
ServiceCacheEntry const *const interface_impl_
ServiceCacheEntry(fhicl::ParameterSet const &pset, std::unique_ptr< detail::ServiceHelperBase > &&helper)
std::unique_ptr< detail::ServiceHelperBase > helper_
cet::coded_exception< error, detail::translate > exception
void makeAndCacheService(ActivityRegistry ®) const