Skip to content

Commit

Permalink
Code cleanup and addressing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Jan 30, 2024
1 parent 95dac2b commit 5548f4c
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 23 deletions.
1 change: 1 addition & 0 deletions include/podio/AssociationCollection.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifndef PODIO_ASSOCIATIONCOLLECTION_H
#define PODIO_ASSOCIATIONCOLLECTION_H

#include "podio/detail/AssociationCollectionImpl.h"

// Preprocessor helper macros for concatenating tokens at preprocessing times
Expand Down
4 changes: 4 additions & 0 deletions include/podio/detail/Association.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ class AssociationT {

template <typename FromT, typename ToT>
std::ostream& operator<<(std::ostream& os, const Association<FromT, ToT>& assoc) {
if (!assoc.isAvailable()) {
return os << "[not available]";
}

return os << " id: " << assoc.id() << '\n'
<< " weight: " << assoc.getWeight() << '\n'
<< " from: " << assoc.getFrom().id() << '\n'
Expand Down
7 changes: 0 additions & 7 deletions include/podio/utilities/DeprecationMacros.h

This file was deleted.

6 changes: 0 additions & 6 deletions python/templates/MutableObject.h.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ public:
operator {{ class.bare_type }}() const;

public:
// Some typedefs for the Association handling
using MutT = {{ class.namespace }}::Mutable{{ class.bare_type }};
using DefT = {{ class.namespace }}::{{ class.bare_type }};
using CollT = {{ class.namespace }}::{{ class.bare_type }}Collection;

static constexpr auto TypeName = "{{ class.namespace }}::Mutable{{ class.bare_type }}";

{{ macros.member_getters(Members, use_get_syntax) }}
{{ macros.single_relation_getters(OneToOneRelations, use_get_syntax) }}
Expand Down
2 changes: 0 additions & 2 deletions tests/read_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

// Define an association that is used for the I/O tests
using TestAssocCollection = podio::AssociationCollection<ExampleMC, ex42::ExampleWithARelation>;
// Make sure the I/O parts are dynamically registered
PODIO_DECLARE_ASSOCIATION(ExampleMC, ex42::ExampleWithARelation)

template <typename FixedWidthT>
bool check_fixed_width_value(FixedWidthT actual, FixedWidthT expected, const std::string& type) {
Expand Down
6 changes: 0 additions & 6 deletions tests/unittests/associations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,6 @@ TEST_CASE("Associations templated accessors", "[associations]") {
}
}

TEST_CASE("AssociationCollection basics", "[associations]") {
auto coll = TestAColl();

// TODO: basics without I/O
}

TEST_CASE("AssociationCollection constness", "[associations][static-checks][const-correctness]") {
// Test type-aliases in AssociationCollection
STATIC_REQUIRE(std::is_same_v<TestAColl::const_iterator, TestAIter>);
Expand Down
2 changes: 0 additions & 2 deletions tests/write_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

// Define an association that is used for the I/O tests
using TestAssocCollection = podio::AssociationCollection<ExampleMC, ex42::ExampleWithARelation>;
// Make sure the I/O parts are dynamically registered
PODIO_DECLARE_ASSOCIATION(ExampleMC, ex42::ExampleWithARelation)

auto createMCCollection() {
auto mcps = ExampleMCCollection();
Expand Down

0 comments on commit 5548f4c

Please sign in to comment.