Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for the next PODIO version #269

Merged
merged 3 commits into from
Dec 27, 2023

Conversation

veprbl
Copy link
Contributor

@veprbl veprbl commented Dec 7, 2023

This works with both current and next versions of PODIO - no ifdef checks needed.

See AIDASoft/podio#514 for the reference.

…' is ambiguous

In file included from
/build/source/src/programs/unit_tests/PodioTests.cc:5:
/build/source/src/examples/PodioExample/datamodel/ExampleClusterCollection.h:163:8:
note: candidate: 'void ExampleClusterCollection::push_back(>
  163 |   void push_back(MutableExampleCluster object);
      |        ^~~~~~~~~
/build/source/src/examples/PodioExample/datamodel/ExampleClusterCollection.h:165:8:
note: candidate: 'void ExampleClusterCollection::push_back(>
  165 |   void push_back(ExampleCluster object);
      |        ^~~~~~~~~
Don't seem like JANA2 actually relies on those semantics.

In file included from /build/source/src/programs/unit_tests/PodioTests.cc:2:
/build/source/src/programs/unit_tests/PodioTests.cc: In function 'void podiotests::____C_A_T_C_H____T_E_S_T____6()':
/build/source/src/programs/unit_tests/PodioTests.cc:61:27: error: lvalue required as unary '&' operand
   61 |         REQUIRE(&(a.energy()) == &(b.energy())); // energy() getter returns a const& into the actual data object
      |                  ~~~~~~~~~^~~
/build/source/src/programs/unit_tests/PodioTests.cc:61:44: error: lvalue required as unary '&' operand
   61 |         REQUIRE(&(a.energy()) == &(b.energy())); // energy() getter returns a const& into the actual data object
      |                                   ~~~~~~~~~^~~
@nathanwbrei nathanwbrei merged commit a14ba26 into JeffersonLab:master Dec 27, 2023
3 checks passed
wdconinc added a commit to wdconinc/JANA2 that referenced this pull request Feb 23, 2024
Due to AIDASoft/podio#564 we get compilation errors:
```
  >> 322    /home/wdconinc/git/JANA2/src/examples/PodioExample/PodioExample.cc:46:51: error: call of overloaded 'ExampleHit(<brace-enclosed initializer list>)' is ambiguous
     323       46 |     hits2.push_back(ExampleHit({42, 5, -5, 5, 7.6}));
     324          |                                                   ^
     325    In file included from /home/wdconinc/git/JANA2/src/examples/PodioExample/datamodel/MutableExampleHit.h:8,
     326                     from /home/wdconinc/git/JANA2/src/examples/PodioExample/PodioExample.cc:7:
     327    /home/wdconinc/git/JANA2/src/examples/PodioExample/./datamodel/ExampleHit.h:59:3: note: candidate: 'ExampleHit::ExampleHit(const MutableExampleHit&)'
     328       59 |   ExampleHit(const MutableExampleHit& other);
     329          |   ^~~~~~~~~~
     330    /home/wdconinc/git/JANA2/src/examples/PodioExample/./datamodel/ExampleHit.h:47:3: note: candidate: 'ExampleHit::ExampleHit(const ExampleHit&)'
     331       47 |   ExampleHit(const ExampleHit& other) = default;
     332          |   ^~~~~~~~~~
```
This commit remove the ambiguity that is present by passing an initializer list to a constructor.

After this commit, JANA2 compiles both before and after podio PR 564 (and also with v00-17-03 which is before AIDASoft/podio#514 which led to JeffersonLab#269). There is no minimum podio version specified in CMakeLists.txt to test with.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants