Adding macros to create Calibration objects
[u/mrichter/AliRoot.git] / INSTALLDA.txt
CommitLineData
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
12The instructions bellow describe how to build and install the DAs.
13For more information about the Detector Algoritms framework please follow
14https://aliceinfo.cern.ch/DAQ/products/da-information
15
16Before following the DA build and install intructions please read the general
17AliRoot 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############################################################################
342. DA file structure #
35############################################################################
36
37The DA file has to follow a certain structure that is used during the rpm creation.
38
39The DA rpm creation needs a description per algorithm. This description is mapped as the
40very first comment in the DA file. The full string between the first /* */ will be
41extracted and set as the rpm description.
42
43Note that the description has to contain some standard fields. For more information
44about these fields please read the Detector Algorithm documentation.
45
46Example:
47/*
48MTR DA for online
49
50Contact: Franck Manso <manso@clermont.in2p3.fr>
51Link: http://aliceinfo.cern.ch/static/Offline/dimuon/muon_html/README_mtrda.html
52Reference run: 61898
53Run Type: PHYSICS
54DA Type: MON
55Number of events needed: 1000 events
56Input files: MtgGlobalCrate.dat MtgRegionalCrate.dat MtgLocalMask.dat MtgLocalLut.dat MtgCurrent.dat DAConfig.dat
57Output Files: ExportedFiles.dat MtgGlobalCrate.dat
58Trigger types used: PHYSICS_EVENT CALIBRATION_EVENT
59*/
60
61
62############################################################################
633. Adding a new DA to AliRoot CMake build system #
64############################################################################
65
66All the examples are using AliRoot source directory as root folder.
67
683.1 Create the DA folder and add it to the detector CMakeLists.txt
69If the detector does not contain any DAs then the DA folder has to be created and
70CMake must be made aware of the new configuration.
71
72
73Example:
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
853.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
89Edit the CMakeLists.txt file by following the instructions inside it.
90
91############################################################################
924. Building, installing and running the DAs #
93############################################################################
94
95All the examples assume build directory as root directory.
96
974.1 Build mandatory requirements
98 - DATE
99 - AMORE
100 - DIM
101 - daqDA
102
1034.2 Build Environement
104In order for the DAs to be build DATE environment has to be loaded
105 $ source /date/setup.sh
106
1074.3 CMake configuration
108DAs build and rpm creation are enabled through the cmake configuration parameters
109 -DDA=ON
110 -DARPM=ON
111
168930f9 112DA set to ON will enable only the build of the DAs, but not the creation of the RPMs
113If DARPM is set to ON than DA is automatically enabled.
114
7c984355 115The 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
122Example:
123A 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
1364.4 Build individual or all DAs
58051b8b 137For buiding all the DAs it is enough to run make inside the build folder
138 $ make
139
140There are 2 options to build invidual DA.
141 - Inside build folder switch to detectors DA folder and run make
7c984355 142 Example
143 $ cd MUON/DA
144 $ make
145
58051b8b 146 - In the main build folder run the DA cmake target
147 $ make ${DETECTOR}${ALGORITHM}da.exe
7c984355 148
58051b8b 149The "make" will create the DA executable inside main build folder/DETECTOR/DA
7c984355 150
1514.5 Install the DAs
152
153"make install" will install the DA execuable inside $CMAKE_INSTALL_PREFIX/bin
154and the rpms inside the $CMAKE_INSTALL_PREFIX/darpms