There might be many ROD versions worldwide. I worked with the one that I found here at the European Synchrotron Radiation Facility. However, if you're interested in making your ROD version compatible to the IDL RODGUI interface, you will have to convert some of the C modules that are used for building your ROD application. To be precise, I made changes to the files named 'calc.c', 'menu.c', 'myplot1.c', 'plot.c', 'rod.c' and 'rod.h'. You can easily figure out what I changed in these files since I introduced every self made change to the code with three

/* Changes by Andre Wilms */

lines and mark the end of my changes with three

/* End of changes */

lines. You should do the same to your modules if you want to use the RODGUI interface. Just 'Cut & Paste' should work for most of the parts from the files named above.

The most important part is the communciation between the C modules and the IDL code. For UNIX and PC versions this is handled by temporary files. You will get an idea how it has been implemented by having a look at the 'menu.c' file that is in the '/rod/src/' directory. It's not very complicated. All you have to do is to make the same changes to your 'menu.c' module. The other bigger change was the plotting thing. With ROD everything was plotted using platform specific plotting packages. The RODGUI interface offers two dimensional plots made by IDL. In order to move the data from the C code to the IDL functions, I used temporary files the way I used them for the main communication between the interface and the C program. You should change your 'myplot1.c' module the way I changed it in my version.

After making all these changes to your source code, you might finally want to build the executable. If you're working on a UNIX system you should use the 'Makefile' in the '/rod/src/' directory. It currently doesn't support PGPLOT specific plotting routines. If you want to use PGPLOT as well, just change this line

CFLAGS = -Aa -D_HPUX_SOURCE -DRODGUI

to

CFLAGS = -Aa -D_HPUX_SOURCE -DRODGUI -DUSE_PG

This will compile the source code with PGPLOT being defined. When plotting you get two output windows: the PGPLOT and the IDL outputs.

IF you're working on a PC you should use a C/C++ compiler like the one from Microsoft (Visual C++ 5.0) or Borland (Borland C++ 5.0). I don't know how the Borland compiler works so I only refer to the one from Microsoft. Just create a new project in a workspace and include all c and header files to this project. Before compiling you should disable the warnings (in the Project Settings menu) since a compilation with warnings for possible errors cause about 1000 annoying warning messages.

Don't forget to #DEFINE MSDOS (UNIX) in the specific files for the PC / UNIX version respectively. These files should be 'menu.c' and 'rod.h'.

Please note that I am going to work on a MS Windows version in the future (just for the fun of it). It won't make use of IDL but will support the native Windows API. The result should be a ROD version that is much faster than the one written with IDL. On the other hand, I'll have to write all plotting routines myself. That might be a bit difficult when it comes to contour plots where IDL is really good in. Anyway, if you're working at a Macintosh computer and can get your hands on a Visual C++ copy for this sort of machine, you should be able to compile the MS Windows source code also on the Mac.