Skip to content

Commit

Permalink
Use more suitable name for header
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Sep 11, 2024
1 parent d9f083d commit e757e8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef PODIO_DETAIL_INTERFACEIOHELPERS_H
#define PODIO_DETAIL_INTERFACEIOHELPERS_H
#ifndef PODIO_DETAIL_RELATIONIOHELPERS_H
#define PODIO_DETAIL_RELATIONIOHELPERS_H

#include "podio/utilities/TypeHelpers.h"
#include <podio/CollectionBase.h>
Expand Down Expand Up @@ -28,7 +28,7 @@ namespace podio::detail {
/// @param id The ObjectID of the element that we are currently looking for
template <typename T, typename InterfaceType>
void tryAddTo(T, std::vector<InterfaceType>& relElements, const podio::CollectionBase* coll, const podio::ObjectID id) {
if (auto typedColl = dynamic_cast<const typename T::collection_type*>(coll)) {
if (auto typedColl = dynamic_cast<const T::collection_type*>(coll)) {
const T tmp = (*typedColl)[id.index];
relElements.emplace_back(tmp);
}
Expand Down Expand Up @@ -87,7 +87,7 @@ void addMultiRelation(std::vector<RelType>& relElements, const podio::Collection
if constexpr (podio::detail::isInterfaceType<RelType>) {
addInterfaceToMultiRelation(relElements, coll, id);
} else {
const auto* typeColl = static_cast<const typename RelType::collection_type*>(coll);
const auto* typeColl = static_cast<const RelType::collection_type*>(coll);
relElements.emplace_back((*typeColl)[id.index]);
}
}
Expand All @@ -111,7 +111,7 @@ void addMultiRelation(std::vector<RelType>& relElements, const podio::Collection
/// @param id The ObjectID of the element that we are currently looking for
template <typename T, typename InterfaceType>
void tryAssignTo(T, InterfaceType*& relation, const podio::CollectionBase* coll, const podio::ObjectID id) {
if (const auto* typeColl = dynamic_cast<const typename T::collection_type*>(coll)) {
if (const auto* typeColl = dynamic_cast<const T::collection_type*>(coll)) {
relation = new InterfaceType((*typeColl)[id.index]);
}
}
Expand Down Expand Up @@ -168,11 +168,11 @@ void addSingleRelation(RelType*& relation, const podio::CollectionBase* coll, co
if constexpr (podio::detail::isInterfaceType<RelType>) {
addInterfaceToSingleRelation(relation, coll, id);
} else {
const auto* typeColl = static_cast<const typename RelType::collection_type*>(coll);
const auto* typeColl = static_cast<const RelType::collection_type*>(coll);
relation = new RelType((*typeColl)[id.index]);
}
}

} // namespace podio::detail

#endif // PODIO_DETAIL_INTERFACEIOHELPERS_H
#endif // PODIO_DETAIL_RELATIONIOHELPERS_H
2 changes: 1 addition & 1 deletion python/templates/CollectionData.cc.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{ include }}
{% endfor %}

#include <podio/detail/InterfaceIOHelpers.h>
#include <podio/detail/RelationIOHelpers.h>

{{ utils.namespace_open(class.namespace) }}
{% with class_type = class.bare_type + 'CollectionData' %}
Expand Down

0 comments on commit e757e8a

Please sign in to comment.