Skip to content

ATLASRECTS-7688: xAODMissingET GCC 13 Fixes, main branch (2023.08.14.)

Eliminated the GCC 13 warnings about bitwise operations between different enumeration types, like:

/build/atnight/localbuilds/nightlies/main--dev4LCG/athena/Event/xAOD/xAODMissingET/xAODMissingET/versions/MissingETBase.h:212:107: warning: bitwise operation between different enumeration types ('MissingETBase::Source::Category' and 'MissingETBase::Source::Type') is deprecated [-Wdeprecated-enum-enum-conversion]
      static Types::bitmask_t electron(Region reg=FullAcceptance)                      { return ( Refined | Electron  ) | reg; }
                                                                                                  ~~~~~~~ ^ ~~~~~~~~
/build/atnight/localbuilds/nightlies/main--dev4LCG/athena/Event/xAOD/xAODMissingET/xAODMissingET/versions/MissingETBase.h:219:107: warning: bitwise operation between different enumeration types ('MissingETBase::Source::Category' and 'MissingETBase::Source::Type') is deprecated [-Wdeprecated-enum-enum-conversion]
      static Types::bitmask_t photon(Region reg=FullAcceptance)                        { return ( Refined | Photon    ) | reg; }
                                                                                                  ~~~~~~~ ^ ~~~~~~
/build/atnight/localbuilds/nightlies/main--dev4LCG/athena/Event/xAOD/xAODMissingET/xAODMissingET/versions/MissingETBase.h:226:107: warning: bitwise operation between different enumeration types ('MissingETBase::Source::Category' and 'MissingETBase::Source::Type') is deprecated [-Wdeprecated-enum-enum-conversion]
      static Types::bitmask_t tau(Region reg=FullAcceptance)                           { return ( Refined | Tau       ) | reg; }
                                                                                                  ~~~~~~~ ^ ~~~
/build/atnight/localbuilds/nightlies/main--dev4LCG/athena/Event/xAOD/xAODMissingET/xAODMissingET/versions/MissingETBase.h:233:107: warning: bitwise operation between different enumeration types ('MissingETBase::Source::Category' and 'MissingETBase::Source::Type') is deprecated [-Wdeprecated-enum-enum-conversion]
      static Types::bitmask_t muon(Region reg=FullAcceptance)                          { return ( Refined | Muon      ) | reg; }

See: https://bigpanda.cern.ch/compsview/?nightly=main--dev4LCG_Athena_x86_64-el9-gcc13-opt&rel=2023-08-13T0730&ar=x86_64-el9-gcc13-opt&proj=Athena

At the same time made some functions in MissingETBase::Status constexpr, just for the fun of it. 😛

None of this should make any difference for the code, it's just to make the compiler happy.

Unfortunately I ended up changing a few more lines than absolutely necessary. This is because the MET files used a combination of tabs and spaces, which made my code editor and GitLab disagree on how the files should look. So I ended up converting all modified lines (and enums...) to only using spaces. 🤔

Merge request reports