diff --git a/math/genvector/test/CMakeLists.txt b/math/genvector/test/CMakeLists.txt index b8fe57321604f..9b77f9b917190 100644 --- a/math/genvector/test/CMakeLists.txt +++ b/math/genvector/test/CMakeLists.txt @@ -19,6 +19,19 @@ ROOT_EXECUTABLE(testVectorIO testVectorIO.cxx LIBRARIES GenVector Tree Hist Gpad ROOT_ADD_TEST(test-genvector-vectorio COMMAND testVectorIO COPY_TO_BUILDDIR ${CMAKE_CURRENT_SOURCE_DIR}/Track.h) +if (DEFINED ENV{USE_REFLEX}) + REFLEX_GENERATE_DICTIONARY(GVTrackDict Track.h SELECTION TrackDict.xml) +else() + ROOT_GENERATE_DICTIONARY(GVTrackDict Track.h LINKDEF TrackLinkDef.h OPTIONS -inlineInputHeader) +endif() +ROOT_EXECUTABLE(testVectorIOdict testVectorIO.cxx GVTrackDict.cxx LIBRARIES GenVector Tree Hist Gpad Physics) +target_include_directories(testVectorIOdict PRIVATE ./) +if (DEFINED ENV{USE_REFLEX}) + target_compile_definitions(testVectorIOdict PRIVATE USE_REFLEX) +endif() +ROOT_ADD_TEST(test-genvector-vectoriodict COMMAND testVectorIOdict + COPY_TO_BUILDDIR ${CMAKE_CURRENT_SOURCE_DIR}/Track.h) + ROOT_EXECUTABLE(coordinates3D coordinates3D.cxx LIBRARIES GenVector) ROOT_ADD_TEST(test-genvector-coordinates3D COMMAND coordinates3D) diff --git a/math/genvector/test/Makefile b/math/genvector/test/Makefile deleted file mode 100644 index 89f2dfabfa6ad..0000000000000 --- a/math/genvector/test/Makefile +++ /dev/null @@ -1,207 +0,0 @@ -# Makefile for the ROOT test programs. -# This Makefile shows nicely how to compile and link applications -# using the ROOT libraries on all supported platforms. -# -# Copyright (c) 2000 Rene Brun and Fons Rademakers -# -# Author: Fons Rademakers, 29/2/2000 - -ROOTSYS = ../../.. -include $(ROOTSYS)/etc/Makefile.arch - -#------------------------------------------------------------------------------ - -ifeq ($(PLATFORM),win32) -EXTRALIBS = -include:_G__cpp_setupG__GenVector -include:_G__cpp_setupG__GenVector32 "$(ROOTSYS)/lib/libGenVector.lib" -else -EXTRALIBS = -lGenVector -CXXFLAGS += -g -endif - -ifeq ($(DIM),2) -CXXFLAGS += -DDIM_2 -endif -ifeq ($(DIM),3) -CXXFLAGS += -DDIM_3 -endif -ifneq ($(USE_CLHEP),) -CXXFLAGS += -DUSE_CLHEP -endif -ifneq ($(USE_ROOT),) -CXXFLAGS += -DUSE_ROOT -endif - - -# use reflex -#useReflex=yes -ifneq ($(USE_REFLEX),) -GCCXML=yes -CXXFLAGS += -DUSE_REFLEX -endif - - -# if have clhep -ifneq ($(CLHEPBASE),) -CXXFLAGS+= -I$(CLHEPBASE)/include -DHAVE_CLHEP -ifeq ($(PLATFORM),win32) -EXTRALIBS += "$(CLHEPBASE)/lib/CLHEP.lib" -else -#EXTRALIBS+= $(CLHEPBASE)/lib/libCLHEP.a -EXTRALIBS+= -L$(CLHEPBASE)/lib -lCLHEP -endif -endif - - -COORDINATES3DOBJ = coordinates3D.$(ObjSuf) -COORDINATES3DSRC = coordinates3D.$(SrcSuf) -COORDINATES3D = coordinates3D$(ExeSuf) - -COORDINATES4DOBJ = coordinates4D.$(ObjSuf) -COORDINATES4DSRC = coordinates4D.$(SrcSuf) -COORDINATES4D = coordinates4D$(ExeSuf) - -ROTATIONOBJ = rotationApplication.$(ObjSuf) -ROTATIONSRC = rotationApplication.$(SrcSuf) -ROTATION = rotationApplication$(ExeSuf) - -BOOSTOBJ = testBoost.$(ObjSuf) -BOOSTSRC = testBoost.$(SrcSuf) -BOOST = testBoost$(ExeSuf) - -ITERATOROBJ = testIterator.$(ObjSuf) -ITERATORSRC = testIterator.$(SrcSuf) -ITERATOR = testIterator$(ExeSuf) - -GENVECTOROBJ = testGenVector.$(ObjSuf) -GENVECTORSRC = testGenVector.$(SrcSuf) -GENVECTOR = testGenVector$(ExeSuf) - -VECTORIOOBJ = testVectorIO.$(ObjSuf) -VECTORIOSRC = testVectorIO.$(SrcSuf) -VECTORIO = testVectorIO$(ExeSuf) - -STRESS3DOBJ = stress3D.$(ObjSuf) -STRESS3DSRC = stress3D.$(SrcSuf) -STRESS3D = stress3D$(ExeSuf) - -STRESS2DOBJ = stress2D.$(ObjSuf) -STRESS2DSRC = stress2D.$(SrcSuf) -STRESS2D = stress2D$(ExeSuf) - -VECTOROPOBJ = vectorOperation.$(ObjSuf) -VECTOROPSRC = vectorOperation.$(SrcSuf) -VECTOROP = vectorOperation$(ExeSuf) - -#VECTORSCALEOBJ = testVectorScale.$(ObjSuf) -#VECTORSCALESRC = testVectorScale.$(SrcSuf) -#VECTORSCALE = testVectorScale$(ExeSuf) - - -OBJS = $(COORDINATES3DOBJ) $(COORDINATES4DOBJ) $(ROTATIONOBJ) $(BOOSTOBJ) $(GENVECTOROBJ) $(VECTORIOOBJ) $(STRESS3DOBJ) $(STRESS2DOBJ) $(ITERATOROBJ) $(VECTOROPOBJ) - - -PROGRAMS = $(COORDINATES3D) $(COORDINATES4D) $(ROTATION) $(BOOST) $(GENVECTOR) $(VECTORIO) $(STRESS3D) $(STRESS2D) $(ITERATOR) $(VECTOROP) - - - -.SUFFIXES: .$(SrcSuf) .$(ObjSuf) $(ExeSuf) - - -all: $(PROGRAMS) libTrackDict.$(DllSuf) - - -$(COORDINATES3D): $(COORDINATES3DOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(COORDINATES4D): $(COORDINATES4DOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(ROTATION): $(ROTATIONOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(BOOST): $(BOOSTOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(GENVECTOR): $(GENVECTOROBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(VECTORIO): $(VECTORIOOBJ) libTrackDict.$(DllSuf) - $(LD) $(LDFLAGS) $(VECTORIOOBJ) $(LIBS) $(EXTRALIBS) $(EXTRAIOLIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(STRESS3D): $(STRESS3DOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(STRESS2D): $(STRESS2DOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(ITERATOR): $(ITERATOROBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - - -$(VECTOROP): $(VECTOROPOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(EXTRAIOLIBS) $(OutPutOpt)$@ - @echo "$@ done" - -# $(VECTORSCALE): $(VECTORSCALEOBJ) -# $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(EXTRAIOLIBS) $(OutPutOpt)$@ -# @echo "$@ done" - - -ifneq ($(USE_REFLEX),) -TrackDict.$(SrcSuf): Track.h TrackDict.xml - @echo "Generating dictionary $@ using gccxml ..." - genreflex Track.h --selection_file=TrackDict.xml -o TrackDict.cxx -I$(ROOTSYS)/include -else -TrackDict.$(SrcSuf): Track.h TrackLinkDef.h - @echo "Generating dictionary $@ using rootcling ..." - $(ROOTCLING) -f $@ -c $^ -endif - - -libTrackDict.$(DllSuf): TrackDict.$(ObjSuf) -ifeq ($(ARCH),aix) - /usr/ibmcxx/bin/makeC++SharedLib $(OutPutOpt) $@ $(GLIBS) -p 0 $^ -else -ifeq ($(ARCH),aix5) - /usr/vacpp/bin/makeC++SharedLib $(OutPutOpt) $@ $(GLIBS) -p 0 $^ -else -ifeq ($(PLATFORM),macosx) - $(LD) $(SOFLAGS) $^ $(OutPutOpt) $@ -else -ifeq ($(PLATFORM),win32) - bindexplib libTrackDict $^ > libTrackDict.def - lib -nologo -MACHINE:IX86 $^ -def:$*.def \ - $(OutPutOpt)libTrackDict.lib - $(LD) $(SOFLAGS) $(LDFLAGS) $^ libTrackDict.exp $(LIBS) \ - $(OutPutOpt)$@ -else - $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt)$@ -endif -endif -endif -endif - - - - -clean: - @rm -f $(OBJS) core TrackDict.$(SrcSuf) TrackDict.h - -distclean: clean - @rm -f $(PROGRAMS) libTrackDict.* - - -.SUFFIXES: .$(SrcSuf) - - -.$(SrcSuf).$(ObjSuf): - $(CXX) $(CXXFLAGS) -c $< diff --git a/math/mathcore/test/fit/Makefile b/math/mathcore/test/fit/Makefile deleted file mode 100644 index cd78e419fba6b..0000000000000 --- a/math/mathcore/test/fit/Makefile +++ /dev/null @@ -1,114 +0,0 @@ -# Makefile for the ROOT test programs. -# This Makefile shows nicely how to compile and link applications -# using the ROOT libraries on all supported platforms. -# -# Copyright (c) 2000 Rene Brun and Fons Rademakers -# -# Author: Fons Rademakers, 29/2/2000 - - -# RC := root-config -# ifeq ($(shell which $(RC) 2>&1 | sed -ne "s@.*/$(RC)@$(RC)@p"),$(RC)) -# MKARCH := $(wildcard $(shell $(RC) --etcdir)/Makefile.arch) -# RCONFIG := $(wildcard $(shell $(RC) --incdir)/RConfigure.h) -# endif -# ifneq ($(MKARCH),) -# include $(MKARCH) -# else -# ifeq ($(ROOTSYS),) -# ROOTSYS = .. -# endif -# include $(ROOTSYS)/etc/Makefile.arch -# endif - -ifeq ($(ROOTSYS),) -ROOTSYS = ../../../.. -endif -include $(ROOTSYS)/config/Makefile.config -include $(ROOTSYS)/etc/Makefile.arch - -#------------------------------------------------------------------------------ - - - -ifeq ($(PLATFORM),win32) -EXTRALIBS= "$(ROOTSYS)/lib/libMathMore.lib" -ROOFITLIBS= "$(ROOTSYS)/lib/libMinuit.lib" "$(ROOTSYS)/lib/libThread.lib" "$(ROOTSYS)/lib/libHtml.lib" -else -EXTRALIBS= -ROOFITLIBS= -lMathMore -lMinuit -lThread -lHtml -lFoam -CXXFLAGS += -g -endif - -SPARSEDATACOMPAREROBJ = SparseDataComparer.$(ObjSuf) -SPARSEDATACOMPARERSRC = SparseDataComparer.$(SrcSuf) -SPARSEDATACOMPARER = SparseDataComparer$(ExeSuf) - -SPARSEFIT3OBJ = SparseFit3.$(ObjSuf) -SPARSEFIT3SRC = SparseFit3.$(SrcSuf) -SPARSEFIT3 = SparseFit3$(ExeSuf) - -SPARSEFIT4OBJ = SparseFit4.$(ObjSuf) -SPARSEFIT4SRC = SparseFit4.$(SrcSuf) -SPARSEFIT4 = SparseFit4$(ExeSuf) - -TESTFITOBJ = testFit.$(ObjSuf) -TESTFITSRC = testFit.$(SrcSuf) -TESTFIT = testFit$(ExeSuf) - - -TESTMINIMOBJ = testMinim.$(ObjSuf) -TESTMINIMSRC = testMinim.$(SrcSuf) -TESTMINIM = testMinim$(ExeSuf) - -GRAPHFITOBJ = testGraphFit.$(ObjSuf) -GRAPHFITSRC = testGraphFit.$(SrcSuf) -GRAPHFIT = testGraphFit$(ExeSuf) - - -OBJS = $(SPARSEFIT4OBJ) $(SPARSEFIT3OBJ) $(SPARSEDATACOMPAREROBJ) $(TESTFITOBJ) $(TESTMINIMOBJ) $(GRAPHFITOBJ) - - -PROGRAMS = $(SPARSEFIT4) $(SPARSEFIT3) $(SPARSEDATACOMPARER) $(TESTFIT) $(TESTMINIM) $(GRAPHFIT) - - -.SUFFIXES: .$(SrcSuf) .$(ObjSuf) $(ExeSuf) - -all: $(PROGRAMS) - -$(SPARSEFIT4): $(SPARSEFIT4OBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(SPARSEFIT3): $(SPARSEFIT3OBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(SPARSEDATACOMPARER): $(SPARSEDATACOMPAREROBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(TESTFIT): $(TESTFITOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(GRAPHFIT): $(GRAPHFITOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(TESTMINIM): $(TESTMINIMOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -clean: - @rm -f $(OBJS) core - -distclean: clean - @rm -f $(PROGRAMS) - - -.SUFFIXES: .$(SrcSuf) - - -.$(SrcSuf).$(ObjSuf): - $(CXX) $(CXXFLAGS) -c $< diff --git a/math/smatrix/CMakeLists.txt b/math/smatrix/CMakeLists.txt index a1c06b84984e5..e7fe665e34819 100644 --- a/math/smatrix/CMakeLists.txt +++ b/math/smatrix/CMakeLists.txt @@ -57,3 +57,5 @@ ROOT_GENERATE_DICTIONARY(G__Smatrix32 Core MathCore ) + +ROOT_ADD_TEST_SUBDIRECTORY(test) diff --git a/math/smatrix/test/CMakeLists.txt b/math/smatrix/test/CMakeLists.txt new file mode 100644 index 0000000000000..3f80e46d2064b --- /dev/null +++ b/math/smatrix/test/CMakeLists.txt @@ -0,0 +1,52 @@ +# Copyright (C) 1995-2026, Rene Brun and Fons Rademakers. +# All rights reserved. +# +# For the licensing terms see $ROOTSYS/LICENSE. +# For the list of contributors see $ROOTSYS/README/CREDITS. + +# @author Danilo Piparo CERN + +project(smatrix-tests) + +set(Libraries Core RIO Tree Rint Matrix MathCore Hist) + +set(TestSource + testSMatrix.cxx + testOperations.cxx + testKalman.cxx + testIO.cxx + testInversion.cxx + stressOperations.cxx + stressKalman.cxx) + + +if (DEFINED ENV{USE_REFLEX}) + REFLEX_GENERATE_DICTIONARY(TrackDict Track.h SELECTION TrackDict.xml) +else() + ROOT_GENERATE_DICTIONARY(TrackDict Track.h LINKDEF TrackLinkDef.h OPTIONS -inlineInputHeader) +endif() + +#---Build and add all the defined test in the list--------------- +foreach(file ${TestSource}) + get_filename_component(testname ${file} NAME_WE) + if (testname STREQUAL "testIO") + ROOT_EXECUTABLE(${testname} ${file} TrackDict.cxx LIBRARIES ${Libraries}) + else() + ROOT_EXECUTABLE(${testname} ${file} LIBRARIES ${Libraries}) + endif() + target_include_directories(${testname} PRIVATE ./) + if (DEFINED ENV{USE_REFLEX}) + target_compile_definitions(${testname} PRIVATE USE_REFLEX) + endif() + if (DEFINED ENV{CLHEPBASE}) + target_include_directories(${testname} PRIVATE $ENV{CLHEPBASE}) + target_compile_definitions(${testname} PRIVATE HAVE_CLHEP) + if (WIN32) + target_link_libraries(${testname} PRIVATE "$ENV{CLHEPBASE}/lib/CLHEP.lib") + else() + target_link_libraries(${testname} PRIVATE "CLHEP" "m") + target_link_directories(${testname} PRIVATE "$ENV{CLHEPBASE}/lib") + endif() + endif() + ROOT_ADD_TEST(smatrix-${testname} COMMAND ${testname} LABELS ${${testname}_LABELS}) +endforeach() diff --git a/math/smatrix/test/Makefile b/math/smatrix/test/Makefile deleted file mode 100644 index 1c3b803b542a3..0000000000000 --- a/math/smatrix/test/Makefile +++ /dev/null @@ -1,168 +0,0 @@ -# Makefile for the ROOT test programs. -# This Makefile shows nicely how to compile and link applications -# using the ROOT libraries on all supported platforms. -# -# Copyright (c) 2000 Rene Brun and Fons Rademakers -# -# Author: Fons Rademakers, 29/2/2000 - -ifeq ($(ROOTSYS),) -ROOTSYS = ../../.. -endif -include $(ROOTSYS)/etc/Makefile.arch -include $(ROOTSYS)/config/Makefile.config - -#------------------------------------------------------------------------------ - -# ifeq ($(PLATFORM),macosx) -# #unroll loop better on gcc > 4 -# CXXFLAGS+= -O3 -g -funroll-loops -# endif - - - -# if have clhep -#CLHEPBASE=/Users/moneta/mathlibs/CLHEP-1.9.2.2 -ifneq ($(CLHEPBASE),) -CXXFLAGS+= -I$(CLHEPBASE)/include -DHAVE_CLHEP -ifeq ($(PLATFORM),win32) -EXTRALIBS += "$(CLHEPBASE)/lib/CLHEP.lib" -else -#EXTRALIBS+= $(CLHEPBASE)/lib/libCLHEP.a -EXTRALIBS+= -L$(CLHEPBASE)/lib -lCLHEP -endif -endif - -ifneq ($(PLATFORM),win32) -LIBM = -lm -endif - -ifneq ($(USE_REFLEX),) -GCCXML=yes -CXXFLAGS+=-DUSE_REFLEX -endif - - - -TESTSMATRIXOBJ = testSMatrix.$(ObjSuf) -TESTSMATRIXSRC = testSMatrix.$(SrcSuf) -TESTSMATRIX = testSMatrix$(ExeSuf) - -TESTOPERATIONSOBJ = testOperations.$(ObjSuf) -TESTOPERATIONSSRC = testOperations.$(SrcSuf) -TESTOPERATIONS = testOperations$(ExeSuf) - -TESTKALMANOBJ = testKalman.$(ObjSuf) -TESTKALMANSRC = testKalman.$(SrcSuf) -TESTKALMAN = testKalman$(ExeSuf) - -TESTIOOBJ = testIO.$(ObjSuf) -TESTIOSRC = testIO.$(SrcSuf) -TESTIO = testIO$(ExeSuf) - -TESTINVERSIONOBJ = testInversion.$(ObjSuf) -TESTINVERSIONSRC = testInversion.$(SrcSuf) -TESTINVERSION = testInversion$(ExeSuf) - - -STRESSOPERATIONSOBJ = stressOperations.$(ObjSuf) -STRESSOPERATIONSSRC = stressOperations.$(SrcSuf) -STRESSOPERATIONS = stressOperations$(ExeSuf) - - -STRESSKALMANOBJ = stressKalman.$(ObjSuf) -STRESSKALMANSRC = stressKalman.$(SrcSuf) -STRESSKALMAN = stressKalman$(ExeSuf) - - -OBJS = $(TESTSMATRIXOBJ) $(TESTOPERATIONSOBJ) $(TESTKALMANOBJ) $(TESTINVERSIONOBJ) $(TESTIOOBJ) $(STRESSOPERATIONSOBJ) $(STRESSKALMANOBJ) - - -PROGRAMS = $(TESTSMATRIX) $(TESTOPERATIONS) $(TESTKALMAN) $(TESTINVERSION) $(TESTIO) $(STRESSOPERATIONS) $(STRESSKALMAN) - - -.SUFFIXES: .$(SrcSuf) .$(ObjSuf) $(ExeSuf) - - -all: $(PROGRAMS) libTrackDict.$(DllSuf) - -testOperations.$(ObjSuf): matrix_op.h matrix_util.h TestTimer.h - -testKalman.$(ObjSuf): matrix_util.h TestTimer.h - -stressOperations.$(ObjSuf): $(TESTOPERATIONSOBJ) - - -$(TESTSMATRIX): $(TESTSMATRIXOBJ) - $(LD) $(LDFLAGS) $^ $(LIBM) $(OutPutOpt)$@ - @echo "$@ done" - -$(TESTOPERATIONS): $(TESTOPERATIONSOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(TESTKALMAN): $(TESTKALMANOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(TESTINVERSION): $(TESTINVERSIONOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(TESTIO): $(TESTIOOBJ) libTrackDict.$(DllSuf) - $(LD) $(LDFLAGS) $(TESTIOOBJ) $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -ifneq ($(USE_REFLEX),) -TrackDict.$(SrcSuf): Track.h TrackDict.xml - @echo "Generating dictionary $@ using gccxml ..." - genreflex Track.h --selection_file=TrackDict.xml -o TrackDict.cxx -I$(ROOTSYS)/include -else -TrackDict.$(SrcSuf): Track.h TrackLinkDef.h - @echo "Generating dictionary $@ using rootcling ..." - $(ROOTCLING) -f $@ -c $^ -endif - - -libTrackDict.$(DllSuf): TrackDict.$(ObjSuf) -ifeq ($(ARCH),aix) - /usr/ibmcxx/bin/makeC++SharedLib $(OutPutOpt) $@ $(LIBS) -p 0 $^ -else -ifeq ($(ARCH),aix5) - /usr/vacpp/bin/makeC++SharedLib $(OutPutOpt) $@ $(LIBS) -p 0 $^ -else -ifeq ($(PLATFORM),macosx) - $(LD) $(SOFLAGS) $^ $(OutPutOpt) $@ -else - $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(LIBS) $(OutPutOpt)$@ - $(MT_DLL) -endif -endif -endif - - -$(STRESSKALMAN): $(STRESSKALMANOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -$(STRESSOPERATIONS): $(STRESSOPERATIONSOBJ) - $(LD) $(LDFLAGS) $^ $(LIBS) $(EXTRALIBS) $(OutPutOpt)$@ - @echo "$@ done" - -check: all - for prog in $(PROGRAMS); do \ - ./$$prog > $$prog.out; \ - done; - -clean: - @rm -f $(OBJS) $(PROGRAMS) libTrackDict.* TrackDict.$(ObjSuf) TrackDict.$(SrcSuf) TrackDict.h core - -distclean: clean - @rm -f $(PROGRAMS) kalman.root stressOperations.root - - -.SUFFIXES: .$(SrcSuf) - - -.$(SrcSuf).$(ObjSuf): - $(CXX) $(CXXFLAGS) -c $< diff --git a/math/smatrix/test/stressKalman.cxx b/math/smatrix/test/stressKalman.cxx index 6dbe7b53fe20f..ae41260939473 100644 --- a/math/smatrix/test/stressKalman.cxx +++ b/math/smatrix/test/stressKalman.cxx @@ -380,8 +380,8 @@ int TestRunner::test_smatrix_kalman() { // need to write explicitly the dimensions - typedef ROOT::Math::SMatrix MnMatrixNN; - typedef ROOT::Math::SMatrix MnMatrixMM; + // typedef ROOT::Math::SMatrix MnMatrixNN; + // typedef ROOT::Math::SMatrix MnMatrixMM; typedef ROOT::Math::SMatrix MnMatrixNM; typedef ROOT::Math::SMatrix MnMatrixMN; typedef ROOT::Math::SMatrix MnSymMatrixNN; @@ -525,16 +525,16 @@ int TestRunner::test_smatrix_sym_kalman() { // need to write explicitly the dimensions - typedef ROOT::Math::SMatrix MnMatrixNN; - typedef ROOT::Math::SMatrix MnMatrixMM; + // typedef ROOT::Math::SMatrix MnMatrixNN; + // typedef ROOT::Math::SMatrix MnMatrixMM; typedef ROOT::Math::SMatrix MnMatrixNM; typedef ROOT::Math::SMatrix MnMatrixMN; typedef ROOT::Math::SMatrix > MnSymMatrixNN; typedef ROOT::Math::SMatrix > MnSymMatrixMM; typedef ROOT::Math::SVector MnVectorN; typedef ROOT::Math::SVector MnVectorM; - typedef ROOT::Math::SVector MnVectorN2; - typedef ROOT::Math::SVector MnVectorM2; + // typedef ROOT::Math::SVector MnVectorN2; + // typedef ROOT::Math::SVector MnVectorM2; diff --git a/math/smatrix/test/testIO.cxx b/math/smatrix/test/testIO.cxx index d44d4090417c2..0227275c9fc93 100644 --- a/math/smatrix/test/testIO.cxx +++ b/math/smatrix/test/testIO.cxx @@ -1,11 +1,11 @@ // // Cling macro to test I/O of SMatrix classes and compare with a TMatrix -// A ROOT tree is written and read in both using either a SMatrix or +// A ROOT tree is written and read in both using either a SMatrix or // a TMatrixD. // // To execute the macro type in: // -// root[0]: .x smatrixIO.C +// root[0]: .x testIO.cxx #include "Math/SMatrix.h" #include "TMatrixD.h" @@ -470,7 +470,7 @@ double readSMatrix(const std::string & file) { TFile f1(file.c_str()); if (f1.IsZombie() ) { - std::cerr << "Error opening the ROOT file" << file << std::endl; + std::cerr << "Error opening the ROOT file " << file << std::endl; return -1; } @@ -516,7 +516,7 @@ double readSMatrixSym(const std::string & file) { TFile f1(file.c_str()); if (f1.IsZombie() ) { - std::cerr << "Error opening the ROOT file" << file << std::endl; + std::cerr << "Error opening the ROOT file " << file << std::endl; return -1; } @@ -771,7 +771,6 @@ int testRead(double & r1, double & r2, double & r3) { iret = 3; } - return iret; } @@ -823,9 +822,9 @@ int testReadSym(double & r1, double & r2, double & r3) { iret = 13; } - return iret; } + int testResult(double w1, double r1, double w2, double r2, double r3) { int iret = 0; @@ -896,7 +895,7 @@ int testIO() { - double r1, r2, r3 = 0; + double r1, r2, r3 = 0; int iret2 = 0; iret2 |= testRead(r1,r2,r3); iret2 |= testResult(w1,r1,w2,r2,r3); @@ -935,7 +934,7 @@ int testIO() { std::cout << "\n*****************************************************\n\n"; // load track dictionary - iret |= gSystem->Load("libTrackDict"); + // iret |= gSystem->Load("libTrackDict"); if (iret != 0 ) return iret; iret |= testTrack(nEvents); diff --git a/math/smatrix/test/testInversion.cxx b/math/smatrix/test/testInversion.cxx index 550d153ac9a17..65b2e9e457920 100644 --- a/math/smatrix/test/testInversion.cxx +++ b/math/smatrix/test/testInversion.cxx @@ -101,11 +101,11 @@ template void genMatrix(M & m ) { TRandom & r = *gRandom; // generate first diagonal elements - for (int i = 0; i < N; ++i) { + for (int i = 0; i < static_cast(N); ++i) { double maxVal = i*10000/(N-1) + 1; // max condition is 10^4 m(i,i) = r.Uniform(0, maxVal); } - for (int i = 0; i < N; ++i) { + for (int i = 0; i < static_cast(N); ++i) { for (int j = 0; j < i; ++j) { double v = 0.3*std::sqrt( m(i,i) * m(j,j) ); // this makes the matrix pos defined m(i,j) = r.Uniform(0, v); diff --git a/math/smatrix/test/testKalman.cxx b/math/smatrix/test/testKalman.cxx index 1e164eab0097b..65e607243748d 100644 --- a/math/smatrix/test/testKalman.cxx +++ b/math/smatrix/test/testKalman.cxx @@ -46,8 +46,8 @@ int test_smatrix_kalman() { // need to write explicitly the dimensions - typedef SMatrix MnMatrixNN; - typedef SMatrix MnMatrixMM; + // typedef SMatrix MnMatrixNN; + // typedef SMatrix MnMatrixMM; typedef SMatrix MnMatrixNM; typedef SMatrix MnMatrixMN; typedef SMatrix MnSymMatrixNN; @@ -170,16 +170,16 @@ int test_smatrix_sym_kalman() { // need to write explicitly the dimensions - typedef SMatrix MnMatrixNN; - typedef SMatrix MnMatrixMM; + // typedef SMatrix MnMatrixNN; + // typedef SMatrix MnMatrixMM; typedef SMatrix MnMatrixNM; typedef SMatrix MnMatrixMN; typedef SMatrix > MnSymMatrixNN; typedef SMatrix > MnSymMatrixMM; typedef SVector MnVectorN; typedef SVector MnVectorM; - typedef SVector MnVectorN2; - typedef SVector MnVectorM2; + // typedef SVector MnVectorN2; + // typedef SVector MnVectorM2; diff --git a/math/smatrix/test/testOperations.cxx b/math/smatrix/test/testOperations.cxx index 2974c13ca0832..2706b16391bb7 100644 --- a/math/smatrix/test/testOperations.cxx +++ b/math/smatrix/test/testOperations.cxx @@ -87,7 +87,7 @@ int test_smatrix_op() { double r1,r2; - int npass = NITER; + int npass = std::max(int(NITER), int(1)); TRandom3 r(111); for (int k = 0; k < npass; k++) { @@ -194,7 +194,7 @@ int test_smatrix_sym_op() { - int first = NDIM1; //Can change the size of the matrices + int first = std::max(int(NDIM1), int(1)); //Can change the size of the matrices std::cout << "************************************************\n"; @@ -311,7 +311,7 @@ int test_tmatrix_op() { double totTime1, totTime2; double r1,r2; - int npass = NITER; + int npass = std::max(int(1), int(NITER)); TRandom3 r(111); gMatrixCheck = 0; @@ -828,7 +828,8 @@ int main(int argc , char *argv[] ) { TEST(15); TEST(20); NLOOP = 50*NLOOP_MIN; - TEST(30); + TEST(29); + // TEST(30); // NLOOP = NLOOP_MIN; // TEST(50); // TEST(75); diff --git a/math/smatrix/test/testSMatrix.cxx b/math/smatrix/test/testSMatrix.cxx index ba1a0d6e108c5..70b9f5008f4ad 100644 --- a/math/smatrix/test/testSMatrix.cxx +++ b/math/smatrix/test/testSMatrix.cxx @@ -33,6 +33,7 @@ template typename std::enable_if::value, int>::type compare(T a, T b, const std::string &s = "", int ulps = 10) { + (void)ulps; // silence unused variable warning if (a != b) compare_fail(a, b, T(0), T(0), s); return a == b ? 0 : 1; } @@ -1072,9 +1073,9 @@ int test19() for (int i = 0; i < 7; ++i) { for (int j = 0; j <= i; ++j) { if (i == j) - S(i, j) = 10 * float(std::rand()) / (RAND_MAX); // generate between 0,10 + S(i, j) = 10.f * float(std::rand()) / float(RAND_MAX); // generate between 0,10 else - S(i, j) = 2 * float(std::rand()) / (RAND_MAX)-1; // generate between -1,1 + S(i, j) = 2.f * float(std::rand()) / float(RAND_MAX)-1.f; // generate between -1,1 } } int ifail = 0; @@ -1095,9 +1096,9 @@ int test19() for (int i = 0; i < 7; ++i) { for (int j = 0; j < 7; ++j) { if (i == j) - M(i, j) = 10 * float(std::rand()) / (RAND_MAX); // generate between 0,10 + M(i, j) = 10.f * float(std::rand()) / float(RAND_MAX); // generate between 0,10 else - M(i, j) = 2 * float(std::rand()) / (RAND_MAX)-1; // generate between -1,1 + M(i, j) = 2.f * float(std::rand()) / float(RAND_MAX)-1.f; // generate between -1,1 } } ifail = 0;