diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 95832f4..d68acec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,12 +3,12 @@ name: C++ CI Testing on: pull_request jobs: - build_and_test: +build_and_test: runs-on: ubuntu-latest container: rootproject/root:${{ matrix.version }} strategy: matrix: - version: [6.22.02-ubuntu20.04] + version: [6.28.12-ubuntu22.04] steps: - name: system dependancies @@ -36,6 +36,20 @@ jobs: echo "PATH=$PWD/bin:$CCDB_HOME:$CCDB_HOME/bin:$RCDB_HOME/bin:$RCDB_HOME/cpp/bin:$PATH" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=$RCDB_HOME/cpp/lib:$CCDB_HOME/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV + + - name: checkout hipo + uses: actions/checkout@v4 + with: + repository: gavalian/hipo + ref: 4.0.1 # if you want to use a fixed tag; remove if you want to use `main` + path: ${HIPO} + + - name: build hipo + run: | + cd $HIPO + cmake -DCMAKE_INSTALL_PREFIX=$HIPO + cmake --build . --target install + - name: build ccdb run: | cd $CCDB_HOME diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e450f2..8fad631 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,21 +20,28 @@ find_package(ROOT REQUIRED COMPONENTS Proof) ###########USEROOTSYS include(${ROOT_USE_FILE}) ##########USEROOTSYS set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ROOT_CXX_FLAGS}") -#hipo expects lz4 includes to be in lib... -set(CMAKE_INSTALL_INCLUDEDIR ${CMAKE_CURRENT_SOURCE_DIR}/lib) -#set(ADD_COMPILER_FLAGS_PREPEND "-O3") -set(CMAKE_C_FLAGS "-O3 ${CMAKE_C_FLAGS}") -set(LZ4_BUNDLED_MODE OFF) -set(BUILD_SHARED_LIBS ON) -set(BUILD_STATIC_LIBS OFF) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lz4/contrib/cmake_unofficial) -set(LZ4_LIBRARY lz4) -set(LZ4_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lz4/lib) -include_directories(${LZ4_INCLUDE_DIR}) -add_definitions(-D__LZ4__) - -#after Lz4 change include to include -set(CMAKE_INSTALL_INCLUDEDIR ${CMAKE_CURRENT_SOURCE_DIR}/include) +#find_package(hipo4 REQUIRED) #for cmake +#find_package(PkgConfig REQUIRED) #for pkg +#pkg_check_modules(hipo4 REQUIRED IMPORTED_TARGET hipo4) + +#currently load hipo via simple env paths +MESSAGE( CHECK_START "Checking for installed hipo..." ) + +if (DEFINED ENV{HIPO}) + + set(HIPOEXT $ENV{HIPO}) + set(HIPO_INCLUDE_DIR ${HIPOEXT}/include/) + set(HIPO_LIBS -L${HIPOEXT}/ -lhipo4) + + MESSAGE( STATUS "HIPO INCLUDE_DIR : " ${HIPO_INCLUDE_DIR} ) + MESSAGE( STATUS "HIPO LIBRARIES : " ${HIPO_LIBS} ) + +else () + + MESSAGE( CHECK_FAIL "$HIPO not set" ) + MESSAGE( FATAL_ERROR , "\n ... $HIPO must be set to local install of the hipo library\n ... see clas12root/README.md\n ... cmake exiting") + +endif () #include clas12-qadb c++ library and rapidjson library IF (DEFINED ENV{QADB}) @@ -46,25 +53,11 @@ ENDIF (DEFINED ENV{QADB}) set(CLAS12ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Clas12Root) -set(CLAS12HIPO_DIR ${CMAKE_CURRENT_SOURCE_DIR}/hipo4) set(CLAS12BANKS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Clas12Banks) -include_directories(${CLAS12HIPO_DIR}) -add_subdirectory (${CLAS12HIPO_DIR}) include_directories(${CLAS12BANKS_DIR}) add_subdirectory (${CLAS12BANKS_DIR}) include_directories(${CLAS12ROOT_DIR}) add_subdirectory (${CLAS12ROOT_DIR}) - -#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/hipo4) -#add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR}/hipo4) - -#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Clas12Banks) -#add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR}/Clas12Banks) - -#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Clas12Root) -#add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR}/Clas12Root) - - diff --git a/Clas12Banks/CMakeLists.txt b/Clas12Banks/CMakeLists.txt index eaf9f95..eb56806 100644 --- a/Clas12Banks/CMakeLists.txt +++ b/Clas12Banks/CMakeLists.txt @@ -1,3 +1,5 @@ +set(CLAS12BANKS Clas12Banks) +set(HIPO4 hipo4) set(CLASS_LIST_CPP helflip.cpp helonline.cpp vertdoca.cpp runconfig.cpp event.cpp ftbevent.cpp particle.cpp ftbparticle.cpp mcparticle.cpp mcevent.cpp mcmatch.cpp scaler.cpp vtp.cpp particle_detector.cpp scintillator.cpp scintextras.cpp tracker.cpp utracker.cpp traj.cpp forwardtagger.cpp cherenkov.cpp rich.cpp calorimeter.cpp calextras.cpp covmatrix.cpp region_particle.cpp region_ft.cpp region_fdet.cpp region_cdet.cpp region_band.cpp clas12writer.cpp clas12reader.cpp mesonex_trigger.cpp scaler_reader.cpp clas12databases.cpp qadb_reader.cpp ccdb_reader.cpp rcdb_reader.cpp) @@ -56,23 +58,20 @@ IF (DEFINED ENV{RCDB_HOME}) ENDIF (DEFINED ENV{RCDB_HOME}) - include_directories(${CLAS12ROOT_DIR}) +include_directories(${HIPO_INCLUDE_DIR}) +#include_directories(${hipo4_INCLUDE_DIRS})#in case change to pkg, this is needed to generate ROOT dict +ROOT_GENERATE_DICTIONARY(G__${CLAS12BANKS} ${CLASS_LIST_H} LINKDEF Clas12LinkDef.h) +add_library(${CLAS12BANKS} SHARED ${CLASS_LIST_CPP} G__${CLAS12BANKS}.cxx) -ROOT_GENERATE_DICTIONARY(G__Clas12Banks ${CLASS_LIST_H} LINKDEF Clas12LinkDef.h) -add_library(Clas12Banks SHARED ${CLASS_LIST_CPP} G__Clas12Banks.cxx) +target_link_libraries(${CLAS12BANKS} PUBLIC ${ROOT_LIBRARIES} ${HIPO_LIBS} ) -target_link_libraries(Clas12Banks ${ROOT_LIBRARIES} Hipo4) +#target_link_libraries(${CLAS12BANKS} PUBLIC ${ROOT_LIBRARIES} PkgConfig::${HIPO4} ) #in case change to pkg +#target_include_directories(${CLAS12BANKS} SYSTEM PUBLIC PkgConfig::${HIPO4}) #in case change to pkg -install(TARGETS Clas12Banks +install(TARGETS ${CLAS12BANKS} LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") -#FILE(GLOB ROOT_CLAS12_PCM ${CMAKE_BINARY_DIR}/Clas12Banks/*pcm) - -#install (FILES ${ROOT_CLAS12_PCM} -# DESTINATION "${CMAKE_INSTALL_LIBDIR}") - - -install (FILES ${CMAKE_CURRENT_BINARY_DIR}/libClas12Banks_rdict.pcm +install (FILES ${CMAKE_CURRENT_BINARY_DIR}/lib${CLAS12BANKS}_rdict.pcm DESTINATION "${CMAKE_INSTALL_LIBDIR}") diff --git a/Clas12Banks/Clas12LinkDef.h b/Clas12Banks/Clas12LinkDef.h index 6c34742..efb773a 100644 --- a/Clas12Banks/Clas12LinkDef.h +++ b/Clas12Banks/Clas12LinkDef.h @@ -45,4 +45,7 @@ #pragma link C++ class clas12::jsonFileMerger+; #pragma link C++ class clas12::qadb_reader+; #pragma link C++ class clas12root::TRcdbVals+; +#pragma link C++ class hipo::bank+; +#pragma link C++ class hipo::reader+; +#pragma link C++ class hipo::writer+; #endif diff --git a/Clas12Banks/calextras.h b/Clas12Banks/calextras.h index 049e503..e5fcfbe 100644 --- a/Clas12Banks/calextras.h +++ b/Clas12Banks/calextras.h @@ -9,7 +9,7 @@ #ifndef CLAS12_CALEXTRAS_H #define CLAS12_CALEXTRAS_H -#include "bank.h" +#include #include diff --git a/Clas12Banks/clas12reader.h b/Clas12Banks/clas12reader.h index 6fb52ce..d6f7ce3 100644 --- a/Clas12Banks/clas12reader.h +++ b/Clas12Banks/clas12reader.h @@ -9,7 +9,7 @@ #include "clas12defs.h" #include "clas12databases.h" -#include "reader.h" +#include #include "particle.h" #include "ftbparticle.h" #include "mcparticle.h" @@ -37,7 +37,7 @@ #include "region_band.h" #include "scaler_reader.h" #include "rcdb_vals.h" -#include "dictionary.h" +#include #include #include diff --git a/Clas12Banks/clas12writer.h b/Clas12Banks/clas12writer.h index 8d44442..1b79b41 100644 --- a/Clas12Banks/clas12writer.h +++ b/Clas12Banks/clas12writer.h @@ -15,11 +15,11 @@ #include "clas12defs.h" #include "clas12reader.h" -#include "writer.h" -#include "bank.h" -#include "event.h" -#include "utils.h" -#include "dictionary.h" +#include +#include +#include +#include +#include #include #include diff --git a/Clas12Banks/covmatrix.h b/Clas12Banks/covmatrix.h index c6f039f..a51ec51 100644 --- a/Clas12Banks/covmatrix.h +++ b/Clas12Banks/covmatrix.h @@ -14,7 +14,7 @@ #ifndef CLAS12_COVMATRIX_H #define CLAS12_COVMATRIX_H -#include "bank.h" +#include #include #include #include diff --git a/Clas12Banks/detector.h b/Clas12Banks/detector.h index 3f066ac..b7d30ea 100644 --- a/Clas12Banks/detector.h +++ b/Clas12Banks/detector.h @@ -22,7 +22,7 @@ #include #include #include -#include "bank.h" +#include namespace clas12 { diff --git a/Clas12Banks/event.h b/Clas12Banks/event.h index 701756a..96182cd 100644 --- a/Clas12Banks/event.h +++ b/Clas12Banks/event.h @@ -16,7 +16,7 @@ #include #include #include -#include "bank.h" +#include #include "ftbevent.h" namespace clas12 { diff --git a/Clas12Banks/ftbevent.h b/Clas12Banks/ftbevent.h index 9c49696..d2942d3 100644 --- a/Clas12Banks/ftbevent.h +++ b/Clas12Banks/ftbevent.h @@ -17,7 +17,7 @@ #include #include #include -#include "bank.h" +#include namespace clas12 { diff --git a/Clas12Banks/ftbparticle.cpp b/Clas12Banks/ftbparticle.cpp index 54b49ea..cc4d9fa 100644 --- a/Clas12Banks/ftbparticle.cpp +++ b/Clas12Banks/ftbparticle.cpp @@ -5,7 +5,6 @@ */ #include "ftbparticle.h" -#include "dictionary.h" namespace clas12 { diff --git a/Clas12Banks/ftbparticle.h b/Clas12Banks/ftbparticle.h index 163b68c..4aa3e63 100644 --- a/Clas12Banks/ftbparticle.h +++ b/Clas12Banks/ftbparticle.h @@ -14,8 +14,8 @@ #ifndef FTBPARTICLE_H #define FTBPARTICLE_H -#include "bank.h" -#include "dictionary.h" +#include +#include #include namespace clas12 { diff --git a/Clas12Banks/helflip.h b/Clas12Banks/helflip.h index 14e43ab..43dc1ca 100644 --- a/Clas12Banks/helflip.h +++ b/Clas12Banks/helflip.h @@ -16,7 +16,7 @@ #include #include #include -#include "bank.h" +#include #include "runconfig.h" namespace clas12 { diff --git a/Clas12Banks/helonline.h b/Clas12Banks/helonline.h index b9a2cee..c6ceec3 100644 --- a/Clas12Banks/helonline.h +++ b/Clas12Banks/helonline.h @@ -16,7 +16,7 @@ #include #include #include -#include "bank.h" +#include namespace clas12 { diff --git a/Clas12Banks/mcevent.h b/Clas12Banks/mcevent.h index a3069ce..3ce94b7 100644 --- a/Clas12Banks/mcevent.h +++ b/Clas12Banks/mcevent.h @@ -13,7 +13,7 @@ #ifndef MCEVENT_H #define MCEVENT_H -#include "bank.h" +#include #include #include diff --git a/Clas12Banks/mcmatch.h b/Clas12Banks/mcmatch.h index 0f7241d..aa5956a 100644 --- a/Clas12Banks/mcmatch.h +++ b/Clas12Banks/mcmatch.h @@ -13,7 +13,7 @@ #ifndef MCMATCH_H #define MCMATCH_H -#include "bank.h" +#include #include #include diff --git a/Clas12Banks/mcparticle.h b/Clas12Banks/mcparticle.h index d7b9058..79929ef 100644 --- a/Clas12Banks/mcparticle.h +++ b/Clas12Banks/mcparticle.h @@ -13,7 +13,7 @@ #ifndef MCPARTICLE_H #define MCPARTICLE_H -#include "bank.h" +#include #include "mcmatch.h" #include #include diff --git a/Clas12Banks/mesonex_trigger.h b/Clas12Banks/mesonex_trigger.h index ac72689..afe745d 100644 --- a/Clas12Banks/mesonex_trigger.h +++ b/Clas12Banks/mesonex_trigger.h @@ -11,7 +11,7 @@ #include #include "clas12defs.h" #include "clas12reader.h" -#include "utils.h" +#include namespace clas12 { diff --git a/Clas12Banks/particle.cpp b/Clas12Banks/particle.cpp index 5972149..669b786 100644 --- a/Clas12Banks/particle.cpp +++ b/Clas12Banks/particle.cpp @@ -5,7 +5,6 @@ */ #include "particle.h" -#include "dictionary.h" namespace clas12 { diff --git a/Clas12Banks/particle.h b/Clas12Banks/particle.h index 5ace9f7..28d5f2e 100644 --- a/Clas12Banks/particle.h +++ b/Clas12Banks/particle.h @@ -14,8 +14,8 @@ #ifndef PARTICLE_H #define PARTICLE_H -#include "bank.h" -#include "dictionary.h" +#include +#include #include "ftbparticle.h" #include #include diff --git a/Clas12Banks/particle_detector.h b/Clas12Banks/particle_detector.h index ae79c3e..46fccd8 100644 --- a/Clas12Banks/particle_detector.h +++ b/Clas12Banks/particle_detector.h @@ -20,7 +20,7 @@ #include #include #include "clas12defs.h" -#include "bank.h" +#include namespace clas12 { diff --git a/Clas12Banks/qadb_reader.cpp b/Clas12Banks/qadb_reader.cpp index 3152a9d..a91aedd 100644 --- a/Clas12Banks/qadb_reader.cpp +++ b/Clas12Banks/qadb_reader.cpp @@ -62,27 +62,7 @@ namespace clas12 { return true; } - -#else - qadb_reader::qadb_reader(int runNb){ - _runNb=runNb; - } - - - /////////////////////////////////////////////////////// - ///Checks if an event passes all the QA requirements - - bool qadb_reader::passQAReqs(int evNb){ - return true; - } - -#endif - void qadb_reader::copySettings(const qadb_reader& other){ - _reqsQA=other._reqsQA; - _reqOKAsymmetry=other._reqOKAsymmetry; - _reqGolden=other._reqGolden; - } - /*This function will take in a list of runs and return the accumulated charge + /*This function will take in a list of runs and return the accumulated charge past specified requirements. Note: This is done on a file per file basis*/ double qadb_reader::getChargeForRunlist(std::set Runs){ @@ -109,4 +89,30 @@ namespace clas12 { return _qa.GetAccumulatedCharge(); } +#else + qadb_reader::qadb_reader(int runNb){ + _runNb=runNb; + } + + + /////////////////////////////////////////////////////// + ///Checks if an event passes all the QA requirements + + bool qadb_reader::passQAReqs(int evNb){ + return true; + } + /*This function will take in a list of runs and return the accumulated charge + past specified requirements. + Note: This is done on a file per file basis*/ + double qadb_reader::getChargeForRunlist(std::set Runs){ + return 0; //qadb not defined + } + +#endif + void qadb_reader::copySettings(const qadb_reader& other){ + _reqsQA=other._reqsQA; + _reqOKAsymmetry=other._reqOKAsymmetry; + _reqGolden=other._reqGolden; + } + } diff --git a/Clas12Banks/region_detector.h b/Clas12Banks/region_detector.h index 82bc9d7..a6cf24d 100644 --- a/Clas12Banks/region_detector.h +++ b/Clas12Banks/region_detector.h @@ -24,7 +24,7 @@ #include #include #include "clas12defs.h" -#include "bank.h" +#include namespace clas12 { diff --git a/Clas12Banks/runconfig.h b/Clas12Banks/runconfig.h index 235edd8..3e5f3fb 100644 --- a/Clas12Banks/runconfig.h +++ b/Clas12Banks/runconfig.h @@ -17,7 +17,7 @@ #include #include #include -#include "bank.h" +#include namespace clas12 { diff --git a/Clas12Banks/scaler.h b/Clas12Banks/scaler.h index b68f417..81b4990 100644 --- a/Clas12Banks/scaler.h +++ b/Clas12Banks/scaler.h @@ -14,7 +14,7 @@ #ifndef SCALER_H #define SCALER_H -#include "bank.h" +#include #include namespace clas12 { diff --git a/Clas12Banks/scaler_reader.cpp b/Clas12Banks/scaler_reader.cpp index 9f885dc..cc57f71 100644 --- a/Clas12Banks/scaler_reader.cpp +++ b/Clas12Banks/scaler_reader.cpp @@ -1,4 +1,7 @@ #include "scaler_reader.h" +#include +#include +#include #include namespace clas12{ diff --git a/Clas12Banks/scaler_reader.h b/Clas12Banks/scaler_reader.h index 5d3f219..2274050 100644 --- a/Clas12Banks/scaler_reader.h +++ b/Clas12Banks/scaler_reader.h @@ -1,10 +1,7 @@ #pragma once -#include "reader.h" -#include "dictionary.h" -#include "event.h" -#include "scaler.h" #include "runconfig.h" +#include "scaler.h" #include #include diff --git a/Clas12Banks/scintextras.h b/Clas12Banks/scintextras.h index f333049..edd5f78 100644 --- a/Clas12Banks/scintextras.h +++ b/Clas12Banks/scintextras.h @@ -14,7 +14,7 @@ #ifndef CLAS12_SCINTEXTRAS_H #define CLAS12_SCINTEXTRAS_H -#include "bank.h" +#include #include //#include "scintillator.h" diff --git a/Clas12Banks/vertdoca.h b/Clas12Banks/vertdoca.h index 5060d4d..ccc1416 100644 --- a/Clas12Banks/vertdoca.h +++ b/Clas12Banks/vertdoca.h @@ -17,7 +17,7 @@ #include #include #include -#include "bank.h" +#include namespace clas12 { diff --git a/Clas12Banks/vtp.h b/Clas12Banks/vtp.h index fd9220d..8158e3f 100644 --- a/Clas12Banks/vtp.h +++ b/Clas12Banks/vtp.h @@ -14,7 +14,7 @@ #ifndef VTP_H #define VTP_H -#include "bank.h" +#include #include #include diff --git a/Clas12Root/CMakeLists.txt b/Clas12Root/CMakeLists.txt index f5b4a8b..9fc8194 100644 --- a/Clas12Root/CMakeLists.txt +++ b/Clas12Root/CMakeLists.txt @@ -1,6 +1,6 @@ set(CLAS12ROOT Clas12Root) set(CLAS12BANKS Clas12Banks) -set(HIPO Hipo4) +#set(HIPO4 hipo4) #include rcdb c++ header library IF (DEFINED ENV{RCDB_HOME}) @@ -35,21 +35,23 @@ ENDIF (DEFINED ENV{CCDB_HOME}) include_directories(${CLAS12BANKS_DIR}) +include_directories(${HIPO_INCLUDE_DIR}) + +#include_directories(${hipo4_INCLUDE_DIRS})#in case change to pkg, this is needed to generate ROOT dict ROOT_GENERATE_DICTIONARY(G__${CLAS12ROOT} BankHist.h HipoHist.h HipoTreeMaker.h HipoChain.h HipoChainWriter.h HipoRootAction.h HipoROOTOut.h ParticleHist.h HipoSelector.h ParticleTree.h LINKDEF Clas12RootLinkDef.h) add_library(${CLAS12ROOT} SHARED BankHist.cpp HipoHist.cpp HipoTreeMaker.cpp HipoChain.cpp HipoChainWriter.cpp HipoRootAction.cpp HipoROOTOut.cpp ParticleHist.cpp HipoSelector.cpp ParticleTree.cpp G__${CLAS12ROOT}.cxx) -target_link_libraries(${CLAS12ROOT} ${ROOT_LIBRARIES} ${HIPO} ${CLAS12BANKS}) +#target_link_libraries(${CLAS12ROOT} PUBLIC ${ROOT_LIBRARIES} ${CLAS12BANKS} PkgConfig::${HIPO4})#in case change to pkg +#target_include_directories(${CLAS12ROOT} SYSTEM PUBLIC PkgConfig::${HIPO4})#in case change to pkg + +target_link_libraries(${CLAS12ROOT} PUBLIC ${ROOT_LIBRARIES} ${CLAS12BANKS} ${HIPO_LIBS}) install(TARGETS ${CLAS12ROOT} LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") -#FILE(GLOB ROOT_C12ROOT_PCM ${CMAKE_BINARY_DIR}/Clas12Root/*pcm) - -#install (FILES ${ROOT_C12ROOT_PCM} -# DESTINATION "${CMAKE_INSTALL_LIBDIR}") install (FILES ${CMAKE_CURRENT_BINARY_DIR}/libClas12Root_rdict.pcm DESTINATION "${CMAKE_INSTALL_LIBDIR}") diff --git a/Clas12Root/HipoChain.cpp b/Clas12Root/HipoChain.cpp index d360db9..82b62b4 100644 --- a/Clas12Root/HipoChain.cpp +++ b/Clas12Root/HipoChain.cpp @@ -1,7 +1,7 @@ #include #include #include "HipoChain.h" -#include "reader.h" +#include #include "clas12reader.h" namespace clas12root { diff --git a/Clas12Root/HipoSelector.cpp b/Clas12Root/HipoSelector.cpp index 321927d..f4d0236 100644 --- a/Clas12Root/HipoSelector.cpp +++ b/Clas12Root/HipoSelector.cpp @@ -68,8 +68,7 @@ namespace clas12root{ fInput->Print(); TString option = GetOption(); _chain=dynamic_cast(fInput->FindObject("HIPOFILES")); - std::cout<<"CHAIN OPEN "<db()->initDBs(); + } Bool_t HipoSelector::Notify() { // Called at the start of a new file diff --git a/README.md b/README.md index ef39489..622423e 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,19 @@ We now use an external hipo4 repository. This must be pointed at with the variab A default hipo implementation is now packed with clas12root. If you prefer to use this do not set the enviroment variable HIPO. If you would like to use a different version of the hipo library set HIPO. You may get the most up to data hipo library from -For Hipo library see https://github.com/gavalian/hipo +For Hipo library see https://github.com/gavalian/hipo + +## New : from version 1.9.0 an external hipo install is required before building clas12root + + git clone --recurse-submodules https://github.com/gavalian/hipo + cd hipo/ + git checkout 4.0.1 + cmake -DCMAKE_INSTALL_PREFIX=$PWD/ + cmake --build . --target install + +The environment variable HIPO must be set to the path of the hipo install. + +## Clas12Banks and Clas12Root The Clas12Banks implementation can be used independent of ROOT, although currently ROOT dictionaries are created for the classes via cmake (this could be removed). This defines the specific CLAS12 DST banks and provides an interface to the data. @@ -66,6 +78,8 @@ setenv CCDB_HOME /Where/Is/ccdb (e.g. setenv CCDB_HOME ${CLAS12ROOT}/ccdb ) source ${CCDB_HOME}/environment.csh #To use clas12-qadb interface setenv QADB /Where/Is/clas12-qadb (e.g. setenv QADB ${CLAS12ROOT}/clas12-qadb ) +#Preinstalled hipo is a requirement +setenv HIPO /Where/Is/hipo ``` or for bash @@ -79,6 +93,8 @@ export CCDB_HOME /Where/Is/ccdb source ${CCDB_HOME}/environment.csh #To use clas12-qadb interface export QADB /Where/Is/clas12-qadb +#Preinstalled hipo is a requirement +export HIPO /Where/Is/hipo ``` ## To install diff --git a/RunRoot/LoadClas12Root.C b/RunRoot/LoadClas12Root.C index 8d4e641..39ce8b2 100644 --- a/RunRoot/LoadClas12Root.C +++ b/RunRoot/LoadClas12Root.C @@ -10,10 +10,11 @@ using namespace clas12root; void LoadClas12Root(){ + TString HIPO=gSystem->Getenv("HIPO"); + gSystem->Load(HIPO+"/lib/libhipo4"); + TString CLAS12ROOT=gSystem->Getenv("CLAS12ROOT"); TString LIB=CLAS12ROOT+"/lib/"; - gSystem->Load(LIB+"liblz4"); - gSystem->Load(LIB+"libHipo4"); gSystem->Load(LIB+"libClas12Banks"); gSystem->Load(LIB+"libClas12Root"); diff --git a/RunRoot/LoadProofLib.C b/RunRoot/LoadProofLib.C index 320d437..3d9f4c5 100644 --- a/RunRoot/LoadProofLib.C +++ b/RunRoot/LoadProofLib.C @@ -18,24 +18,23 @@ void LoadProofLib(Int_t Nworkers=1){ Int_t NCores=Nworkers; proof->SetParallel(NCores); - if(gProof->Load(TString(gSystem->Getenv("CLAS12ROOT"))+"/lib/liblz4.so",kTRUE)==0){} + // if(gProof->Load(TString(gSystem->Getenv("CLAS12ROOT"))+"/lib/liblz4.so",kTRUE)==0){} // get the sandbox directroy TString sandbox="~/.proof"; if(TString(gEnv->GetValue("ProofLite.Sandbox",""))!=TString()){ sandbox=gEnv->GetValue("ProofLite.Sandbox",""); } // copy pcm files to sandbox/cache - gSystem->Exec(Form("cp $CLAS12ROOT/lib/libHipo4_rdict.pcm %s/cache/.",sandbox.Data())); gSystem->Exec(Form("cp $CLAS12ROOT/lib/libClas12Banks_rdict.pcm %s/cache/.",sandbox.Data())); gSystem->Exec(Form("cp $CLAS12ROOT/lib/libClas12Root_rdict.pcm %s/cache/.",sandbox.Data())); if(!ISMAC){ - gProof->Load(TString(gSystem->Getenv("CLAS12ROOT"))+"/lib/libHipo4.so",kTRUE); + gProof->Load(TString(gSystem->Getenv("HIPO"))+"/lib/libhipo4.so",kTRUE); gProof->Load(TString(gSystem->Getenv("CLAS12ROOT"))+"/lib/libClas12Banks.so",kTRUE); gProof->Load(TString(gSystem->Getenv("CLAS12ROOT"))+"/lib/libClas12Root.so",kTRUE); } else{ - gProof->Load(TString(gSystem->Getenv("CLAS12ROOT"))+"/lib/libHipo4.dylib",kTRUE); + gProof->Load(TString(gSystem->Getenv("HIPO"))+"/lib/libhipo4.dylib",kTRUE); gProof->Load(TString(gSystem->Getenv("CLAS12ROOT"))+"/lib/libClas12Banks.dylib",kTRUE); gProof->Load(TString(gSystem->Getenv("CLAS12ROOT"))+"/lib/libClas12Root.dylib",kTRUE); diff --git a/installC12Root b/installC12Root index 8ad2cb9..605ded5 100755 --- a/installC12Root +++ b/installC12Root @@ -1,5 +1,3 @@ -#cp $HIPO/hipo4/*.h hipo4/. -#cp $HIPO/hipo4/*.cpp hipo4/. mkdir build cd build cmake ../