Skip to content

[EMCAL-1156] Modernize EMCal code and fix Digitizer - #15706

Open
mhemmer-cern wants to merge 3 commits into
AliceO2Group:devfrom
mhemmer-cern:emcal
Open

[EMCAL-1156] Modernize EMCal code and fix Digitizer#15706
mhemmer-cern wants to merge 3 commits into
AliceO2Group:devfrom
mhemmer-cern:emcal

Conversation

@mhemmer-cern

Copy link
Copy Markdown
Contributor

Fix a bug in the Digitizer where iLabel was initialized at 0 and the incrementation in the loop was skipped due to always continue if the value is 0 without incrementing the value. Local testing showed that while it is clearly a logic bug, it did not effect MC production.

Modernize EMCal code: EMCALBase/Geometry and ClusterFactory Classes and DataFormatsEMCAL classes:

  • Marking functions as no discard when the return type is not void
  • Switching from gsl::span to std::span to use official stl container
  • Removal of unused includes
  • Ensuring initialization of all members
  • Switching from C-style arrays to either std::array or std::span
  • Removing else after return statements
  • Merging of switch and if statements that had the same body
  • In Cell.cxx add new function unpackV0 to unpack/decode the bitfields. Previously we just reinterpret_cast<const DecodingV0::CellDataPacked*> some const char* variable which violate type safety. Now it uses memcpy to safely copy the data from the buffer into the new DecodingV0::CellDataPacked object.

Fix return type for getCoreRadius (was bool should be float) and argument type for setUseWeightExotic(float useWeightExotic which should be setUseWeightExotic(bool useWeightExotic).

Removes streaming of spans from ROOT IO in ClusterFactory, since they are non owing spans.

Fixed some argument name differences between the definition and implementation of some functions.

mhemmer-cern and others added 3 commits August 21, 2026 14:47
- Moderinze EMCal code: EMCALBase/Geometry and ClusterFactory Classes and DataFormatsEMCAL classes, removing c-style arrays
- Fixing clang-tidy warnings and errors that would appear when using the O2Physics clang-tidy settings
- Switching from gsl::span to std::span to use official stl container

[EMCAL] update
@mhemmer-cern mhemmer-cern changed the title [EMCAL] Modernize EMCal code and fix Digitizer [EMCAL-1156] Modernize EMCal code and fix Digitizer Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants