[mcstas-users] definition parameters - version 3.1

Peter Kjær Willendrup pkwi at fysik.dtu.dk
Tue May 3 09:47:06 CEST 2022

Dear Santiago,

Your observation is correct, definition parameters are no longer supported by McStas 3.x components.

Most functionality that used definition parameters in the past can however be implemented using other functionality, for instance

* string parm=“some_filename” (or initialise by a char[n] variable from your instrument)

* vector parm={a,b,c,d} (or initialise by a pointer from your instrument)

* Or in the case where you need a “symbol”, e.g. for measuring a “flag” in the instrument, use the new USERVAR feature of the instrument and use a component string variable to probe the user variable via particle_getvar()

For details in the direction of porting instruments and components from McStas 2.x to 3.x please consult one of

HOWTO: Modifying a McStas 2 instrument for use under McStas 3<https://github.com/McStasMcXtrace/McCode/wiki/HOWTO%3A-Modifying-a-McStas-2-instrument-for-use-under-McStas-3>
HOWTO: Modifying a McStas 2 component for use under McStas 3<https://github.com/McStasMcXtrace/McCode/wiki/HOWTO%3A-Modifying-a-McStas-2-component-for-use-under-McStas-3>

If you still fail to port your component(s), please send an example instrument + the relevant component and we will find a way together.


On 2 May 2022, at 23.24, Santiago Gómez <santiago.miguel.gomez at gmail.com<mailto:santiago.miguel.gomez at gmail.com>> wrote:


I can not longer compile instruments with components that use definition parameters as input variables for the new version 3.1 of mcstas.

Are definition parameter still available for this new version?

With best regards

Santiago Miguel Gómez

Si queremos un mundo de paz y de justicia hay que poner decididamente la inteligencia al servicio del amor. Antoine de Saint-Exupery
mcstas-users mailing list
mcstas-users at mcstas.org<mailto:mcstas-users at mcstas.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20220503/d8085661/attachment-0001.html>

More information about the mcstas-users mailing list