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

Add new component MDIReader #13

Merged
merged 21 commits into from
Jul 1, 2022
Merged

Add new component MDIReader #13

merged 21 commits into from
Jul 1, 2022

Conversation

aciarma
Copy link
Contributor

@aciarma aciarma commented May 5, 2022

Added MDIReader, to use as input ascii files containing lists of particles.
Formats supported at the moment:

  • GuineaPig++ pairs production
  • XTrack beam losses

@aciarma
Copy link
Contributor Author

aciarma commented May 5, 2022

Not ready yet, when running a test job for MDIReader I get the following error:

WARNING: cannot load libk4Gen.so for factory MDIReader
WARNING: libHepPDT.so: cannot open shared object file: No such file or directory
AlgorithmManager    ERROR Algorithm of type MDIReader is unknown (No factory available).

StatusCode MDIReader::finalize()
{
m_input.close();
std::cout<<"Fine di MDIreader"<<std::endl;
Copy link
Member

Choose a reason for hiding this comment

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

Use gaudi logging instead of std::cout

Suggested change
std::cout<<"Fine di MDIreader"<<std::endl;
debug() << "Finalization of MDIREADER" << endmsg;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I changed also the other std::cout to debug()


#include "GaudiKernel/SystemOfUnits.h"

#include "HepMC/IO_GenEvent.h"
Copy link
Member

Choose a reason for hiding this comment

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

@vvolkl
Copy link
Member

vvolkl commented May 6, 2022

Please also add an example options file and test, like here: https://github.com/HEP-FCC/k4Gen/blob/main/k4Gen/CMakeLists.txt#L49

@aciarma
Copy link
Contributor Author

aciarma commented May 6, 2022

I think it should be ok now. Please let me know if this request can be accepted or if I have to do other modifications.

@aciarma aciarma changed the title [WIP] MDIReader MDIReader May 9, 2022
@vvolkl
Copy link
Member

vvolkl commented May 9, 2022

Yes, looks good. I'd like to split the CMake changes from this PR and properly add the RPATH changes to this repo, I'll take care of that and merge this afterwards.

@vvolkl
Copy link
Member

vvolkl commented May 10, 2022

Hi @aciarma,

I took the liberty of rebasing this onto the RPATH changes in master and added a quick fix. But I have a couple of questions more:

  • Can you remove the geant algorithms from the test? This will complicate the dependencies, here it is enough just to run MDIReader
  • As far as I see, the MDIReader can only ever process one event (one event per file, right?) Maybe allow reading a list of events so more than one can be processed during the same job?
  • I'm surprised you can set mdi_converter.LongitudinalCut = 0 in the job options without declaring this and other floats as Gaudi::Property, can you check this really works?

@vvolkl vvolkl changed the title MDIReader Add new component MDIReader May 10, 2022
@aciarma
Copy link
Contributor Author

aciarma commented Jun 29, 2022

Removed the Geant4 call from the example and verified that the job options work correctly (even if not declared as Gaudi::Property).

CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Member

@vvolkl vvolkl left a comment

Choose a reason for hiding this comment

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

Looks good, thank you very much!

@vvolkl vvolkl merged commit a270867 into HEP-FCC:main Jul 1, 2022
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

Successfully merging this pull request may close these issues.

2 participants