Draft: Fix raw event corruption and add more checks in RawEvent::MapView
- The number of banks can't be more than 65535
- The banks in
RawEvent::m_banks
must be grouped by bank type (i.e. there cannot be banks of a different type in between the first and the last bank of a given type).
This was uncovered in Moore!2436 (merged) where due to a problem in the python configuration we were trying to save too many banks (and in the wrong order).
In turn, the extra checks uncovered #330. This MR fixes #330 by extending the lifetime of the raw event memory. A memory leak is also fixed.
Edited by Rosen Matev