10 #ifndef artg4tk_util_DataFromRunOrService_hh 11 #define artg4tk_util_DataFromRunOrService_hh 23 template <
typename DATATYPE,
typename SERVICETYPE>
26 const std::string& producerLabel,
27 const std::string& instanceLabel)
33 auto handleVec = r.
getMany<DATATYPE>();
35 if (!handleVec.empty()) {
43 if (producerLabel.empty() || producerLabel == prov->
moduleLabel()) {
49 mf::LogDebug(
"DataFromRunOrService") <<
"Getting data from Run";
58 mf::LogDebug(
"DataFromRunOrService") <<
"Getting data from Service";
const DATATYPE & dataFromRunOrService(const art::Run &r, const std::string &producerLabel, const std::string &instanceLabel)
std::string const & productInstanceName() const noexcept
std::string const & moduleLabel() const noexcept
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
std::vector< Handle< PROD > > getMany(SelectorBase const &selector=MatchAllSelector{}) const