Setting Up To Use The .NET Wrappers
First you have to configure your machine (i.e. download all the required
software). Then for each project you use it in you have to add two or more
- Download the wrappers and the matching
- Download the version of ROOT that is built with MSVC 2005 .NET.
Currently this is only available in the tar file. You'll need WinZip or
an equivalent utility that understands unix tar files to unpack it.
- Don't mis-match versions. I have no idea what will happen, but I
suspect, due to the design of Windows DLL's, that bad things will
happen. And they will probably happen in a very funny way.
- Unpack and install ROOT - follow the instructions on the ROOT install
- Make sure you can type "root" from the command line in a new MSDOS
window when you are done. This is important because it means your
machine will know where to find the DLL's to execute the ROOT code (and
the wrappers will need to do this).
Download the wrappers and unzip them into a convenient directory.
And you're ready!
You'll have to do these steps for each project. They are the usual things you
do when you want to access a new set of components.
- Add a new reference to your project. Add the ROOT libraries you'll be
accessing (for example, libCore).
- If you are unsure about the library a particular object is in, you
can look at the html documentation on the ROOT site and in the upper
right hand corner the library for a particular object will be listed.
- When you add some of the more advanced libraries for ROOT they may
reference other libraries. The compiler will let you know exactly which
ones you have to add in order for your program to build; just follow the
fairly clear (in this case) error messages.
- Always add the WrapperPlumbingLibrary. This contains some of the base
code for everything.
- If you forget no big deal: the compiler will warn you that it is
missing when you try to do a build. And the error message will even be
clear (imagine that!!).
Now you are ready. You can add a using statement (or the equivalent)
to bring everything in the ROOTNET::Interface (or ROOTNET) namespace into your
global namespace, however your programming style matches! Just remember that any
method that returns a ROOT object will actually return the Interface (for
example, NTFile::Get). You can use it or caste to an object as you prefer.