Position and targeting
Kristian Nielsen
kristian.nielsen at risoe.dk
Tue Mar 28 12:06:10 CEST 2000
> Date: Tue, 28 Mar 2000 09:56:00 +0200
> From: Farhi <farhi at ill.fr>
> I'm designing a general source for McStas, with option string such as
> for the Monitor_nD (enabling many cross-options and extended
> customization). For this, a possible option for source (and usefull !)
> is to target to a specified component. For this, I need to get the
> distance from the source to the next component. This is stored into the
> 'mcposa*' structures, but these are defined AFTER the initialization of
> all components. In order to be able to use these informations during
> init of components, would it be possible to move the /* Computation of
> coordinate transformations. */ at the begining of the mcinit function ?
> Then with a
> #define MC_GETPOS(comp) (mcrota ## comp )
> it would be possible to access all component positions during init of
> components...
Yes, I have intended to implement something like this for a long
time. It is clearly needed for components to be able to ask for the
position of other components like you suggest. There was some
complitation (can't remember what just now), but it should clearly be
possible. I will try go get it done for the next release in May (or
sooner, if it turns out to be very simple).
I am also thinking that it would be useful to support the "option style"
that you have used so successfully in a better way in the McStas core?
Either through extended syntax, or with some library calls for
components.
Another thing: Did you notice that the McDoc documentation on the Risø Web
pages for your Flux_adapter is messed up? The reason seems to be that
the automatic script downloads an old version of the file. In fact, I
just tried to download the Flux_adapter.comp source from
http://www.ill.fr/tas/mcstas/src/sources/Flux_adapter.comp
and that is indeed an old version without McDoc tags. Any idea what
might be wrong?
- Kristian.
More information about the mcstas-users
mailing list