-
Notifications
You must be signed in to change notification settings - Fork 11
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
Minor updates for TRestGDMLParser #202
Conversation
…d class version (no functional changes)
… user is not defined, to prevent error
…made error exists return error code
…L file is created, create necessary directories if they do not exist
…ing compilation time
@@ -15,7 +15,7 @@ string(REGEX REPLACE "\n$" "" GEANT4_PATH "${GEANT4_PATH}") | |||
set(thisGeant4 "${GEANT4_PATH}/bin/geant4.sh") | |||
|
|||
if (${REST_G4} MATCHES "ON") | |||
set(loadG4 "\# if geant4.sh script is found we load the same Geant4 version as used in compilation\n if [[ -f \"${thisGeant4}\" && ${thisGeant4} != /usr/* ]]; then | |||
set(loadG4 "\# if geant4.sh script is found we load the same Geant4 version as used in compilation\n if [[ -f \\\"${thisGeant4}\\\" && ${thisGeant4} != /usr/* ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a bug fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really sure, it was introduced by @juanangp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a bug fix, it was giving an error after performing cmake
|
||
ClassDef(TRestGDMLParser, 1); | ||
ClassDefOverride(TRestGDMLParser, 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For curiosity, when should we use DefOverride
and why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use ClassDefOverride
in all the inherited functions, also we should mark all the inherited virtual functions with override
, e.g.:
class Parent {
virtual void myInheritedFunction();
ClassDef(Parent, 1);
}
class Children : public Parent {
void myInheritedFunction() override;
ClassDefOverride(Children, 1);
}
In general is a good practise to mark inherited virtual functions with override
, otherwise is difficult to know if the function is inherited. If ClassDefOverride
is not declared, root
gives a lot of warnings while labeling functions as override
I think we should update the template macros to generate different processes or metadata accordingly.
activeVolume
definition not working properly with assemblies restG4#43TRestGDMLParser:
f
...)/tmp
directory instead of failing