]> git.uio.no Git - u/mrichter/AliRoot.git/blob - INSTALLDA.txt
fd5490d6191e9f927159b42d3dc86cd1aa9ef0b8
[u/mrichter/AliRoot.git] / INSTALLDA.txt
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
112 The mandatory requirements have to be specified
113     -DAMORE_CONFIG=PATH_TO_amore-config
114     -DDATE_CONFIG=PATH_TO_date-config
115     -DDIM=PATH_TO_DIM
116     -ODIR=linux
117     -daqDA=PATH_TO_daqDA
118     
119 Example:
120 A full configuration line that will enable DA build and rpm creation
121     $ cmake 
122         -DCMAKE_INSTALL_PREFIX=/home/offline/alice/install-splitdev
123         -DROOTSYS=/home/offline/alice/root
124         -DDA=ON
125         -DDARPM=ON
126         -DAMORE_CONFIG=/home/offline/amore/amore-config
127         -DDATE_CONFIG=/date/.commonScripts/date-config
128         -DDIMDIR=/opt/dim
129         -DODIR=linux
130         -DdaqDA=/opt/daqDA-lib
131         $ALIROOT_SRC
132
133 4.4 Build individual or all DAs
134 For invidual DA build it is enough to switch to the DetectorName/DA folder
135     Example
136     $ cd MUON/DA
137     $ make
138
139 The "make" will create the DA executable inside the current folder.
140
141 To trigger the build off all DA run make inside the root build folder
142
143 4.5 Install the DAs
144
145 "make install" will install the DA execuable inside $CMAKE_INSTALL_PREFIX/bin
146 and the rpms inside the $CMAKE_INSTALL_PREFIX/darpms
147