Skip to content
Snippets Groups Projects
Commit db65d90d authored by Ben Couturier's avatar Ben Couturier
Browse files

Added FindXGBoost.cmake and updated configuration and files accordingly

parents e8565d6b ce60ef8a
No related branches found
No related tags found
2 merge requests!1911Remove unnecessary COOL dependency,!1087new pi0 gamma separation tool
......@@ -15,19 +15,12 @@ gaudi_depends_on_subdirs(Calo/CaloInterfaces
Kernel/Relations
Tr/TrackInterfaces)
find_package(Boost)
find_package(ROOT)
include_directories(SYSTEM ${ROOT_INCLUDE_DIRS})
include_directories(/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_88/xgboost/0.60/x86_64-slc6-gcc49-opt/)
include_directories(/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_88/xgboost/0.60/x86_64-slc6-gcc49-opt/include)
find_package(XGBoost REQUIRED)
include_directories(SYSTEM ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
gaudi_add_module(CaloTools
src/*.cpp
INCLUDE_DIRS Tr/TrackInterfaces
LINK_LIBRARIES CaloUtils CaloDetLib LinkerEvent RecEvent TrackEvent GaudiAlgLib LHCbKernel LHCbMathLib RelationsLib)
set(CMAKE_PREFIX_PATH /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_88/xgboost/0.60/x86_64-slc6-gcc49-opt/lib)
include_directories(/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_88/xgboost/0.60/x86_64-slc6-gcc49-opt/rabit/include/)
find_library(XGB_LIB22 xgboost)
TARGET_LINK_LIBRARIES(CaloTools ${XGB_LIB22})
INCLUDE_DIRS Tr/TrackInterfaces XGBoost
LINK_LIBRARIES CaloUtils CaloDetLib LinkerEvent RecEvent TrackEvent GaudiAlgLib LHCbKernel LHCbMathLib RelationsLib XGBoost)
......@@ -293,8 +293,8 @@ bool CaloHypoEstimator::estimator(const LHCb::CaloHypo* hypo){
}
// gamma/pi0 separation
m_data[isPhoton]= m_GammaPi0->isPhoton( hypo );
m_data[isPhotonXGB] = m_GammaPi0XGB->isPhoton( hypo );
m_data[CaloDataType::DataType::isPhoton]= m_GammaPi0->isPhoton( hypo );
m_data[CaloDataType::DataType::isPhotonXGB] = m_GammaPi0XGB->isPhoton( hypo );
// 1- Ecal variables :
......
......@@ -3,7 +3,7 @@
#include <string>
#include <vector>
#include "include/xgboost/c_api.h"
#include "xgboost/c_api.h"
#include "GaudiKernel/ServiceHandle.h"
#include "GaudiKernel/IMessageSvc.h"
#include "GaudiKernel/MsgStream.h"
......
# - Locate XGBoost library
# Defines:
#
# XGBoost_FOUND
# XGBoost_INCLUDE_DIR
# XGBoost_INCLUDE_DIRS (not cached)
# XGBoost_LIBRARY
# XGBoost_LIBRARIES (not cached)
# XGBoost_LIBRARY_DIRS (not cached)
# XGBoost_EXTRA_INCLUDE_DIR
find_path(XGBoost_INCLUDE_DIR xgboost/c_api.h
HINTS $ENV{XGBoost_ROOT_DIR}/include ${XGBoost_ROOT_DIR}/include)
find_path(XGBoost_EXTRA_INCLUDE_DIR rabit/c_api.h
HINTS ${XGBoost_INCLUDE_DIR}/../rabit/include
$ENV{XGBoost_ROOT_DIR}/rabit/include ${XGBoost_ROOT_DIR}/rabit/include)
find_library(XGBoost_LIBRARY NAMES xgboost
HINTS $ENV{XGBoost_ROOT_DIR}/lib ${XGBoost_ROOT_DIR}/lib)
# handle the QUIETLY and REQUIRED arguments and set XGBoost_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XGBoost DEFAULT_MSG XGBoost_INCLUDE_DIR XGBoost_LIBRARY XGBoost_EXTRA_INCLUDE_DIR)
mark_as_advanced(XGBoost_FOUND XGBoost_INCLUDE_DIR XGBoost_LIBRARY XGBoost_EXTRA_INCLUDE_DIR)
set(XGBoost_INCLUDE_DIRS ${XGBoost_INCLUDE_DIR} ${XGBoost_EXTRA_INCLUDE_DIR})
set(XGBoost_LIBRARIES ${XGBoost_LIBRARY})
get_filename_component(XGBoost_LIBRARY_DIRS ${XGBoost_LIBRARY} PATH)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment