-
Notifications
You must be signed in to change notification settings - Fork 38
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
JSON Exporter: Improvements #182
Conversation
Hi Juraj, apologies #185 leads to some merge conflicts here, because I |
Hello @tmadlener, merge resulted only in few conflicts after the clang-format :) Can old edm4hep root files with "metadata" tree instead of "podio_metadata" tree be read somehow using frame? |
Hi @kjvbrt, sorry about the delay. You can use the The only caveat is that collection meta data is currently not supported there. I don't know if you need them. |
The test for the converter requires files to be created in frame compatible manner. Adapting the current write test breaks the following other tests:
|
#184 should in principle introduce Frame based I/O. Let me have a look at that again and potentially merge it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that #184 has been merged, this should also be able to use the test outputs again. It looks like there was no (or a different) .clang-format
file present locally, since there are quite a few format issues flagged by pre-commit
.
I have essentially just minor comments at this point, apart from the partially duplicated podio-dump
functionality, which I don't think should be part of this program.
@kjvbrt - can you follow up with the clang format results on work on those? |
std::string evntStr; | ||
for (auto& evnt : eventVec) { | ||
evntStr += std::to_string(evnt); | ||
evntStr += ","; | ||
} | ||
evntStr.pop_back(); | ||
std::cout << " " << evntStr << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::string evntStr; | |
for (auto& evnt : eventVec) { | |
evntStr += std::to_string(evnt); | |
evntStr += ","; | |
} | |
evntStr.pop_back(); | |
std::cout << " " << evntStr << std::endl; | |
std::cout << eventVec[0]; | |
for (size_t i = 1; i < eventVec.size(); ++i) { | |
std::cout << "," << eventVec[i]; | |
} | |
std::cout << std::endl; |
Avoids copying and re-allocating a string each iteration. (Probably not really a problem here since this is only executed once).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But what about trailing comma?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no trailing comma in this case, because we print the first element of the vector and then put a leading comma in front of all other elements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes :)
Is the [WIP] label still appropriate? Or is this in principle ready to be merged? |
BEGINRELEASENOTES
ENDRELEASENOTES