]>
Commit | Line | Data |
---|---|---|
7c984355 | 1 | ############################################################################ |
2 | # * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * | |
3 | # * * | |
4 | # * Author: The ALICE Off-line Project. * | |
5 | # * Contributors are mentioned in the code where appropriate. * | |
6 | ############################################################################ | |
7 | ||
8 | ############################################################################ | |
9 | #AliRoot Detector Algorithms build and install documentation # | |
10 | ############################################################################ | |
11 | ||
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 | |
15 | ||
16 | Before following the DA build and install intructions please read the general | |
17 | AliRoot build and install intructions from INSTALL.txt | |
18 | ||
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 | |
25 | DetectorNAme = EMCAL | |
26 | Algorithm = LED | |
27 | Example: MUONTRKOCCda.cxx | |
28 | DetectorName = MUON | |
29 | Algortihm = TRKOCC | |
30 | - Location - The DA files have to be located inside the DetectorName/DA folder. | |
31 | Example: EMCAL/DA/EMCALLEDda.cxx | |
32 | ||
33 | ############################################################################ | |
34 | 2. DA file structure # | |
35 | ############################################################################ | |
36 | ||
37 | The DA file has to follow a certain structure that is used during the rpm creation. | |
38 | ||
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. | |
42 | ||
43 | Note that the description has to contain some standard fields. For more information | |
44 | about these fields please read the Detector Algorithm documentation. | |
45 | ||
46 | Example: | |
47 | /* | |
48 | MTR DA for online | |
49 | ||
50 | Contact: Franck Manso <manso@clermont.in2p3.fr> | |
51 | Link: http://aliceinfo.cern.ch/static/Offline/dimuon/muon_html/README_mtrda.html | |
52 | Reference run: 61898 | |
53 | Run Type: PHYSICS | |
54 | DA Type: MON | |
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 | |
59 | */ | |
60 | ||
61 | ||
62 | ############################################################################ | |
63 | 3. Adding a new DA to AliRoot CMake build system # | |
64 | ############################################################################ | |
65 | ||
66 | All the examples are using AliRoot source directory as root folder. | |
67 | ||
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. | |
71 | ||
72 | ||
73 | Example: | |
74 | $ cd EMCAL | |
75 | $ mkdir DA | |
76 | $ vi/emacs/etc CMakeLists.txt | |
77 | ||
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: | |
80 | ||
81 | if(DA) | |
82 | add_subdirectory(DA) | |
83 | endif(DA) | |
84 | ||
85 | 3.2 Copy the "cmake/DACMakeLists.example" file inside the DA folder as CMakeLists.txt | |
86 | $ cd EMCAL/DA | |
87 | $ cp ../../make/DACMakeLists.example CMakeLists.txt | |
88 | ||
89 | Edit the CMakeLists.txt file by following the instructions inside it. | |
90 | ||
91 | ############################################################################ | |
92 | 4. Building, installing and running the DAs # | |
93 | ############################################################################ | |
94 | ||
95 | All the examples assume build directory as root directory. | |
96 | ||
97 | 4.1 Build mandatory requirements | |
98 | - DATE | |
99 | - AMORE | |
100 | - DIM | |
101 | - daqDA | |
102 | ||
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 | |
106 | ||
107 | 4.3 CMake configuration | |
108 | DAs build and rpm creation are enabled through the cmake configuration parameters | |
109 | -DDA=ON | |
110 | -DARPM=ON | |
111 | ||
168930f9 | 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. | |
114 | ||
7c984355 | 115 | The mandatory requirements have to be specified |
116 | -DAMORE_CONFIG=PATH_TO_amore-config | |
117 | -DDATE_CONFIG=PATH_TO_date-config | |
118 | -DDIM=PATH_TO_DIM | |
119 | -ODIR=linux | |
120 | -daqDA=PATH_TO_daqDA | |
121 | ||
122 | Example: | |
123 | A full configuration line that will enable DA build and rpm creation | |
124 | $ cmake | |
125 | -DCMAKE_INSTALL_PREFIX=/home/offline/alice/install-splitdev | |
126 | -DROOTSYS=/home/offline/alice/root | |
127 | -DDA=ON | |
128 | -DDARPM=ON | |
129 | -DAMORE_CONFIG=/home/offline/amore/amore-config | |
130 | -DDATE_CONFIG=/date/.commonScripts/date-config | |
131 | -DDIMDIR=/opt/dim | |
132 | -DODIR=linux | |
133 | -DdaqDA=/opt/daqDA-lib | |
134 | $ALIROOT_SRC | |
135 | ||
136 | 4.4 Build individual or all DAs | |
137 | For invidual DA build it is enough to switch to the DetectorName/DA folder | |
138 | Example | |
139 | $ cd MUON/DA | |
140 | $ make | |
141 | ||
142 | The "make" will create the DA executable inside the current folder. | |
143 | ||
144 | To trigger the build off all DA run make inside the root build folder | |
145 | ||
146 | 4.5 Install the DAs | |
147 | ||
148 | "make install" will install the DA execuable inside $CMAKE_INSTALL_PREFIX/bin | |
149 | and the rpms inside the $CMAKE_INSTALL_PREFIX/darpms | |
150 |