Skip to content

Conversation

@mhemmer-cern
Copy link
Contributor

@mhemmer-cern mhemmer-cern commented May 20, 2025

This commit includes changes to:

  • DataFormats/Detectors/EMCA
  • Detectors/EMCAL/base

Changes are mostly:

  • Change of header guard name
  • Addition of basic information (file, author, brief description)
  • Removal of ROOT variables where easily possible (Double32_t and Float16_t was NOT changed)
  • Clear declaration of previously seemingly magic numbers
  • Additional includes to ensure independence of other header files
  • Proper c++ style casting
  • Single-parameter constructors were marked explicit.
  • Removal of Unary operator& since they are dangerous

Why is unary operator& dangerous?
Example: let's say we have a class MyClass.
Now the Code:
MyClass obj;
MyClass* ptr = &obj; // gets the memory address of obj
seems logical and correct, however, if one has the unary operator& defined within the class to return a reference of some member MyMember of the class, we would have:
MyClass obj;
MyMember* ptr = &obj; // gets the memory address of member of obj
It is better to write a properly named function that returns a reference to the member if it is needed:
MyMember& currentMember() { return mMyMember; }

@github-actions
Copy link
Contributor

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0
async-2024-PbPb-apass1
async-2024-ppRef-apass1
async-2024-PbPb-apass2
async-2023-PbPb-apass5

This commit includes changes to:
- DataFormats/Detectors/EMCA
- Detectors/EMCAL/base
@mhemmer-cern mhemmer-cern changed the title [EMCAL-1152] EMCAL/base: Fix cpplint errors [EMCAL-1152] EMCAL: Fix cpplint errors May 20, 2025
@github-actions
Copy link
Contributor

This PR did not have any update in the last 30 days. Is it still needed? Unless further action in will be closed in 5 days.

@github-actions github-actions bot added the stale label Jun 21, 2025
@github-actions github-actions bot closed this Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant