Skip to content

Commit

Permalink
JEventSourcePODIO: support future ROOTFrameReader -> ROOTReader rename (
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl authored Nov 15, 2024
1 parent 7949889 commit 6fdfb28
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/io/podio/JEventSourcePODIO.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void JEventSourcePODIO::Open() {
//------------------------------------------------------------------------------
void JEventSourcePODIO::Close() {
// m_reader.close();
// TODO: ROOTFrameReader does not appear to have a close() method.
// TODO: ROOTReader does not appear to have a close() method.
}


Expand All @@ -196,7 +196,7 @@ void JEventSourcePODIO::GetEvent(std::shared_ptr<JEvent> event) {
Nevents_read = 0;
}else{
// m_reader.close();
// TODO:: ROOTFrameReader does not appear to have a close() method.
// TODO:: ROOTReader does not appear to have a close() method.
throw RETURN_STATUS::kNO_MORE_EVENTS;
}
}
Expand Down
10 changes: 10 additions & 0 deletions src/services/io/podio/JEventSourcePODIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
#include <JANA/JEvent.h>
#include <JANA/JEventSource.h>
#include <JANA/JEventSourceGeneratorT.h>
#include <podio/podioVersion.h>
#if podio_VERSION >= PODIO_VERSION(0, 99, 0)
#include <podio/ROOTReader.h>
#else
#include <podio/ROOTFrameReader.h>
#endif
#include <stddef.h>
#include <memory>
#include <set>
Expand All @@ -32,7 +37,12 @@ class JEventSourcePODIO : public JEventSource {
void PrintCollectionTypeTable(void);

protected:
#if podio_VERSION >= PODIO_VERSION(0, 99, 0)
podio::ROOTReader m_reader;
#else
podio::ROOTFrameReader m_reader;
#endif

size_t Nevents_in_file = 0;
size_t Nevents_read = 0;

Expand Down

0 comments on commit 6fdfb28

Please sign in to comment.