Changes between Version 54 and Version 55 of WorkBook/LibraryInterface
- Timestamp:
- Dec 16, 2014, 11:59:52 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WorkBook/LibraryInterface
v54 v55 1 1 == Library Interface == 2 2 3 Here is an explanation of how Delphes' library can be called from a program. 3 Delphes can be used as a library and be included in a third party application. 4 To do so, simply download and compile Delphes as explained in the [wiki:WorkBook/QuickTour Quick start guide]. 4 5 5 == Installation == 6 This creates among other things the {{{libDelphes.so}}} library that can be dynamically linked to any C++ binary. 7 Header files are located in the modules and classes subdirectories: 6 8 7 Commands to download and build the library: 8 {{{ 9 setup ROOT environment variables 9 - {{{modules/Delphes.h}}} 10 - {{{classes/DelphesClasses.h}}} 11 - {{{classes/DelphesFactory.h}}} 10 12 11 wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.1.2.tar.gz12 tar -zxf Delphes-3.1.2.tar.gz13 14 cd Delphes-3.1.215 make -j 416 17 # library18 ls libDelphes.so19 20 # headers21 ls modules/Delphes.h22 ls classes/DelphesClasses.h23 ls classes/DelphesFactory.h24 25 # config file26 ls examples/delphes_card_CMS.tcl27 }}}28 29 == Complete example ==30 31 A fully functional application using the Delphes library can be found in32 {{{33 readers/DelphesSTDHEP.cpp34 }}}35 13 36 14 == Simplified example == 37 15 38 {{{ReadEvent}}}, {{{ReadParticle}}}, {{{ConvertInput}}} and {{{ConvertOutput}}} functions should be implemented by the library'suser.16 The code below shows the basic ingredients to build a standalone application using Delphes. In that template, the {{{ReadEvent}}}, {{{ReadParticle}}}, {{{ConvertInput}}} and {{{ConvertOutput}}} functions should be implemented by the user. 39 17 40 18 {{{ … … 178 156 } 179 157 }}} 158 159 == Complete example == 160 161 A fully functional application using the Delphes library can be found in 162 {{{ 163 readers/DelphesSTDHEP.cpp 164 }}}