Commit c6ba9341 authored by Jérémie Dudouet's avatar Jérémie Dudouet
Browse files

Merge branch 'preprod' into 'master'

Preprod, including last Cubix developments

See merge request !35
parents 67041426 e65bfbb3
Pipeline #27225 passed with stage
in 3 minutes and 28 seconds
...@@ -18,7 +18,7 @@ compile: ...@@ -18,7 +18,7 @@ compile:
- mv gammaware adf - mv gammaware adf
- cd .. - cd ..
- echo "Compilation of ADF..." - echo "Compilation of ADF..."
- python scripts/gRaySoftware.py --cmake="-DCMAKE_BUILD_TYPE=debug -- -j 4" --adf= conf compile install - python scripts/gRaySoftware.py --cmake="-DCMAKE_BUILD_TYPE=Debug -- -j 4" --adf= conf compile install
- cd LYON - cd LYON
- cp -r ../../gammaware/ . - cp -r ../../gammaware/ .
- mv gammaware gw - mv gammaware gw
...@@ -28,7 +28,7 @@ compile: ...@@ -28,7 +28,7 @@ compile:
- export LD_LIBRARY_PATH=$ROOTSYS/lib/:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH=$ROOTSYS/lib/:$LD_LIBRARY_PATH
- echo "Compilation with ROOT..." - echo "Compilation with ROOT..."
- echo $PWD - echo $PWD
- python scripts/gRaySoftware.py --cmake="-DCMAKE_BUILD_TYPE=debug -- -j 4" --gw= conf compile install - python scripts/gRaySoftware.py --cmake="-DCMAKE_BUILD_TYPE=Debug -- -j 4" --gw= conf compile install
- cd LYON/gw/ - cd LYON/gw/
- mkdir -p cppcheck_output - mkdir -p cppcheck_output
- cppcheck --xml --xml-version=2 --enable=style,performance,portability,unusedFunction -i config -i debug -i cmake -i demos -i doc -i doxyfiles -i icons -i macros -i ndb -i scripts . 2> cppcheck_output/output.xml - cppcheck --xml --xml-version=2 --enable=style,performance,portability,unusedFunction -i config -i debug -i cmake -i demos -i doc -i doxyfiles -i icons -i macros -i ndb -i scripts . 2> cppcheck_output/output.xml
......
...@@ -79,19 +79,12 @@ STRING(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+.*" "\\1" found_root_ ...@@ -79,19 +79,12 @@ STRING(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+.*" "\\1" found_root_
STRING(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" found_root_minor_vers "${ROOTVERSION}") STRING(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" found_root_minor_vers "${ROOTVERSION}")
STRING(REGEX REPLACE "^[0-9]+\\.[0-9][0-9]+\\/([0-9][0-9]+).*" "\\1" found_root_patch_vers "${ROOTVERSION}") STRING(REGEX REPLACE "^[0-9]+\\.[0-9][0-9]+\\/([0-9][0-9]+).*" "\\1" found_root_patch_vers "${ROOTVERSION}")
IF (found_root_major_vers LESS 5)
MESSAGE( FATAL_ERROR "Invalid ROOT version \"${ROOTERSION}\", at least major version 4 is required, e.g. \"5.00/00\"")
ENDIF (found_root_major_vers LESS 5)
#
SET(RDICTIONNARY 0)
IF (found_root_major_vers LESS 6) IF (found_root_major_vers LESS 6)
include(Root5NewMacros) MESSAGE( FATAL_ERROR "Invalid ROOT version \"${ROOTERSION}\", at least major version 6 is required, e.g. \"6.00/00\"")
MESSAGE("[Gw] Dictionary Build using ROOTCINT") ENDIF (found_root_major_vers LESS 6)
ELSE(found_root_major_vers LESS 6) #
include(Root6NewMacros) include(Root6NewMacros)
SET(RDICTIONNARY 1) MESSAGE("[Gw] Dictionary Build using ROOTCLING ")
MESSAGE("[Gw] Dictionary Build using ROOTCLING ")
ENDIF(found_root_major_vers LESS 6)
# #
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-uninitialized -Wno-unused-function -Wno-unused-result -Wno-unused-variable -Wno-overloaded-virtual -Wno-switch") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-uninitialized -Wno-unused-function -Wno-unused-result -Wno-unused-variable -Wno-overloaded-virtual -Wno-switch")
...@@ -100,7 +93,6 @@ MESSAGE("[GW from ROOT] C Compiler ${CMAKE_C_COMPILER}") ...@@ -100,7 +93,6 @@ MESSAGE("[GW from ROOT] C Compiler ${CMAKE_C_COMPILER}")
MESSAGE("[GW from ROOT] C++ Compiler ${CMAKE_CXX_COMPILER}") MESSAGE("[GW from ROOT] C++ Compiler ${CMAKE_CXX_COMPILER}")
MESSAGE("[GW from ROOT] Compiler Flags: ${CMAKE_CXX_FLAGS} ") MESSAGE("[GW from ROOT] Compiler Flags: ${CMAKE_CXX_FLAGS} ")
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# configuration for all modules # configuration for all modules
# #
...@@ -144,26 +136,17 @@ endif() ...@@ -144,26 +136,17 @@ endif()
option(DO_DEV "If ON, the GWDEV library is also built" OFF) option(DO_DEV "If ON, the GWDEV library is also built" OFF)
option(DO_ILL "If ON, the GWILL library is also built" OFF) option(DO_ILL "If ON, the GWILL library is also built" OFF)
# #
add_subdirectory (src/root/core)
add_subdirectory (src/root/physics)
add_subdirectory (src/root/tools)
add_subdirectory (src/system)
add_subdirectory (src/root/gem)
add_subdirectory (src/adf) add_subdirectory (src/adf)
add_subdirectory (src/root/adfe) add_subdirectory (src/system)
add_subdirectory (src/root)
add_subdirectory (src/deprecated) add_subdirectory (src/deprecated)
add_subdirectory (src/root/gui)
# #
if ( DO_DEV ) if ( DO_DEV )
add_subdirectory (src/dev) add_subdirectory (src/dev)
endif() endif()
#set ( DO_ILL true )
if ( DO_ILL )
add_subdirectory (src/root/ILL)
endif()
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Global configure/install/copies # Global configure/install/copies
# #
......
...@@ -52,16 +52,9 @@ endforeach() ...@@ -52,16 +52,9 @@ endforeach()
# #
# Dictionnary from one file only 'a la ROOT' + internal and external dependencies # Dictionnary from one file only 'a la ROOT' + internal and external dependencies
# #
if ( RDICTIONNARY EQUAL 1 ) ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} MODULE ${GWLIBNAME} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h OPTIONS "")
ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} MODULE ${GWLIBNAME} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h OPTIONS "")
set( EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore XMLParser Hist Gui ) set(EXTRA_INTERNAL_LIBRARIES GWCORE)
# MESSAGE("[GW-CLING]")
else ()
ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h)
set( EXTRA_EXTERNAL_LIBRARIES Core Cint Graf MathCore XMLParser Hist Gui)
# MESSAGE("[GW-CINT]")
endif()
set(EXTRA_INTERNAL_LIBRARIES GWCORE GWADF GWADFE GWPHYSICS GWTOOLS GWGEM GWSYSTEM)
# #
foreach( f ${without_dictionnaries} ) foreach( f ${without_dictionnaries} )
...@@ -105,9 +98,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin ...@@ -105,9 +98,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin
# #
install(FILES ${headers} DESTINATION ${GW_INCLUDE_DIR} COMPONENT headers ) install(FILES ${headers} DESTINATION ${GW_INCLUDE_DIR} COMPONENT headers )
if ( with_dictionnaries ) if ( with_dictionnaries )
if ( RDICTIONNARY EQUAL 1 )
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}_rdict.pcm DESTINATION lib COMPONENT libraries ) install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}_rdict.pcm DESTINATION lib COMPONENT libraries )
endif()
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}.rootmap DESTINATION lib COMPONENT libraries ) install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}.rootmap DESTINATION lib COMPONENT libraries )
endif() endif()
......
...@@ -59,15 +59,7 @@ endforeach() ...@@ -59,15 +59,7 @@ endforeach()
# #
# Dictionnary from one file only 'a la ROOT' + internal and external dependencies # Dictionnary from one file only 'a la ROOT' + internal and external dependencies
# #
if ( RDICTIONNARY EQUAL 1 )
# ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} MODULE ${GWLIBNAME} LINKDEF LinkDef.h OPTIONS "") # ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} MODULE ${GWLIBNAME} LINKDEF LinkDef.h OPTIONS "")
set( EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore XMLParser Hist Thread Gpad )
# MESSAGE("[GW-CLING]")
else ()
# ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h)
set( EXTRA_EXTERNAL_LIBRARIES Core Cint Graf MathCore XMLParser Hist Thread Gpad)
# MESSAGE("[GW-CINT]")
endif()
set(EXTRA_INTERNAL_LIBRARIES GWCORE GWADF GWADFE GWPHYSICS GWTOOLS GWGEM GWSYSTEM GWDEPRECATED) set(EXTRA_INTERNAL_LIBRARIES GWCORE GWADF GWADFE GWPHYSICS GWTOOLS GWGEM GWSYSTEM GWDEPRECATED)
...@@ -106,9 +98,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin ...@@ -106,9 +98,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin
# #
install(FILES ${headers} DESTINATION ${GW_INCLUDE_DIR} COMPONENT headers ) install(FILES ${headers} DESTINATION ${GW_INCLUDE_DIR} COMPONENT headers )
if ( with_dictionnaries ) if ( with_dictionnaries )
if ( RDICTIONNARY EQUAL 1 )
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}_rdict.pcm DESTINATION lib COMPONENT libraries ) install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}_rdict.pcm DESTINATION lib COMPONENT libraries )
endif()
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}.rootmap DESTINATION lib COMPONENT libraries ) install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}.rootmap DESTINATION lib COMPONENT libraries )
endif() endif()
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "TMath.h" #include "TMath.h"
#include "TThread.h" #include "TThread.h"
#include "TMutex.h"
using namespace ADF; using namespace ADF;
......
...@@ -5,10 +5,16 @@ ...@@ -5,10 +5,16 @@
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Add modules # Add modules
# #
add_subdirectory (adfe)
add_subdirectory (core) add_subdirectory (core)
add_subdirectory (physics) add_subdirectory (physics)
add_subdirectory (tools)
add_subdirectory (gem) add_subdirectory (gem)
add_subdirectory (gui) add_subdirectory (gui)
#set ( DO_ILL true )
if ( DO_ILL )
add_subdirectory (ILL)
endif()
...@@ -54,16 +54,8 @@ endforeach() ...@@ -54,16 +54,8 @@ endforeach()
# #
# Dictionnary from one file only 'a la ROOT' + internal and external dependencies # Dictionnary from one file only 'a la ROOT' + internal and external dependencies
# #
if ( RDICTIONNARY EQUAL 1 ) ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} MODULE ${GWLIBNAME} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h OPTIONS "")
ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} MODULE ${GWLIBNAME} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h OPTIONS "") set(EXTRA_INTERNAL_LIBRARIES GWADF )
set( EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore Gpad Hist Tree RIO Thread Net )
# MESSAGE("[GW-CLING]")
else ()
ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h)
set( EXTRA_EXTERNAL_LIBRARIES Core Cint Graf MathCore Gpad Hist Tree RIO Thread Net )
# MESSAGE("[GW-CINT]")
endif()
set(EXTRA_INTERNAL_LIBRARIES GWCORE GWADF GWPHYSICS)
# #
foreach( f ${without_dictionnaries} ) foreach( f ${without_dictionnaries} )
...@@ -109,9 +101,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin ...@@ -109,9 +101,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin
# #
install(FILES ${headers} DESTINATION ${GW_INCLUDE_DIR} COMPONENT headers ) install(FILES ${headers} DESTINATION ${GW_INCLUDE_DIR} COMPONENT headers )
if ( with_dictionnaries ) if ( with_dictionnaries )
if ( RDICTIONNARY EQUAL 1 )
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}_rdict.pcm DESTINATION lib COMPONENT libraries ) install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}_rdict.pcm DESTINATION lib COMPONENT libraries )
endif()
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}.rootmap DESTINATION lib COMPONENT libraries ) install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}.rootmap DESTINATION lib COMPONENT libraries )
endif() endif()
......
...@@ -59,15 +59,9 @@ endforeach() ...@@ -59,15 +59,9 @@ endforeach()
# #
# Dictionnary from one file only 'a la ROOT' + internal and external dependencies # Dictionnary from one file only 'a la ROOT' + internal and external dependencies
# #
if ( RDICTIONNARY EQUAL 1 ) ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} MODULE ${GWLIBNAME} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h OPTIONS "")
ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} MODULE ${GWLIBNAME} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h OPTIONS "") set( EXTRA_EXTERNAL_LIBRARIES Thread Net TreePlayer)
set( EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore Gpad Hist Tree RIO Thread Net TreePlayer)
# MESSAGE("[GW-CLING]")
else ()
ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h)
set( EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore Gpad Hist Tree RIO Thread Net TreePlayer)
# MESSAGE("[GW-CINT]")
endif()
set(EXTRA_INTERNAL_LIBRARIES GWCORE GWADF GWPHYSICS) set(EXTRA_INTERNAL_LIBRARIES GWCORE GWADF GWPHYSICS)
# #
...@@ -113,9 +107,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin ...@@ -113,9 +107,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin
# #
install(FILES ${headers} DESTINATION ${GW_INCLUDE_DIR} COMPONENT headers ) install(FILES ${headers} DESTINATION ${GW_INCLUDE_DIR} COMPONENT headers )
if ( with_dictionnaries ) if ( with_dictionnaries )
if ( RDICTIONNARY EQUAL 1 )
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}_rdict.pcm DESTINATION lib COMPONENT libraries ) install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}_rdict.pcm DESTINATION lib COMPONENT libraries )
endif()
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}.rootmap DESTINATION lib COMPONENT libraries ) install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}.rootmap DESTINATION lib COMPONENT libraries )
endif() endif()
......
...@@ -77,17 +77,8 @@ endforeach() ...@@ -77,17 +77,8 @@ endforeach()
# #
# Dictionnary from one file only 'a la ROOT' + internal and external dependencies # Dictionnary from one file only 'a la ROOT' + internal and external dependencies
# #
if ( RDICTIONNARY EQUAL 1 ) ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} MODULE ${GWLIBNAME} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h OPTIONS "")
ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} MODULE ${GWLIBNAME} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h OPTIONS "") set( EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore XMLParser Hist Gui)
set( EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore XMLParser Hist Gui )
# MESSAGE("[GW-CLING]")
else ()
ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h)
set( EXTRA_EXTERNAL_LIBRARIES Core Cint Graf MathCore XMLParser Hist Gui )
# MESSAGE("[GW-CINT]")
endif()
set(EXTRA_INTERNAL_LIBRARIES GWCORE)
# #
foreach( f ${without_dictionnaries} ) foreach( f ${without_dictionnaries} )
set(sources ${sources} ${CMAKE_CURRENT_SOURCE_DIR}/${f}.cpp) set(sources ${sources} ${CMAKE_CURRENT_SOURCE_DIR}/${f}.cpp)
...@@ -133,9 +124,7 @@ install(TARGETS ${GWLIBNAME} ...@@ -133,9 +124,7 @@ install(TARGETS ${GWLIBNAME}
# #
install(FILES ${headers} DESTINATION ${GW_INCLUDE_DIR} COMPONENT headers ) install(FILES ${headers} DESTINATION ${GW_INCLUDE_DIR} COMPONENT headers )
if ( with_dictionnaries ) if ( with_dictionnaries )
if ( RDICTIONNARY EQUAL 1 )
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}_rdict.pcm DESTINATION lib COMPONENT libraries ) install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}_rdict.pcm DESTINATION lib COMPONENT libraries )
endif()
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}.rootmap DESTINATION lib COMPONENT libraries ) install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}.rootmap DESTINATION lib COMPONENT libraries )
endif() endif()
......
...@@ -123,6 +123,7 @@ namespace { // anonymous namespace for specifics to Angular Distribution. Hidden ...@@ -123,6 +123,7 @@ namespace { // anonymous namespace for specifics to Angular Distribution. Hidden
return result; return result;
} }
// ROOT suitable function to draw angular distribution up to order 4. // ROOT suitable function to draw angular distribution up to order 4.
#ifdef R__HAS_MATHMORE
Double_t Wth(Double_t *x, Double_t *par) Double_t Wth(Double_t *x, Double_t *par)
{ {
Double_t p2,p4; Double_t p2,p4;
...@@ -131,6 +132,7 @@ namespace { // anonymous namespace for specifics to Angular Distribution. Hidden ...@@ -131,6 +132,7 @@ namespace { // anonymous namespace for specifics to Angular Distribution. Hidden
return par[0]+par[1]*p2+par[2]*p4; return par[0]+par[1]*p2+par[2]*p4;
} }
#endif
Double_t WthDeg(Double_t *x, Double_t *par) Double_t WthDeg(Double_t *x, Double_t *par)
{ {
Double_t p2,p4; Double_t p2,p4;
......
...@@ -57,30 +57,15 @@ endforeach() ...@@ -57,30 +57,15 @@ endforeach()
# #
# Dictionnary from one file only 'a la ROOT' + internal and external dependencies # Dictionnary from one file only 'a la ROOT' + internal and external dependencies
# #
if ( RDICTIONNARY EQUAL 1 ) ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} MODULE ${GWLIBNAME} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h OPTIONS "")
ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} MODULE ${GWLIBNAME} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h OPTIONS "") find_library(ISMATHMORE MathMore PATHS $ENV{ROOTSYS}/lib)
find_library(ISMATHMORE MathMore) if(NOT ISMATHMORE)
if(NOT ISMATHMORE)
set( EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore XMLParser Hist Physics Gui Spectrum Tree RIO Gpad )
MESSAGE("[GW-GEM] Compiled without MathMore") MESSAGE("[GW-GEM] Compiled without MathMore")
else() else()
set( EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore MathMore XMLParser Hist Physics Gui Spectrum Tree RIO Gpad ) set( EXTRA_EXTERNAL_LIBRARIES MathMore )
MESSAGE("[GW-GEM] Compiled with MathMore")
endif()
# MESSAGE("[GW-CLING]")
else ()
ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h)
find_library(ISMATHMORE MathMore)
if(NOT ISMATHMORE)
set( EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore XMLParser Hist Physics Gui Spectrum Tree RIO Gpad )
MESSAGE("[GW-GEM] Compiled without MathMore")
else()
set( EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore MathMore XMLParser Hist Physics Gui Spectrum Tree RIO Gpad )
MESSAGE("[GW-GEM] Compiled with MathMore") MESSAGE("[GW-GEM] Compiled with MathMore")
endif()
# MESSAGE("[GW-CINT]")
endif() endif()
set(EXTRA_INTERNAL_LIBRARIES GWCORE GWPHYSICS GWTOOLS GWSYSTEM ) set(EXTRA_INTERNAL_LIBRARIES GWTOOLS GWSYSTEM )
# #
foreach( f ${without_dictionnaries} ) foreach( f ${without_dictionnaries} )
...@@ -124,9 +109,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin ...@@ -124,9 +109,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin
# #
install(FILES ${headers} DESTINATION ${GW_INCLUDE_DIR} COMPONENT headers ) install(FILES ${headers} DESTINATION ${GW_INCLUDE_DIR} COMPONENT headers )
if ( with_dictionnaries ) if ( with_dictionnaries )
if ( RDICTIONNARY EQUAL 1 )
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}_rdict.pcm DESTINATION lib COMPONENT libraries ) install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}_rdict.pcm DESTINATION lib COMPONENT libraries )
endif()
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}.rootmap DESTINATION lib COMPONENT libraries ) install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${GWLIBNAME}.rootmap DESTINATION lib COMPONENT libraries )
endif() endif()
......
...@@ -5,12 +5,7 @@ ...@@ -5,12 +5,7 @@
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Add modules # Add modules
# #
if (found_root_major_vers LESS 6) add_subdirectory (cubix)
MESSAGE( "ERROR: Invalid ROOT version \"${ROOTERSION}\", at least major version 6 is required for Cubix, e.g. \"6.00/00\"")
MESSAGE( "[GW] !!! Cubix ignored")
else()
add_subdirectory (cubix)
endif (found_root_major_vers LESS 6)
......
...@@ -38,10 +38,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -Wno-unused-paramete ...@@ -38,10 +38,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -Wno-unused-paramete
# root # root
INCLUDE_DIRECTORIES( ${ROOT_INCLUDE_DIR} ) INCLUDE_DIRECTORIES( ${ROOT_INCLUDE_DIR} )
LINK_DIRECTORIES( ${ROOT_LIBRARY_DIR} ) LINK_DIRECTORIES( ${ROOT_LIBRARY_DIR} )
SET(EXTRA_EXTERNAL_LIBRARIES ${EXTRA_EXTERNAL_LIBRARIES} Core MathCore Hist Gui Gpad Graf RIO Matrix Physics Thread MultiProc Spectrum) SET(EXTRA_EXTERNAL_LIBRARIES ${EXTRA_EXTERNAL_LIBRARIES} Matrix)
# gw # gw
set(EXTRA_INTERNAL_LIBRARIES GWCORE GWPHYSICS GWTOOLS GWSYSTEM ) set(EXTRA_INTERNAL_LIBRARIES GWPHYSICS )
#################### ####################
### define files ### ### define files ###
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "TGListTree.h" #include "TGListTree.h"
#include "TClass.h" #include "TClass.h"
#include "TCanvas.h" #include "TCanvas.h"
#include "TCutG.h"
using namespace std; using namespace std;
...@@ -59,7 +60,7 @@ CXFileList::CXFileList(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t h) ...@@ -59,7 +60,7 @@ CXFileList::CXFileList(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t h)
fMenu->AddEntry("Lar&ge Icons",kLVLargeIcons); fMenu->AddEntry("Lar&ge Icons",kLVLargeIcons);
fMenu->AddEntry("S&mall Icons",kLVSmallIcons); fMenu->AddEntry("S&mall Icons",kLVSmallIcons);
fMenu->AddEntry("&List", kLVList); fMenu->AddEntry("&List", kLVList);
// fMenu->AddEntry("&Details", kLVDetails); // fMenu->AddEntry("&Details", kLVDetails);
fMenu->Connect("Activated(Int_t)","CXFileList",this,"DoMenu(Int_t)"); fMenu->Connect("Activated(Int_t)","CXFileList",this,"DoMenu(Int_t)");
TGHorizontalFrame *h3 = new TGHorizontalFrame(fv2,10,10); TGHorizontalFrame *h3 = new TGHorizontalFrame(fv2,10,10);
...@@ -91,7 +92,7 @@ CXFileList::CXFileList(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t h) ...@@ -91,7 +92,7 @@ CXFileList::CXFileList(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t h)
Resize(); Resize();
DoMenu(kLVSmallIcons); DoMenu(kLVList);
} }
void CXFileList::DoubleClicked(TGListTreeItem *item, Int_t a_int) void CXFileList::DoubleClicked(TGListTreeItem *item, Int_t a_int)
...@@ -99,28 +100,22 @@ void CXFileList::DoubleClicked(TGListTreeItem *item, Int_t a_int) ...@@ -99,28 +100,22 @@ void CXFileList::DoubleClicked(TGListTreeItem *item, Int_t a_int)
TGListTree *sender = (TGListTree *)gTQSender; TGListTree *sender = (TGListTree *)gTQSender;
const TGWindow *parent = sender->GetParent()->GetParent()->GetParent(); const TGWindow *parent = sender->GetParent()->GetParent()->GetParent();
if(parent == fBrowser) if(parent == fBrowser){
{
TObject *obj = (TObject *) item->GetUserData(); TObject *obj = (TObject *) item->GetUserData();
if(obj) if(obj){
{
obj->IsA()->SetName(""); obj->IsA()->SetName("");
TString filename = fBrowser->FullPathName(item); TString filename = fBrowser->FullPathName(item);
if(gSystem->IsFileInIncludePath(filename) && filename.EndsWith(".root")) if(gSystem->IsFileInIncludePath(filename) && filename.EndsWith(".root"))
{
DisplayFile(filename); DisplayFile(filename);
} }
} }
}
} }
CXFileList::~CXFileList() CXFileList::~CXFileList()
{ {
// Cleanup. // Cleanup.
delete fContents; delete fContents;
fMain->DeleteWindow(); // deletes fMain fMain->DeleteWindow(); // deletes fMain
...@@ -130,15 +125,21 @@ CXFileList::~CXFileList() ...@@ -130,15 +125,21 @@ CXFileList::~CXFileList()
void CXFileList::DoMenu(Int_t mode) void CXFileList::DoMenu(Int_t mode)
{ {
// Switch view mode. // Switch view mode.
if (mode<10) { if (mode<10)
fContents->SetViewMode((EListViewMode)mode); fContents->SetViewMode((EListViewMode)mode);
} else { else
delete this; delete this;
}
} }
void CXFileList::DisplayFile(const TString &fname) void CXFileList::DisplayFile(const TString &fname)
{ {
//Close the last opened file
if(fCurrentFile){
fCurrentFile->Close();
fCurrentFile = nullptr;
fFolders.clear();
}
// Display content of ROOT file. // Display content of ROOT file.
TFile *file = TFile::Open(fname); TFile *file = TFile::Open(fname);
fContents->RemoveAll(); fContents->RemoveAll();
...@@ -155,7 +156,7 @@ void CXFileList::DisplayFile(const TString &fname) ...@@ -155,7 +156,7 @@ void CXFileList::DisplayFile(const TString &fname)
TGLVEntry *entry = new TGLVEntry(fContents,name,cname); TGLVEntry *entry = new TGLVEntry(fContents,name,cname);
entry->SetSubnames(key->GetTitle()); entry->SetSubnames(key->GetTitle());
if(cname=="TList") if(cname=="TList" || cname=="TDirectoryFile")
entry->SetPictures(gClient->GetPicture("folder_s.xpm"),gClient->GetPicture("folder_t.xpm")); entry->SetPictures(gClient->GetPicture("folder_s.xpm"),gClient->GetPicture("folder_t.xpm"));
if(cname=="TCutG") if(cname=="TCutG")
entry->SetPictures(gClient->GetPicture("bld_cut.png"),gClient->GetPicture("bld_cut.png")); entry->SetPictures(gClient->GetPicture("bld_cut.png"),gClient->GetPicture("bld_cut.png"));
...@@ -168,49 +169,53 @@ void CXFileList::DisplayFile(const TString &fname) ...@@ -168,49 +169,53 @@ void CXFileList::DisplayFile(const TString &fname)
entry->SetUserData((void*)StrDup(fname)); entry->SetUserData((void*)StrDup(fname));
} }
fMain->Resize(); fMain->Resize();