Skip to content

Commit

Permalink
Add a comment about a warning and remove another comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Aug 8, 2024
1 parent c862fba commit be96887
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 0 additions & 2 deletions k4FWCore/components/IOSvc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 6 additions & 2 deletions k4FWCore/include/k4FWCore/MetaDataHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,12 @@ template <typename T> void MetaDataHandle<T>::checkPodioDataSvc() {
if (cmd.find("genconf") != std::string::npos)
return;

if (!m_podio_data_service && !Gaudi::svcLocator()->service<IMetadataSvc>("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<IMetadataSvc>("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;
}
}

Expand Down

0 comments on commit be96887

Please sign in to comment.