[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
compiled versus interpreted C++ classes in Root
yo,
i just got done comparing the analysis time for a root
class that used Root's CINT and the same class that was
compiled with root. it was non-trivial getting this to work
(more thanks to steven james). the makefile is below. the
difference between the two is LARGE; a factor of 83. the
results from root are below. this means if we're going to
do production running on the cluster we should compile our code
with root.
later,
jerry
results from root for interpreted code.
root [0] .L eod3.C
root [1] eod3 t
root [2] .! date
Fri Dec 20 14:21:30 EST 2002
root [3] t.Loop()
Analyzing data for Ebeam = 4.232000.
Triggers:138699, ep events:4411, epn events:352.
root [4] .! date
Fri Dec 20 14:39:34 EST 2002
root [5]
same code was compiled into a new executable.
root [1] .! date
Fri Dec 20 14:09:03 EST 2002
root [2] t.Loop()
Analyzing data for Ebeam = 4.232000.
Triggers:138699, ep events:4411, epn events:352.
root [3] .! date
Fri Dec 20 14:09:16 EST 2002
root [4]
Makefile to compile your own root (originally from hovanes).
#
CXXFLAGS = -g -I$(ROOTSYS)/include
LDFLAGS = -g
LD = g++ -v
CXX = g++ -fno-external-templates
LIBS = -lg2c -L/usr/X11R6/lib \
-lc -lm -ldl -lstdc++ -rdynamic \
-L$(ROOTSYS)/lib/ \
-lCint -lGui -lMinuit
-lRFIO -lTreePlayer \
-lCore -lGX11 -lHist
-lNew -lTreeViewer \
-lEG -lGpad -lHistPainter -lPhysics
-lRint -lX3d \
-lGraf -lHtml -lPostscript
-lThread -lXpm \
-lGraf3d -lMatrix -lProof -lTree
\
#
# -lNew -lGraf \
# -lBase -lGraf3d -lMinuit -lRint
-lZip \
# -lCint -lFunc -lGui -lNet -lTree \
# -lClib -lGX11 -lHist -lNew -lUnix
\
# -lCont -lHtml
-lX3d \
# -lGpad -lMatrix -lPostscript -lXpm \
# -lGraf -lMeta -lProof -rdynamic \
-L/usr/X11R6/lib/ \
-lXm -lXt -lX11 \
-lICE -lSM -lXext \
-lXpm -lXp -rdynamic
PROGRAM = gpg_linux
HDRS = eod3.h user_eod3.h
SRCS = main.C eod3.C mydict.C
OBJS = main.o eod3.o mydict.o
all: $(PROGRAM)
$(PROGRAM): $(OBJS)
@echo "Linking $(PROGRAM) ..."
@$(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)
@echo "done"
clean: @rm -f $(OBJS) core mydict.*
###
eod3.o: eod3.h user_eod3.h
mydict.C: eod3.h
@echo "Generating dictionary ..."
@rootcint -f mydict.C -c eod3.h
--
Dr. Gerard P. Gilfoyle
Physics Department e-mail: ggilfoyl@richmond.edu
University of Richmond, VA 23173 phone: 804-289-8255
USA fax: 804-289-8482
- Follow-Ups:
- Motif
- From: Luminita Todor <luminita@jlab.org>