This is supposed to be the most common scenario since the great majority of Mimotera++ will install this library only a starting point for their own further development.
Mimotera++ uses CMake as a build system. The great advantage of using CMake is that starting from the same source files each user can generate the building framwork he likes most. For example, for a Linux user it will be natural to have Makefiles describing how to build the project, while for Mac developers the easiest way would be to have a Xcode project. The same apply for Windows users that can have a Microsoft Visual Studio project.
- Step 1.The first thing you have to do is to install cmake (>= 2.6.4), if this is not yet available on your computer. CMake can be installed on all major operating systems and has a graphical interface for Mac and Windows and a textual interface for Linux.
- Step 2. The next step is getting the source code of Mimotera++ either using svn as described above or by downloading a tar file from the web repository.
- Step 3. Running CMake to prepare the Makefiles or the Workspaces / Project. This step depends on your operating system. On Windows, from the Program File in the Start Menu, click on CMakeSetup.exe and a GUI will show up. The two most important entries are the one on the upper part: you have to choose where the source code is located and where you want to put the build files. This second location is NOT where you want to have the program installed, but the place where CMake will put all the files generated during the building process before getting to the final library. We reccomend to create a folder named "build" in the source tree and use this. In the bottom part of the window there are all the possible options the user can customize. A very similar window will be appear to Mac user, calling the cmake-gui command. An example is show in the picture here below.
CMake on Mac
When you have finished with the costumization, just press Configure and if this is the first time you do it, you will be asked to choose a Generator, i.e. one of the possible building tool compatible with operating system. Next to the configure button, there is also a Generate one that is enabled only when the configuration is done (it may be needed to press the Configure button twice to lit up the Generate one). Pressing the Generate button causes CMake to create all the files needed by the selected building tools. To make it simpler: press once the Configure button, check that the output is correct and that in the upper part of the window all variables are set to reasonable values (usually they are!). Press Configure a second time (twice is better that once!). Finally press the Generate button.
- Step 4. Build and enjoy! At this point you can build Mimotera++ in the way you are used to because it is embedded in your favorite development system.
The most important targets are the following:
- all. It is the default one and despite its name it does not contain all the other targets. It contains: the library (libMimotera++), the simple example executables and in case CMake has found ROOT in your system, also libMimoteraEvent to be loaded as a plugin in ROOT.
- libMimotera++. This is to build the library only. The core of Mimotera++
- createDummyData. A simple executable that is putting dummy data into a Mimotera file (see examples/createDummyData.cxx )
- convert2ASCII. A simple executable to convert a Mimotera file into ASCII format.
- See also:
- examples/convert2ASCII.cxx
- convert2ROOT. Unless the previous targets, this is available only if CMake was able to find a proper installation of ROOT available on your system during the configuration phase. To help CMake in finding ROOT, verify that root-config is in the path. conver2ROOT is reading an input Mimotera file and producing as an output a ROOT file containing a TTree with mainly two branches: one for the Info block and one for the DataArrays.
- test. The building procedure was successfully, but how do I know if the Mimotera++ is properly working on my system? If this is your question, just try to build the test target. It will execute some generic simple programs to understand if your system is able to use the Mimotera++ library. If even only one test is failing, please report the issue to the developers via the bug tracking system.
- doc. To generate this documentation in a variety of format, just build the doc target. Depending on the external packages, CMake was able to find on your computer, you will get this document as a set of web pages, a pdf document, a set of man pages, a set of winhelp pages...
This is even simpler. From the
Download page choose the operating system / platform / version you would like to install and download it.
The follow the instruction given by the installation wizard.
Now you are ready for Using the Mimotera++