Ascii reader/writer vertex count mismatch
Hi HepMC team,
I've recently encountered the 'too few vertices' error using HepMC3 with Herwig.
The source of the problem is that WriterAscii
writes the total number of vertices in the E
declaration, then omits some if it decides they're redundant.
But ReaderAscii
requires the number of vertices it parses to match the count given in the E
declaration, which doesn't take into account the pruning. So if any were omitted by the Writer
, it will parse too few and raise the error.
Locally I've patched this to always print every vertex (which fixes this in the short-term for my purposes).
Perhaps a more permanent fix would be to write the number of excluded vertices at the end of the event? Then ReaderAscii
could check the declared (original) total against the vertices it parses plus those the Writer
says were omitted.
Hope this is clear; do let me know if you need any further details.
Best,
James