From b81dc259daf31facafbe398ed93abac7d501aae3 Mon Sep 17 00:00:00 2001 From: carltimmer Date: Thu, 5 Dec 2024 14:13:03 -0500 Subject: [PATCH] make c++ and java same --- java/org/jlab/coda/jevio/test/HipoTest.java | 2 ++ src/test/Hipo_Test.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/java/org/jlab/coda/jevio/test/HipoTest.java b/java/org/jlab/coda/jevio/test/HipoTest.java index 9610e4a2..7a4d0502 100644 --- a/java/org/jlab/coda/jevio/test/HipoTest.java +++ b/java/org/jlab/coda/jevio/test/HipoTest.java @@ -102,9 +102,11 @@ void testTreeEventCreation(int tag, int num) throws IOException { writer.setFirstEvent(event); writer.writeEvent(event); + System.out.println(" createObjectEvents: call writer.close()"); writer.close(); // Read event back out of file + System.out.println(" createObjectEvents:create EvioReader"); EvioReader reader = new EvioReader(writeFileName1); System.out.println(" createObjectEvents: have dictionary? " + reader.hasDictionaryXML()); diff --git a/src/test/Hipo_Test.cpp b/src/test/Hipo_Test.cpp index fee1c582..e355ab89 100644 --- a/src/test/Hipo_Test.cpp +++ b/src/test/Hipo_Test.cpp @@ -76,6 +76,8 @@ namespace evio { std::cout << "createCompactEvents: next evio event ->\n" << ev->treeToString("") << std::endl; std::shared_ptr bytes2 = reader.getEvent(0, &len); + std::cout << "createCompactEvents: get event(0), size = " << std::to_string(len) << std::endl << std::endl; + ByteBuffer bb1(20000); reader.getEvent(bb1, 0); std::cout << "createCompactEvents: event 1, bb1 limit ->\n" << bb1.limit() << std::endl; @@ -109,6 +111,7 @@ namespace evio { writer.setFirstEvent(event); writer.writeEvent(event); + std::cout << " createObjectEvents: call writer.close()" << std::endl; writer.close(); // Read event back out of file @@ -143,8 +146,8 @@ namespace evio { int main(int argc, char **argv) { auto tester = evio::HipoTester(); - tester.testCompactEventCreation(1,1); - //tester.testTreeEventCreation(1,1); + //tester.testCompactEventCreation(1,1); + tester.testTreeEventCreation(1,1); return 0; }