mcdoc

Farhi farhi at ill.fr
Thu Feb 24 20:37:58 CET 2000


Hy Kristian,

I've just finished my general monitor. It seems that it can handle any set of
1D monitors at the same position, as well as a 2D monitor, and at the samme
time a neutron variable list (such as the one produced by my old kw_monitor).
All current monitors appear obsolete , except 3D if some exist !, or special
ones (some exotic variables).
It handles many options, default values, and automatic limits... I've started
to test it, and it's ok for 0D, multiple 1D at the same place, list of
neutrons (such as kw_monitor), 2D monitors, and mixtures of all this !

About mcdoc:
1- it's great (subdirectories, history, links...)
2- I've seen that there are default vaules, sub directories, optional
parameters. great
3- you should add a line in index.html saying what is a bold component vs a
normal font one
4- I usually define lots of OUTPUT parameters, in order not to mix them with
possible other variables from other components. This produces a long list of
output parameters. I think it's better to move the in/out param sections at
the end of the page
5- It could be fine to set tags (<a name=>) and a short (1 line centered)
table of contents at the begining of html description
6- in mcstas DETECTOR_OUT... functions, also print out the name of output
file after Detector:.... [filename]

Now how should we share the two pages ? I make a tar of my components and
send it to you by mail, and you do the same ?

I think a go home now (it's sure time !!)

EF.

Kristian Nielsen wrote:

> Hi Emmanuel,
>
> I was much inspired by our discussion of the automatic generation of
> documentation (web pages, ...) from the header comments in components. I
> now have a first working version, and I hope we can work together on
> developing it.
>
> First, to see the results go to
>
>     http://neutron.risoe.dk/mcstas/mcdoc/test/
>
> These pages were generated automatically by McDoc from the component
> sources. The Perl program McDoc itself is found at
>
>     http://neutron.risoe.dk/mcstas/mcdoc/test/mcdoc.pl
>
> To generate a set of web pages, you copy the component source codes into
> a directory and issue the command
>
>     perl mcdoc.pl *.comp
>
> Components can also be placed in subdirectories, as seen on the
> demonstration pages, using a command like
>
>     perl mcdoc.pl */*.comp
>
> The comment syntax uses %IDENTIFICATION, %DESCRIPTION, %PARAMETERS, and
> %END keywords to mark the different sections; keywords may be
> %abbreviated.
>
>  * In the identification section, "author:" (or "written by" for backwards
> compatibility) denote author; "date:", "version:", and "origin:" are
> also supported. These must be on a single line. Everything else is part
> of the "short description" of the component.
>
>  * In the parameters section, descriptions have the form
> "name: [unit] text" or "name: text [unit]". These may span multiple
> lines; subsequent lines must be indented by at least four spaces. Note
> that square brackets [] should be used for units. Normal parenthesis are
> also supported for backwards compatibility, but nested parenthesis do
> not work well.
>
>  * The description section contains text in free format.
>
>  * After %END, no more header text is parsed.
>
> I also have an idea for how we can cooperate on maintaining the
> component library. We need to have each a master directory containing
> the components that each of us maintain. For each web server mirror,
> every night (or however often), an automatic job copies the contents of
> both master directory into a single directory on the web server and runs
> the mcdoc.pl script on the contents. This way, either of us can update
> our private master directory individually and the change will be
> reflected on both the Risø and ILL pages.
>
> So, what do you think? I suggest you try to convert the headers of a few
> of your own components and see how it works out. You will probably have
> some suggestions for me about how to improve the header syntax. Once we
> have a good agreement on the syntax, we can start rewriting all the
> headers in the library (I suggest that I handle the 39 components that
> are part of the official v1.2 release and you handle the rest of the
> components on the ILL page).
>
> I also have other plans for how to extend mcdoc. The documentation could
> be made accessible from within the graphical user interface. The
> web-pages should have links to postscript files of the individual
> section in the McStas manual where relevant. And it should be possible
> to put in pictures and links to other web pages (sample instrument for
> example) in a %LINKS section in the header.
>
>  - Kristian.
>
> --
> Kristian Nielsen        kristian.nielsen at risoe.dk
> Risø National Laboratory
> Condensed Matter Physics and Chemistry Department
> Tel. +45 4677 5515   Fax +45 4677 4790

--
Emmanuel FARHI, http://www.ill.fr/tas/people/Farhi.html     \|/ ____ \|/
TAS-Group, Institut Laue-Langevin (ILL) Grenoble            ~@-/ oO \-@~
Avenue des Martyrs, BP 156, 38042 Grenoble Cedex 9,France   /_( \__/ )_\
Work :Tel (33/0) 4 76 20 71 83. Fax (33/0) 4 76 48 39 06       \__U_/
La Grande Arche, Chateau d'Uriage, 38410 Saint Martin d'Uriage 04 76 59 73 94





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


More information about the mcstas-users mailing list