key4hep / eede

EDM4hep Event Data Explorer
https://key4hep.github.io/eede/
BSD 2-Clause "Simplified" License
3 stars 4 forks source link

Show object collection name #59

Closed brauliorivas closed 3 months ago

brauliorivas commented 3 months ago

based on #58 BEGINRELEASENOTES

ENDRELEASENOTES

github-actions[bot] commented 3 months ago

PR Preview Action v1.4.7 :---: Preview removed because the pull request was closed. 2024-07-17 15:16 UTC

tmadlener commented 3 months ago

Hi Braulio, very nice. This doesn't address #47 yet though. What was desired there is that the bitfield is parsed to get the bits out for easier interpretation. I.e. (in python)

def parse_bits(bitfield):
  bits = []
  # assuming here that it's a 32 bit wide number, maybe we need 64 as well?
  for i in range(32):
    if (bitfield & (0x1 << i)):
      bits.append(i)
  return bits

status = 1493172224
status_bits = parse_bits(status)
# [24, 27, 28, 30]

and that could then be used to get the actual strings from this map: https://github.com/key4hep/eede/blob/bc2b522a81cbbc44816da2bf0bae875045bfb37e/js/menu/filter/filter.js#L63-L72

For the box view we could just use the first character and then the mouse-over could have the full strings for example.

brauliorivas commented 3 months ago

Hi Braulio, very nice. This doesn't address #47 yet though. What was desired there is that the bitfield is parsed to get the bits out for easier interpretation. I.e. (in python)

Oh, I forgot about this, we implemented it for the filters. Thank you for explaining it again. Right now, the first character is shown on the box and the full name when mouse over, just like described above. (the original bit field is shown on the box if no parsed bit matches the strings on the map, and no name is shown on mouse over).

tmadlener commented 3 months ago

Very nice, especially the mouse-over with the full strings. Extremely minor nit-pick, I would remove the commas to save space image