]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/SampleLib/README
adding an example calibration component and corresponding macro
[u/mrichter/AliRoot.git] / HLT / SampleLib / README
CommitLineData
6c1a9d9e 1This README describes the procedure to create a customized component
2library for the ALICE HLT.
3
4Please send corrections/suggestions/bugreports to
5Matthias.Richter@ift.uib.no
6
7Part A describes a library embedded into the ALICE HLT build system
8Part B gives a recipe for using this package stand-alone
9
10Note: You can not mix the two alternatives since this would confuse aototools.
11Our suggestions: If you are developing anyway with the AliRoot HLT module
12choose alternative A. If you don't use the HLT module explicitly choose
13alternative B.
14
15If you have downloaded the 'alice-hlt-sample' package and want to build and
16modify it, go directly to Part B.
17
18===============================================================================
19===== =====
20===== Part A: The embedded case =====
21===== =====
22===============================================================================
23
24This describes how to create a new component library embedded into the
25ALICE HLT build system. We asume that you have a version of the AliRoot
26HLT module installed. The top level directory of the package is referred
27as 'topdir' from now on.
28
291. Choose a name for your library and the sub-folder:
30 e.g. 'libAliHLTTest' in folder 'Test'
312. Go to the topdir:
7b969ef7 32$ cd <topdir>
6c1a9d9e 33
343. Copy the SampleLib folder as new 'Test' folder
7b969ef7 35$ cp -a SampleLib Test
6c1a9d9e 36
2d7ff710 374. Copy libAliHLTSample.pkg to libAliHLTTest.pkg
7b969ef7 38$ cp libAliHLTSample.pkg libAliHLTTest.pkg
6c1a9d9e 39
2d7ff710 405. Change dir to the new folder
7b969ef7 41$ cd Test
6c1a9d9e 42
436. Open 'Makefile.am' with an editor
44 This is the Makefile template for the autotools build system. In particular
45 one defines the library to be built to the lib_LTLIBRARIES variable.
46 Furthermore, source and header files have to be specified, but in our case
47 this is done in the 'lib***.pkg file. By using such a file the library can
48 later easily be added to AliRoot.
496.1. replace all strings 'AliHLTSample' with 'AliHLTTest'
50
517. Now, you can think about implementing a new component. The packge contains
52 three example components:
53 - AliHLTDummyComponent: a real component which copies data from the input
54 to the output
55 - AliHLTSampleComponent1/2: two dummy components which just demonstrate
56 how several components can be implemented in one library
57 Each of the components has a header file '<component>.h' and a source code
7b969ef7 58 file '<component>.cxx'
6c1a9d9e 597.1 Take the DummyComponent, copy the two files (to your component name):
7b969ef7 60$ cp AliHLTDummyComponent.h MyTestComponent.h
61$ cp AliHLTDummyComponent.cxx MyTestComponent.cxx
6c1a9d9e 627.2 Implement the required methods. A tutorial will be added to this package
63 soon. A comprehensive online tutorial is available at
64 http://www.kip.uni-heidelberg.de/wiki/HLT
65
668. Once you are finnished with the first code development, you have to add
2d7ff710 67 the new component files to the build system. Open 'libAliHLTTest.pkg' in
68 the package topdir
6c1a9d9e 698.1. Add all your source files to the SRCS variable, remove the files from
70 the libAliHLTSample
718.2. Add all header files of classes which should be added to the ROOT
72 dictionary to the CLASS_HDRS variable, remove the files from the
73 libAliHLTSample
748.3. All other header files must be added to the HDRS variable, including the
75 content of the CLASS_HEADERS
76
779. Now we just have to add our new library to the build system.
789.1 Open Makefile.am in the topdir and add 'Test' to the list of SUBDIRS
799.2 Open configure.ac in the topdir and add 'Test/Makefile' to the list of
80 files to be created: AC_CONFIG_FILES at the end of configure.ac
81
8210.Make sure that all files are saved. Now follow the instruction from the
83 README in the topdir. In principle its enough to go to your build directory
84 and simply type
7b969ef7 85$ make
86$ make install
6c1a9d9e 87
88
89
90===============================================================================
91===== =====
92===== Part B: Stand-alone package =====
93===== =====
94===============================================================================
95
96TOC
97===
981. Overview
992. Requirements
1003. Setting up a version retrieved from CVS
1014. Modifying a distributed package
1025. Installation
1036. Code development
1047. Documentation
1058. Reporting bugs/Asking for support
1069. Committing to the AliRoot CVS
107
1081. Overview
109===========
110This package provides a compilation of shared libraries of the ALICE
111HLT project and is intended for stand-alone compilation, i.e. not as part
112of the AliRoot compilation.
113
114
1152. Requirements
116===============
2d7ff710 117At this point you should have downloaded and unpacked a package with name
118alice-hlt-sample.tar.gz. If not, please download it from
119http://www.kip.uni-heidelberg.de/ti/HLT/software/download/alice-hlt-sample.tar.gz
120The following description refers to that package.
121
6c1a9d9e 122The package needs both ROOT and AliRoot. Both must be set up in the
123usual way (ROOTSYS, ALICE_ROOT, library locations evtl. specified in
124LD_LIBRARY_PATH, ...). The package also needs the ALICE HLT component
125framework. This is part of AliRoot from version v4-05-Release on. You can
126also download the package from
127http://www.kip.uni-heidelberg.de/wiki/HLT
128
129To set up a version retrieved from CVS, autoconf 2.57, automake 1.6
130,and libtool 1.4 or higher versions are required. Thats the versions
131which come with the Scientific Linux CERN 3. The same applies if
132you want to change the Makefiles.
133
134If your GNU build tools are too old, ask the maintainers for a distributed
135package.
136
1373. Setting up a version retrieved from CVS
138==========================================
139Skip this section if you have started from the tar ball.
140
141A version checked out from CVS requires a few steps to set up the Makefiles.
142Go to the directory and run
143autoreconf -i -f
144
145Then continue with the package configuration described in the 'Installation'
146section.
147
1484. Modifying a distributed package
149==================================
150If you are going the modify a distributed package you might need to re-make
151the GNU build system by running
152 autoreconf -f -i
153
154Please notify the authors about bug fixes/corrections/extensions you made if
155you consider them worth to be merged into the project.
156
157Then continue with the package configuration described in the 'Installation'
158section.
159
1605. Installation
161===============
162Package build relies on the GNU triplet configure, make and make install.
163In order to keep the development directory clean, it is recommended to
2d7ff710 164use a separate build directory. Please read the full section before you
165start. The build is in priciple done like
6c1a9d9e 166
167 mkdir build
168 cd build
169 ../configure
170 make
171 make install
172
173You should redirect the output of the make into a file.
174The default install directory is set to the current directory ($PWD). To
175override the default directory use the option --prefix=<dir>. More information
176can be obtained from the configure script by running it with option --help.
177All binary libraries will be installed under <prefix>/lib.
178If the directory is equal to $ALICE_ROOT, the libraries will be installed under
179<prefix>/lib/tgt_<arch> as used for AliRoot. This is a custom extension in
180order to adapt to the specific AliRoot installation directories.
181
182You might need to specify the installation path of the ALICE HLT component
183framework during packge configuration. This can be done by the option
184--with-hltbase.
185Please follow correctly the installation procedure of the framework package.
186
187Note: You can have several build directories with different configure options,
188(e.g. AliRoot versions) but using the same source code.
189
190If you need further information on the GNU build system, execute from the
191top directory:
192./configure --help | less
193
1946. Code Development
195===================
196Once you are finnished with the build of the package, you can think about
197changing the code. The packge contains three example components:
198- AliHLTDummyComponent: a real component which copies data from the input
199 to the output
200- AliHLTSampleComponent1/2: two dummy components which just demonstrate
201 how several components can be implemented in one library
202Each of the components has aheader file '<component>.h' and a source code
203file '<component>.cxx
204
205Leave your build directory and go back to the top directory where you can find
2d7ff710 206the source code as well as the Makefile template Makefile.am.
2071. Choose a new name of your library (the tutorial uses AliHLTTest)
208
2092. Copy libAliHLTSample.pkg to libAliHLTTest.pkg
210> cp libAliHLTSample.pkg libAliHLTTest.pkg
211
2123. follow the instructions 6 to 8 of Part A (embedded case).
6c1a9d9e 213
214When you are done with this, you can build the library by typing 'make' in your
215build directory, and install it by make install.
216
2177. Documentation
218================
219NOTE: DOXYGEN GENERATED DOCUMENTATION WILL BE ADDED SOON !!!
220Documentation is generated from the source code at compile time if
221doxygen is installed on the machine. From the build directory, open
222doc/html/index.html with a web browser.
223
224A wiki with detailed information is set up at
225http://www.kip.uni-heidelberg.de/wiki/HLT
226
2278. Reporting bugs/Asking for support
228====================================
229Please include the following information into your request:
230- config.log from your build directory
231- output of the make process. Note: Redirect BOTH the stdout and stderr
232 channel to a log file. Redirection depends on the shell you are using:
233 bash: make 2>&1 | tee make.log
234 csh: make |& tee make.log
235 The 'tee' command just duplicates the output.
236- history of the commands you are using for compilation
237 history > history.log
238
2399. Committing to the AliRoot CVS
240================================
241At some point you might want to add the library to the AliRoot HLT module.
242Please contact Matthias.Richter@ift.uib.no and send a stable version as a
243tar archive.