Skip to content

Commit

Permalink
make c++ and java same
Browse files Browse the repository at this point in the history
  • Loading branch information
carltimmer committed Dec 5, 2024
1 parent de7f428 commit b81dc25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions java/org/jlab/coda/jevio/test/HipoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
7 changes: 5 additions & 2 deletions src/test/Hipo_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ namespace evio {
std::cout << "createCompactEvents: next evio event ->\n" << ev->treeToString("") << std::endl;

std::shared_ptr<uint8_t> 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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit b81dc25

Please sign in to comment.