gavalian / hipo

High Performance Output Data format for experimental Physics
2 stars 9 forks source link

Implement `bank` row masking #35

Closed c-dilks closed 4 weeks ago

c-dilks commented 11 months ago

To implement a filtering algorithm with signature

void algorithm(bank::list &l);

which is designed to mask/remove certain undesired rows from certain banks, hipo::bank would benefit from a masking method.

One possible implementation, which zeros the row:

void hipo::bank::MaskRow(int row) {
  for(int item = 0; item < getSchema().getEntries(); item++)
    put(item, row, 0);
}

memset to zero would be faster.

Removing undesired rows from a bank is not ideal, since that would require updating other banks' row references; however, this would be a nicer solution if it could be done cleanly.

c-dilks commented 4 weeks ago

This functionality is now handled by hipo::bank::rowlist