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

refactor!: organize algorithms in subdirectories #206

Merged
merged 15 commits into from
May 20, 2024
Merged

Conversation

c-dilks
Copy link
Member

@c-dilks c-dilks commented May 13, 2024

The number of files per algorithms has been growing, so the algorithms are now organized into individual subdirectories, with the following files:

File(s) Description
Algorithm.{h,cc} the algorithm implementation
Validator.{h,cc} algorithm validator
Config.yaml algorithm configuration
Bindings.cc C bindings (for Fortran)
  • This change also allows algorithms to include more classes and headers, if needed.
  • This is a breaking change for consumers which include algorithm headers. For example:
#include <iguana/algorithms/clas12/MomentumCorrection.h>             # before the change
#include <iguana/algorithms/clas12/MomentumCorrection/Algorithm.h>   # after the change

Additional changes

  • The iguana-example-* executables also have been renamed, to exclude the numbers
  • Starter algorithm script make_template.sh has been renamed to make_starter.sh

@c-dilks c-dilks force-pushed the organise-algos branch 2 times, most recently from d9c9796 to e3c862f Compare May 14, 2024 03:42
@dglazier
Copy link
Contributor

When is the expected merge for this branch? I would like to add the iguana stuff to the clas12root release, but would prefer to wait for this refactorisation if it is going to be soon.

@c-dilks
Copy link
Member Author

c-dilks commented May 17, 2024

When is the expected merge for this branch?

Early next week, unless we run into any difficult issues here.

@c-dilks c-dilks marked this pull request as ready for review May 17, 2024 20:50
@c-dilks c-dilks requested a review from rtysonCLAS12 as a code owner May 17, 2024 20:50
@c-dilks c-dilks requested a review from dglazier May 17, 2024 20:52
c-dilks added a commit to asligonulacar/iguana that referenced this pull request May 17, 2024
@c-dilks
Copy link
Member Author

c-dilks commented May 17, 2024

@dglazier CI checks pass now. I will review the changes on Monday; I also requested your review, in case you'd like to take a second look or have any feedback.

@c-dilks c-dilks merged commit 1d4087f into main May 20, 2024
44 checks passed
@c-dilks c-dilks deleted the organise-algos branch May 20, 2024 19:52
c-dilks added a commit to asligonulacar/iguana that referenced this pull request May 20, 2024
c-dilks added a commit to Gregtom3/iguana that referenced this pull request May 21, 2024
- renamed: src/iguana/algorithms/clas12/PhotonGBTFilter.cc                      -> src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.cc
- renamed: src/iguana/algorithms/clas12/PhotonGBTFilter.h                       -> src/iguana/algorithms/clas12/PhotonGBTFilter/Algorithm.h
- renamed: src/iguana/algorithms/clas12/PhotonGBTFilter.yaml                    -> src/iguana/algorithms/clas12/PhotonGBTFilter/Config.yaml
- renamed: src/iguana/algorithms/clas12/PhotonGBTFilterValidator.cc             -> src/iguana/algorithms/clas12/PhotonGBTFilter/Validator.cc
- renamed: src/iguana/algorithms/clas12/PhotonGBTFilterValidator.h              -> src/iguana/algorithms/clas12/PhotonGBTFilter/Validator.h
- renamed: src/iguana/algorithms/machine_learning/photon_gbt/RGA_inbending.cpp  -> src/iguana/algorithms/clas12/PhotonGBTFilter/models/RGA_inbending.cpp
- renamed: src/iguana/algorithms/machine_learning/photon_gbt/RGA_outbending.cpp -> src/iguana/algorithms/clas12/PhotonGBTFilter/models/RGA_outbending.cpp
- renamed: src/iguana/algorithms/machine_learning/photon_gbt/RGC_Summer2022.cpp -> src/iguana/algorithms/clas12/PhotonGBTFilter/models/RGC_Summer2022.cpp
@dglazier
Copy link
Contributor

Hi Chris,
It works fine for me. The only slight issue is you end up with long include paths e.g.

  #include <iguana/algorithms/clas12/ZVertexFilter/Algorithm.h>

Cheers
Derek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants