1 ############################################################################
2 # * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
4 # * Author: The ALICE Off-line Project. *
5 # * Contributors are mentioned in the code where appropriate. *
6 ############################################################################
8 ############################################################################
9 #AliRoot Detector Algorithms build and install documentation #
10 ############################################################################
12 The instructions bellow describe how to build and install the DAs.
13 For more information about the Detector Algoritms framework please follow
14 https://aliceinfo.cern.ch/DAQ/products/da-information
16 Before following the DA build and install intructions please read the general
17 AliRoot build and install intructions from INSTALL.txt
19 ############################################################################
20 #1. DA files and location #
21 ############################################################################
22 - Name - The file name has to follow a predefined pattern.
23 DetectorNameAlgorithmda.cxx
24 Example : EMCALLEDda.cxx
27 Example: MUONTRKOCCda.cxx
30 - Location - The DA files have to be located inside the DetectorName/DA folder.
31 Example: EMCAL/DA/EMCALLEDda.cxx
33 ############################################################################
34 2. DA file structure #
35 ############################################################################
37 The DA file has to follow a certain structure that is used during the rpm creation.
39 The DA rpm creation needs a description per algorithm. This description is mapped as the
40 very first comment in the DA file. The full string between the first /* */ will be
41 extracted and set as the rpm description.
43 Note that the description has to contain some standard fields. For more information
44 about these fields please read the Detector Algorithm documentation.
50 Contact: Franck Manso <manso@clermont.in2p3.fr>
51 Link: http://aliceinfo.cern.ch/static/Offline/dimuon/muon_html/README_mtrda.html
55 Number of events needed: 1000 events
56 Input files: MtgGlobalCrate.dat MtgRegionalCrate.dat MtgLocalMask.dat MtgLocalLut.dat MtgCurrent.dat DAConfig.dat
57 Output Files: ExportedFiles.dat MtgGlobalCrate.dat
58 Trigger types used: PHYSICS_EVENT CALIBRATION_EVENT
62 ############################################################################
63 3. Adding a new DA to AliRoot CMake build system #
64 ############################################################################
66 All the examples are using AliRoot source directory as root folder.
68 3.1 Create the DA folder and add it to the detector CMakeLists.txt
69 If the detector does not contain any DAs then the DA folder has to be created and
70 CMake must be made aware of the new configuration.
76 $ vi/emacs/etc CMakeLists.txt
78 Add the following lines at the end of the file. These lines will enable the build of the DAs when
79 DA cmake configure option is activated:
85 3.2 Copy the "cmake/DACMakeLists.example" file inside the DA folder as CMakeLists.txt
87 $ cp ../../make/DACMakeLists.example CMakeLists.txt
89 Edit the CMakeLists.txt file by following the instructions inside it.
91 ############################################################################
92 4. Building, installing and running the DAs #
93 ############################################################################
95 All the examples assume build directory as root directory.
97 4.1 Build mandatory requirements
103 4.2 Build Environement
104 In order for the DAs to be build DATE environment has to be loaded
105 $ source /date/setup.sh
107 4.3 CMake configuration
108 DAs build and rpm creation are enabled through the cmake configuration parameters
112 DA set to ON will enable only the build of the DAs, but not the creation of the RPMs
113 If DARPM is set to ON than DA is automatically enabled.
115 The mandatory requirements have to be specified
116 -DAMORE_CONFIG=PATH_TO_amore-config
117 -DDATE_CONFIG=PATH_TO_date-config
123 A full configuration line that will enable DA build and rpm creation
125 -DCMAKE_INSTALL_PREFIX=/home/offline/alice/install-splitdev
126 -DROOTSYS=/home/offline/alice/root
129 -DAMORE_CONFIG=/home/offline/amore/amore-config
130 -DDATE_CONFIG=/date/.commonScripts/date-config
133 -DdaqDA=/opt/daqDA-lib
136 4.4 Build individual or all DAs
137 For buiding all the DAs it is enough to run make inside the build folder
140 There are 2 options to build invidual DA.
141 - Inside build folder switch to detectors DA folder and run make
146 - In the main build folder run the DA cmake target
147 $ make ${DETECTOR}${ALGORITHM}da.exe
149 The "make" will create the DA executable inside main build folder/DETECTOR/DA
153 "make install" will install the DA execuable inside $CMAKE_INSTALL_PREFIX/bin
154 and the rpms inside the $CMAKE_INSTALL_PREFIX/darpms