Fork me on GitHub

Opened 9 years ago

Last modified 9 years ago

#923 new Bug

Failed to read fastjet headers when running a delphes analysis macro

Reported by: john Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: fastjet Cc:

Description

Hi,

When I run a analysis macro in root using delphes library, I come across this error:
Error: Missing one of '
\/' expected at or after line 42.
Error: Unexpected end of file (Gfgetstream():2) external/fastjet/internal/base.hh:46:
* Interpreter error recovered * .

In my analysis code, I have included the following fastjet headers in delphes directory.
#include "external/fastjet/PseudoJet.hh"
#include "external/fastjet/JetDefinition.hh"
#include "external/fastjet/ClusterSequence.hh"
I wonder what's the error about and how can I fix it.

Thanks for the help!

  • John

Attachments (2)

jetMass_s.C (11.5 KB ) - added by john 9 years ago.
jetMass_s.cpp (2.2 KB ) - added by Michele Selvaggi 9 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by john, 9 years ago

I am using Delphes-3.3.1 with root-5 in Ubuntu

Version 0, edited 9 years ago by john (next)

comment:2 by Michele Selvaggi, 9 years ago

can you attach your analysis macro?

by john, 9 years ago

Attachment: jetMass_s.C added

in reply to:  2 comment:3 by john, 9 years ago

Replying to mselvaggi:

can you attach your analysis macro?

Thank you for your reply. I have attached the code.

Aside, when I the first time run the macro, it says "Error: cannot open file "fastjet/internal/base.hh" external/fastjet/internal/numconsts.hh". I changed the include statement of the fastjet header files to "#include external/fastjet/internal/base.hh". Then the error I first mentioned appears.

by Michele Selvaggi, 9 years ago

Attachment: jetMass_s.cpp added

comment:4 by Michele Selvaggi, 9 years ago

Did you try compiling your code?
I attach a simplified version of your code, with instructions below to compile it:

DELPHES_DIR=[your_delphes_path]

EXROOT_DIR=/external/ExRootAnalysis
FJ_DIR=/external

SO_FILE=Delphes

ROOT_INC=root-config --incdir
ROOT_LIB=root-config --libs

DELPHES_LIB="-Wl,-rpath,$DELPHES_DIR -L$DELPHES_DIR -lDelphes"

CXXFLAGS="-I$ROOT_INC -I$DELPHES_DIR -I$DELPHES_DIR/classes -I$DELPHES_DIR/$EXROOT_DIR -I$DELPHES_DIR/$FJ_DIR"
LDFLAGS="$ROOT_LIB -lEG $DELPHES_LIB"

g++ $CXXFLAGS jetMass_s.cpp $LDFLAGS -o jetMass_s.exe

comment:5 by john, 9 years ago

Great! I can now compile the code. Though my root-config somehow doesn't work in the makefile script, I manually put in the root directories in the script, and now everything is working.

Thank you so much for your help and your patience. :D

John

Last edited 9 years ago by john (previous) (diff)
Note: See TracTickets for help on using tickets.