diff --git a/k4FWCore/components/IOSvc.cpp b/k4FWCore/components/IOSvc.cpp index 6efded63..5743d590 100644 --- a/k4FWCore/components/IOSvc.cpp +++ b/k4FWCore/components/IOSvc.cpp @@ -72,8 +72,6 @@ StatusCode IOSvc::initialize() { if (m_reader) { auto categories = m_reader->getAvailableCategories(); if ( - // std::find(m_reader->getAvailableCategories().begin(), m_reader->getAvailableCategories().end(), - // podio::Category::Metadata) != m_reader->getAvailableCategories().end() && std::find(categories.begin(), categories.end(), podio::Category::Metadata) != categories.end() && m_reader->getEntries(podio::Category::Metadata) > 0) { info() << "Setting metadata frame" << endmsg; diff --git a/k4FWCore/include/k4FWCore/MetaDataHandle.h b/k4FWCore/include/k4FWCore/MetaDataHandle.h index 53c94635..48c9c861 100644 --- a/k4FWCore/include/k4FWCore/MetaDataHandle.h +++ b/k4FWCore/include/k4FWCore/MetaDataHandle.h @@ -166,8 +166,12 @@ template void MetaDataHandle::checkPodioDataSvc() { if (cmd.find("genconf") != std::string::npos) return; - if (!m_podio_data_service && !Gaudi::svcLocator()->service("MetadataSvc")) { - std::cout << "ERROR: MetaDataHandles require the PodioDataSvc" << std::endl; + // The proper check would be the following: + // if (!m_podio_data_service && !Gaudi::svcLocator()->service("MetadataSvc")) { + // However, it seems there is always a service called "MetadataSvc" from Gaudi, + // so the check will always pass + if (!m_podio_data_service) { + std::cout << "Warning: MetaDataHandles require the PodioDataSvc (ignore if using IOSvc)" << std::endl; } }