Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix namespace pollution from std and o2::constants #11851

Merged
merged 5 commits into from
Sep 27, 2023

Conversation

vkucera
Copy link
Collaborator

@vkucera vkucera commented Sep 1, 2023

Remove using directives in headers polluting the namespace with names from std and o2::constants.
Requires

Copy link
Collaborator

@davidrohr davidrohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sense to me

@vkucera vkucera enabled auto-merge (squash) September 6, 2023 13:58
@alibuild
Copy link
Collaborator

alibuild commented Sep 6, 2023

Error while checking build/O2/fullCI for f6776a1 at 2023-09-25 11:22:

## sw/BUILD/O2Physics-latest/log
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
[ERROR] Function RecoDecay::getMassPDG is deprecated and will be removed soon.
[ERROR] Please use the Mass function in the O2DatabasePDG service instead.
[ERROR] See the example of usage in Tutorials/src/usingPDGService.cxx.
[ERROR] Function RecoDecay::getMassPDG is deprecated and will be removed soon.
[ERROR] Please use the Mass function in the O2DatabasePDG service instead.
[ERROR] See the example of usage in Tutorials/src/usingPDGService.cxx.
[ERROR] Function RecoDecay::getMassPDG is deprecated and will be removed soon.
[ERROR] Please use the Mass function in the O2DatabasePDG service instead.
[ERROR] See the example of usage in Tutorials/src/usingPDGService.cxx.
[ERROR] Function RecoDecay::getMassPDG is deprecated and will be removed soon.
[ERROR] Please use the Mass function in the O2DatabasePDG service instead.
[ERROR] See the example of usage in Tutorials/src/usingPDGService.cxx.
[ERROR] Function RecoDecay::getMassPDG is deprecated and will be removed soon.
[ERROR] Please use the Mass function in the O2DatabasePDG service instead.
[ERROR] See the example of usage in Tutorials/src/usingPDGService.cxx.
[ERROR] Function RecoDecay::getMassPDG is deprecated and will be removed soon.
[ERROR] Please use the Mass function in the O2DatabasePDG service instead.
[ERROR] See the example of usage in Tutorials/src/usingPDGService.cxx.
[ERROR] Function RecoDecay::getMassPDG is deprecated and will be removed soon.
[ERROR] Please use the Mass function in the O2DatabasePDG service instead.
[ERROR] See the example of usage in Tutorials/src/usingPDGService.cxx.
[ERROR] Function RecoDecay::getMassPDG is deprecated and will be removed soon.
[ERROR] Please use the Mass function in the O2DatabasePDG service instead.
[ERROR] See the example of usage in Tutorials/src/usingPDGService.cxx.
[ERROR] Function RecoDecay::getMassPDG is deprecated and will be removed soon.
[ERROR] Please use the Mass function in the O2DatabasePDG service instead.
[ERROR] See the example of usage in Tutorials/src/usingPDGService.cxx.
[ERROR] Function RecoDecay::getMassPDG is deprecated and will be removed soon.
[ERROR] Please use the Mass function in the O2DatabasePDG service instead.
[ERROR] See the example of usage in Tutorials/src/usingPDGService.cxx.
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:163:54: error: 'TwoPI' was not declared in this scope; did you mean 'o2::constants::math::TwoPI'?
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:163:59: error: no matching function for call to 'o2::framework::AxisSpec::AxisSpec(<brace-enclosed initializer list>)'
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:302:43: error: 'array' does not name a type; did you mean 'TArray'?
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:302:48: error: expected ',' or '...' before '<' token
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:304:64: error: 'array' does not name a type; did you mean 'TArray'?
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:304:69: error: expected ',' or '...' before '<' token
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:781:64: error: 'array' does not name a type; did you mean 'TArray'?
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:781:69: error: expected ',' or '...' before '<' token
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:785:7: error: 'activateQA' was not declared in this scope
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:787:7: error: 'hV0Selected' was not declared in this scope; did you mean 'isSelected'?
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:792:17: error: 'dauTracks' was not declared in this scope; did you mean 'Tracks'?
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:793:9: error: 'activateQA' was not declared in this scope
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:795:9: error: 'hV0Selected' was not declared in this scope; did you mean 'isSelected'?
/sw/SOURCES/O2Physics/11851-slc8_x86-64/0/EventFiltering/PWGHF/HFFilterHelpers.h:804:9: error: 'activateQA' was not declared in this scope
[0 more errors; see full log]

Full log here.

@vkucera
Copy link
Collaborator Author

vkucera commented Sep 6, 2023

Looks like SOURCES/QualityControl/v1.114.2/v1.114.2/Modules/FOCAL/src/TestbeamRawTask.cxx depends on this pollution and needs to be fixed first.

@Barthelemy
Copy link
Collaborator

Hi, I can do that. Let me see.

@vkucera
Copy link
Collaborator Author

vkucera commented Sep 11, 2023

Hi, I can do that. Let me see.

Hi @Barthelemy , that would be very helpful. Thanks!

@Barthelemy
Copy link
Collaborator

@vkucera AliceO2Group/QualityControl#1980

@vkucera
Copy link
Collaborator Author

vkucera commented Sep 25, 2023

Requires AliceO2Group/O2Physics#3505

@vkucera
Copy link
Collaborator Author

vkucera commented Sep 27, 2023

All green except for the macOS build which seems to be broken for all PRs. Can we merge this?

@davidrohr davidrohr disabled auto-merge September 27, 2023 09:29
@davidrohr davidrohr merged commit 7c43d6d into AliceO2Group:dev Sep 27, 2023
@vkucera vkucera deleted the namespace branch September 27, 2023 09:34
leo-barreto pushed a commit to leo-barreto/AliceO2 that referenced this pull request Nov 16, 2023
…11851)

* Remove std namespace from CCDBDownloader.h

* Remove std namespace from DataBlockBase.h

* Remove math namespace from AnalysisDataModel.h

* Clean TPCSimulation/Digitizer.h

* Clean SACDecoder.h
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.

4 participants