Opened 12 years ago
Closed 11 years ago
#182 closed How to (fixed)
How to compile analysis examples macros?
Reported by: | schsu | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Delphes code | Version: | Delphes 3 |
Keywords: | analysis | Cc: |
Description
Dear experts,
Could you help to provide example Makefile how to compile
analysis macros into a binary?
If you could provide examples to build examples/Example1.C
to binary, that would be very helpful enough.
I have included several header files to be able to compile but
I don't know how to solve this compiling errors.
./examples/Example1.C:46: error: ‘jet’ was not declared in this scope
./examples/Example1.C:55: error: ‘Electron’ was not declared in this scope
Thank you,
Shih-Chieh
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
I've added an example that contains all necessary includes. It's in 'examples/Example1.cpp'
The 'configure' script now also looks for '.cpp' files in the 'examples' directory.
Here is a preliminary version:
http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.0.10.pre2.tar.gz
With this new version, you can put your program in a '.cpp' in the 'examples' directory (for example 'examples/my_analysis.cpp) and then the following commands will compile it into a binary:
./configure make
comment:3 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Compilable analysis macro example 'examples/Example1.cpp' is now available in new release 3.0.10.
The easiest solution would be to use 'converters/root2lhco.cpp' as a starting point.
This program has all necessary includes and demonstrates how to access most of the information in the ROOT file.
Then you can put your program in a '.cpp' file in the 'readers' or 'converters' directory.
After that this new '.cpp' file can be compiled with the following commands:
Please, let us now if this solution solves your problem.