mctools / mcpl

Monte Carlo Particle Lists
https://mctools.github.io/mcpl/
Other
29 stars 13 forks source link

C++ RAII Wrapper #61

Open efp opened 2 years ago

efp commented 2 years ago

Greetings,

I plan on incorporating MCPL into a project of mine. Previously, I had used pyne to extract data from MCNP ssw files into an HDF file... while not as widely supported as HDF, this looks like it has better conversion support. And, with the python bindings (yay!) I can convert any way I want. (Question... are the mcpl files portable across OS's?)

However, I can not abide the unmanaged memory of C, I will be writing a RAII C++11 wrapper class for it. Shall I submit it?

tkittel commented 2 years ago

Hi @efp,

The MCPL files should in principle be portable across OS, at least if you stay away from any big-endian systems :-). Having said that, most users are on linux/osx, but certainly there are also some on windows and perhaps freebsd. Beyond that I am not 100% sure what the status is.

And sure, feel free to submit any example code you might create that could potentially help other users :-)

Just be sure to mention explicitly that you release it under the MCPL license (CC0).

And FYI I am actually considering one day to make a pure modern C++ implementation of the MCPL handling code, not just a wrapper (mostly because it would be so very much nicer to deal with). However, it is not something I have concrete plans to do in the near future.

Cheers, Thomas

efp commented 2 years ago

Sounds like you'd like it submitted as an 'example' rather than part of the source distribution?

tkittel commented 2 years ago

Well, given that I haven't seen the code yet, I haven't really decided what to do with it :-) To begin with, just submit it anywhere and then we take it from there.

Cheers, Thomas