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

Geant4 version 11.0.4 compile errors #24

Open
whit2333 opened this issue Jun 27, 2024 · 1 comment
Open

Geant4 version 11.0.4 compile errors #24

whit2333 opened this issue Jun 27, 2024 · 1 comment

Comments

@whit2333
Copy link

G4PhysicsModelCatalog

The latest G4 version changed the G4PhysicsModelCatalog interface
latest: https://geant4.kek.jp/Reference/11.2.0/classG4PhysicsModelCatalog.html
v10.05: https://geant4.kek.jp/Reference/10.05/classG4PhysicsModelCatalog.html

G4CMP/library/src/G4CMPConfigManager.cc:111:44: error: ‘Register’ is not a member of ‘G4PhysicsModelCatalog’

Not sure how to fix this one right away.

G4String changes

substr

Also, errors with G4String which no longer has the implicit conversion operator taking two integers:

/G4CMP/library/src/G4CMPConfigManager.cc:169:11: error: no match for call to ‘(G4String) (int, int)’
 if (name(0,3) == "lin") setNIEL(new G4CMPLindhardNIEL);

latest: https://geant4.kek.jp/Reference/11.2.0/classG4String.html
v10.05: https://geant4.kek.jp/Reference/10.05/classG4String.html

I suggest using substr https://en.cppreference.com/w/cpp/string/basic_string/substr

(int,int) -> .substr(int,int)

index

Similar issue with new G4String. Can replace with find.
.index(args) -> .find(args)

Index is just wrapper on https://en.cppreference.com/w/cpp/string/basic_string/find

@kelseymh
Copy link
Owner

kelseymh commented Aug 4, 2024

Apologies for not replying; we haven't used GitHub issues for G4CMP, and I'm not consistently getting notifications about them. The G4CMP package has not been migrated for consistency with Geant4 11 at all. There are multiple interface changes (besides the two you found) which make such a migration irreversable. For now, we're keeping it at Geant4 10.7, for compatibility with the main experimental users. I'll leave this issue open as a reminder.

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

No branches or pull requests

2 participants