forked from alisw/AliRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALLDA.txt
158 lines (123 loc) · 5.91 KB
/
INSTALLDA.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
############################################################################
# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
# * *
# * Author: The ALICE Off-line Project. *
# * Contributors are mentioned in the code where appropriate. *
############################################################################
############################################################################
#AliRoot Detector Algorithms build and install documentation #
############################################################################
The instructions bellow describe how to build and install the DAs.
For more information about the Detector Algoritms framework please follow
https://aliceinfo.cern.ch/DAQ/products/da-information
Before following the DA build and install intructions please read the general
AliRoot build and install intructions from INSTALL.txt
############################################################################
#1. DA files and location #
############################################################################
- Name - The file name has to follow a predefined pattern.
OnlineDetectorCodeAlgorithmda.cxx
Example : EMCALLEDda.cxx
OnlineDetectorCode = EMCAL
Algorithm = LED
Example: MUONTRKOCCda.cxx
OnlineDetectorCode = MUON
Algortihm = TRKOCC
- Location - The DA files have to be located inside the DetectorName/DA folder.
Example: EMCAL/DA/EMCALLEDda.cxx
The online detector code can be found here:
https://aliceinfo.cern.ch/DAQ/alice/detector-names-ids-and-codes
Note that the detector code can be different than the AliRoot detector folder name.
############################################################################
2. DA file structure #
############################################################################
The DA file has to follow a certain structure that is used during the rpm creation.
The DA rpm creation needs a description per algorithm. This description is mapped as the
very first comment in the DA file. The full string between the first /* */ will be
extracted and set as the rpm description.
Note that the description has to contain some standard fields. For more information
about these fields please read the Detector Algorithm documentation.
Example:
/*
MTR DA for online
Contact: Franck Manso <[email protected]>
Link: http://aliceinfo.cern.ch/static/Offline/dimuon/muon_html/README_mtrda.html
Reference run: 61898
Run Type: PHYSICS
DA Type: MON
Number of events needed: 1000 events
Input files: MtgGlobalCrate.dat MtgRegionalCrate.dat MtgLocalMask.dat MtgLocalLut.dat MtgCurrent.dat DAConfig.dat
Output Files: ExportedFiles.dat MtgGlobalCrate.dat
Trigger types used: PHYSICS_EVENT CALIBRATION_EVENT
*/
############################################################################
3. Adding a new DA to AliRoot CMake build system #
############################################################################
All the examples are using AliRoot source directory as root folder.
3.1 Create the DA folder and add it to the detector CMakeLists.txt
If the detector does not contain any DAs then the DA folder has to be created and
CMake must be made aware of the new configuration.
Example:
$ cd EMCAL
$ mkdir DA
$ vi/emacs/etc CMakeLists.txt
Add the following lines at the end of the file. These lines will enable the build of the DAs when
DA cmake configure option is activated:
if(DA)
add_subdirectory(DA)
endif(DA)
3.2 Copy the "cmake/DACMakeLists.example" file inside the DA folder as CMakeLists.txt
$ cd EMCAL/DA
$ cp ../../make/DACMakeLists.example CMakeLists.txt
Edit the CMakeLists.txt file by following the instructions inside it.
############################################################################
4. Building, installing and running the DAs #
############################################################################
All the examples assume build directory as root directory.
4.1 Build mandatory requirements
- DATE
- AMORE
- DIM
- daqDA
4.2 Build Environement
In order for the DAs to be build DATE environment has to be loaded
$ source /date/setup.sh
4.3 CMake configuration
DAs build and rpm creation are enabled through the cmake configuration parameters
-DDA=ON
-DARPM=ON
DA set to ON will enable only the build of the DAs, but not the creation of the RPMs
If DARPM is set to ON than DA is automatically enabled.
The mandatory requirements have to be specified
-DAMORE_CONFIG=PATH_TO_amore-config
-DDATE_CONFIG=PATH_TO_date-config
-DDIM=PATH_TO_DIM
-ODIR=linux
-daqDA=PATH_TO_daqDA
Example:
A full configuration line that will enable DA build and rpm creation
$ cmake
-DCMAKE_INSTALL_PREFIX=/home/offline/alice/install-splitdev
-DROOTSYS=/home/offline/alice/root
-DDA=ON
-DDARPM=ON
-DAMORE_CONFIG=/home/offline/amore/amore-config
-DDATE_CONFIG=/date/.commonScripts/date-config
-DDIMDIR=/opt/dim
-DODIR=linux
-DdaqDA=/opt/daqDA-lib
$ALIROOT_SRC
4.4 Build individual or all DAs
For buiding all the DAs it is enough to run make inside the build folder
$ make
There are 2 options to build invidual DA.
- Inside build folder switch to detectors DA folder and run make
Example
$ cd MUON/DA
$ make
- In the main build folder run the DA cmake target
$ make ${DETECTOR}${ALGORITHM}da.exe
The "make" will create the DA executable inside main build folder/DETECTOR/DA
4.5 Install the DAs
"make install" will install the DA execuable inside $CMAKE_INSTALL_PREFIX/bin
and the rpms inside the $CMAKE_INSTALL_PREFIX/darpms