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

Standalone printout only for every 10% of processed events #66

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions standalone/lcio2edm4hep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ int main(int argc, char* argv[]) {

const int nEvt = args.nEvents > 0 ? args.nEvents : lcreader->getNumberOfEvents();
for (int i = 0; i < nEvt; ++i) {
if (i % 10 == 0) {
std::cout << "processing Event: " << i << std::endl;
int percEvt = i * 100 / (nEvt - 1);
if (percEvt % 10 == 0) {
std::cout << "processed amount of events: " << percEvt << "% (event: " << i << ")" << std::endl;
}
auto evt = lcreader->readNextEvent();
// Patching the Event to make sure all events contain the same Collections.
Expand Down
2 changes: 1 addition & 1 deletion tests/compare_contents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int main(int argc, char* argv[]) {

// loop going over every name of the lcio collection and checking if a
// collection with the same name exists in the edm file.
std::cout << "number of Events" << edmreader.getEntries("events") << std::endl;
std::cout << "number of Events " << edmreader.getEntries("events") << std::endl;
for (size_t n = 0; n < edmreader.getEntries("events"); ++n) {
if (n % 10 == 0) {
std::cout << "Event number: " << n << std::endl;
Expand Down
Loading