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

Merge branch 'Cubix' into 'Cubix'

Cubix

See merge request !36
parents cce7b049 9869999c
Pipeline #28161 passed with stage
in 4 minutes and 2 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
# #
......
...@@ -22,10 +22,11 @@ ...@@ -22,10 +22,11 @@
#include "BashColor.h" #include "BashColor.h"
BashColor::BashColor() BashColor::BashColor() :
fColor(""),
fType("0;3")
{ {
fColor = "";
fType = "0;3";
} }
BashColor::~BashColor() BashColor::~BashColor()
......
...@@ -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()
......
...@@ -392,7 +392,7 @@ UInt_t NOMADBuilder::SetInput() ...@@ -392,7 +392,7 @@ UInt_t NOMADBuilder::SetInput()
if ( fListOfFreeEvents.size() ){ if ( fListOfFreeEvents.size() ){
#ifdef LOCAL_DEBUG #ifdef LOCAL_DEBUG
printf("SETINPUT List of free events %d \n",fListOfFreeEvents.size()); // to be done, expand allocated printf("SETINPUT List of free events %zu \n",fListOfFreeEvents.size()); // to be done, expand allocated
#endif #endif
UShort_t uid = fMap.toUID[CCrate][CBoard][CCell]; UShort_t uid = fMap.toUID[CCrate][CBoard][CCell];
...@@ -636,7 +636,7 @@ UInt_t NOMADBuilder::Process() ...@@ -636,7 +636,7 @@ UInt_t NOMADBuilder::Process()
if ( !( tot_nb_coinc == nb_to_treat ) ) { if ( !( tot_nb_coinc == nb_to_treat ) ) {
#ifdef LOCAL_DEBUG #ifdef LOCAL_DEBUG
printf(" Event re-injected STOP @ %d size %d \n ",stop_jj,fTwiceCoincWindowWidth); printf(" Event re-injected STOP @ %zu size %d \n ",stop_jj,fTwiceCoincWindowWidth);
#endif #endif
for (size_t jj = stop_jj ; jj < fTwiceCoincWindowWidth; jj++) { for (size_t jj = stop_jj ; jj < fTwiceCoincWindowWidth; jj++) {
if ( fCoincBuilderEvent[jj].size() == 0 ) { if ( fCoincBuilderEvent[jj].size() == 0 ) {
...@@ -677,7 +677,7 @@ UInt_t NOMADBuilder::Process() ...@@ -677,7 +677,7 @@ UInt_t NOMADBuilder::Process()
bb += fRoughArrayOfSliding[i_ev]->size(); bb += fRoughArrayOfSliding[i_ev]->size();
} }
} }
printf("BIlan %d %d ",bb,fNbEventsInSlicing);; printf("BIlan %zu %d ",bb,fNbEventsInSlicing);;
#endif #endif
// move event @ the end to the beginning and in case the pending and redefine sliding window // move event @ the end to the beginning and in case the pending and redefine sliding window
......
...@@ -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()
......
...@@ -59,6 +59,7 @@ ReadMezzAFP::ReadMezzAFP(): ...@@ -59,6 +59,7 @@ ReadMezzAFP::ReadMezzAFP():
fTrigger("data:crystal"), fTrigger("data:crystal"),
fdebug(false), fdebug(false),
fBashColor(new BashColor()), fBashColor(new BashColor()),
fKeyFilterFile(NULL),
fUseKeyFilter(false), fUseKeyFilter(false),
fLastKeyIsRead(false), fLastKeyIsRead(false),
fKeyToLink(NULL), fKeyToLink(NULL),
...@@ -75,7 +76,7 @@ ReadMezzAFP::ReadMezzAFP(): ...@@ -75,7 +76,7 @@ ReadMezzAFP::ReadMezzAFP():
TotalEntryFileSize(0), TotalEntryFileSize(0),
ReadEntryFileSize(0), ReadEntryFileSize(0),
LastReadEntryFileSize(0) LastReadEntryFileSize(0)
{ {
if(fdebug) std::cout<<"\E[31;1m"<<"Construct in"<<"\E[m"<<std::endl; if(fdebug) std::cout<<"\E[31;1m"<<"Construct in"<<"\E[m"<<std::endl;
Log.GetProcessName() = "ReadMezzAFP"; GetFrameIO().SetName("ReadMezzAFP"); Log.GetProcessName() = "ReadMezzAFP"; GetFrameIO().SetName("ReadMezzAFP");
...@@ -89,11 +90,24 @@ ReadMezzAFP::ReadMezzAFP(): ...@@ -89,11 +90,24 @@ ReadMezzAFP::ReadMezzAFP():
GetFrameIO().Attach(&fSourceOfFrames,0x0); GetFrameIO().Attach(&fSourceOfFrames,0x0);
fListOfFile.clear(); fListOfFile.clear();
for(int nn = 0; nn < kNSG; nn++ ) {
SegmentTraces[nn] = 0x0;
SegE[nn] = 0x0;
SegStatus[nn] = 0x0;
SegID[nn] = 0x0;
}
for(int nn = 0; nn < kNCC; nn++ ) {
CoreTraces[nn] = 0x0;
CoreE[nn] = 0x0;
CoreStatus[nn] = 0x0;
CoreID[nn] = 0x0;
}
if(fdebug) std::cout<<"\E[31;1m"<<"Construct out"<<"\E[m"<<std::endl; if(fdebug) std::cout<<"\E[31;1m"<<"Construct out"<<"\E[m"<<std::endl;
} }
ReadMezzAFP::~ReadMezzAFP() ReadMezzAFP::~ReadMezzAFP()
{ {
// in principle not needed ... just in case reset it has not been called by narval // in principle not needed ... just in case reset it has not been called by narval
unsigned int error = 0u; process_reset(&error) ; unsigned int error = 0u; process_reset(&error) ;
...@@ -101,10 +115,10 @@ ReadMezzAFP::~ReadMezzAFP() ...@@ -101,10 +115,10 @@ ReadMezzAFP::~ReadMezzAFP()
delete [] SegmentTraces[nn]; delete [] SegmentTraces[nn];
for(int nn = 0; nn < kNCC; nn++ ) for(int nn = 0; nn < kNCC; nn++ )
delete [] CoreTraces[nn]; delete [] CoreTraces[nn];
} }
bool ReadMezzAFP::NewFile() bool ReadMezzAFP::NewFile()
{ {
Log.SetProcessMethod("NewFile"); Log.SetProcessMethod("NewFile");
bool ok = false; bool ok = false;
NewCrystal = false; NewCrystal = false;
...@@ -193,7 +207,7 @@ bool ReadMezzAFP::NewFile() ...@@ -193,7 +207,7 @@ bool ReadMezzAFP::NewFile()
} }
void ReadMezzAFP::process_config (const char *directory_path, unsigned int *error_code) void ReadMezzAFP::process_config (const char *directory_path, unsigned int *error_code)
{ {
// first init narval and ADF stuff (if required) // first init narval and ADF stuff (if required)
NarvalInterface::process_config(directory_path,error_code); NarvalInterface::process_config(directory_path,error_code);
...@@ -202,7 +216,7 @@ void ReadMezzAFP::process_config (const char *directory_path, unsigned int *erro ...@@ -202,7 +216,7 @@ void ReadMezzAFP::process_config (const char *directory_path, unsigned int *erro
} }
unsigned int ReadMezzAFP::ProcessBlock(ADF::FrameBlock &out) unsigned int ReadMezzAFP::ProcessBlock(ADF::FrameBlock &out)
{ {
if(fdebug) std::cout<<"\E[31;1m"<<"ProcessBlock in"<<"\E[m"<<std::endl; if(fdebug) std::cout<<"\E[31;1m"<<"ProcessBlock in"<<"\E[m"<<std::endl;
// attach the input/output buffer to the FrameIO system // attach the input/output buffer to the FrameIO system
...@@ -322,7 +336,7 @@ unsigned int ReadMezzAFP::ProcessBlock(ADF::FrameBlock &out) ...@@ -322,7 +336,7 @@ unsigned int ReadMezzAFP::ProcessBlock(ADF::FrameBlock &out)
if ( GetFrameIO().GetStatus() == BaseFrameIO::kFinished || fLastKeyIsRead) if ( GetFrameIO().GetStatus() == BaseFrameIO::kFinished || fLastKeyIsRead)
return 1u; return 1u;
else return 0u; else return 0u;
} }
void ReadMezzAFP::process_initialise (unsigned int *error_code) void ReadMezzAFP::process_initialise (unsigned int *error_code)
{ {
......
...@@ -57,6 +57,21 @@ link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) ...@@ -57,6 +57,21 @@ link_directories(${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
# #
# configure file # configure file
# #
#TEST current configuration OS
if ( UNIX )
set(CMAKE_OS_TYPE 1)
endif()
if ( WIN32 )
set(CMAKE_OS_TYPE 2)
endif()
if ( CYGWIN )
set(CMAKE_OS_TYPE 3)
endif()
if ( APPLE )
set(CMAKE_OS_TYPE 4)
endif()
configure_file ( configure_file (
"${CMAKE_CURRENT_SOURCE_DIR}/GwConfig.h.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/GwConfig.h.cmake"
"${CMAKE_BINARY_DIR}/include/GwConfig.h" "${CMAKE_BINARY_DIR}/include/GwConfig.h"
...@@ -77,17 +92,8 @@ endforeach() ...@@ -77,17 +92,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 +139,7 @@ install(TARGETS ${GWLIBNAME} ...@@ -133,9 +139,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()
......
...@@ -43,3 +43,14 @@ ...@@ -43,3 +43,14 @@
#define GW_MacrosPath "@GW_DATA_DIR@/macros"; #define GW_MacrosPath "@GW_DATA_DIR@/macros";
#endif #endif
//////////////////////////////
////// Define OS_TYPE ////////
//////////////////////////////
#define OS_LINUX 1
#define OS_WINDOWS 2
#define OS_CYGWIN 3 // rather useless ==> to be removed ??
#define OS_APPLE 4
#define OS_TYPE @CMAKE_OS_TYPE@
...@@ -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) MESSAGE("[GW-GEM] Compiled without MathMore")
set( EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore XMLParser Hist Physics Gui Spectrum Tree RIO Gpad )