From 38962fad8f5f73f7a78c26ac8f9ffc8a6c2444aa Mon Sep 17 00:00:00 2001 From: Derek Glazier Date: Wed, 31 Jan 2024 14:56:47 +0000 Subject: [PATCH] change to include hipo4/bank.h etc, use PkgConfig::Hipo4 --- CMakeLists.txt | 1 + Clas12Banks/CMakeLists.txt | 15 ++++++++------- Clas12Banks/calextras.h | 2 +- Clas12Banks/clas12reader.h | 4 ++-- Clas12Banks/clas12writer.h | 8 ++++---- Clas12Banks/covmatrix.h | 2 +- Clas12Banks/detector.h | 2 +- Clas12Banks/event.h | 2 +- Clas12Banks/ftbevent.h | 2 +- Clas12Banks/ftbparticle.cpp | 2 +- Clas12Banks/ftbparticle.h | 4 ++-- Clas12Banks/helflip.h | 2 +- Clas12Banks/helonline.h | 2 +- Clas12Banks/mcevent.h | 2 +- Clas12Banks/mcmatch.h | 2 +- Clas12Banks/mcparticle.h | 2 +- Clas12Banks/mesonex_trigger.h | 2 +- Clas12Banks/particle.cpp | 2 +- Clas12Banks/particle.h | 4 ++-- Clas12Banks/particle_detector.h | 2 +- Clas12Banks/region_detector.h | 2 +- Clas12Banks/runconfig.h | 2 +- Clas12Banks/scaler.h | 2 +- Clas12Banks/scaler_reader.h | 4 ++-- Clas12Banks/scintextras.h | 2 +- Clas12Banks/vertdoca.h | 2 +- Clas12Banks/vtp.h | 2 +- Clas12Root/CMakeLists.txt | 6 +++--- Clas12Root/HipoChain.cpp | 2 +- RunRoot/LoadProofLib.C | 2 +- 30 files changed, 46 insertions(+), 44 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 64a222e..3064e28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ROOT_CXX_FLAGS}") find_package(PkgConfig REQUIRED) pkg_check_modules(hipo4 REQUIRED IMPORTED_TARGET hipo4) MESSAGE( STATUS "HIPO4 INCLUDE_DIR : " ${hipo4_INCLUDE_DIRS} ) +MESSAGE( STATUS "HIPO4 LIBRARIES : " ${hipo4_LIBRARIES} ) #include clas12-qadb c++ library and rapidjson library diff --git a/Clas12Banks/CMakeLists.txt b/Clas12Banks/CMakeLists.txt index a41440f..eac1e99 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,18 +58,17 @@ IF (DEFINED ENV{RCDB_HOME}) ENDIF (DEFINED ENV{RCDB_HOME}) - -include_directories(${hipo4_INCLUDE_DIRS}) include_directories(${CLAS12ROOT_DIR}) -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} PkgConfig::hipo4 ) +target_link_libraries(${CLAS12BANKS} PUBLIC ${ROOT_LIBRARIES} PkgConfig::${HIPO4} ) +target_include_directories(${CLAS12BANKS} SYSTEM PUBLIC PkgConfig::${HIPO4}) -install(TARGETS Clas12Banks +install(TARGETS ${CLAS12BANKS} LIBRARY 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/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..ec0005a 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 +#include #include "event.h" -#include "utils.h" -#include "dictionary.h" +#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..edc3960 100644 --- a/Clas12Banks/ftbparticle.cpp +++ b/Clas12Banks/ftbparticle.cpp @@ -5,7 +5,7 @@ */ #include "ftbparticle.h" -#include "dictionary.h" +#include namespace clas12 { diff --git a/Clas12Banks/ftbparticle.h b/Clas12Banks/ftbparticle.h index 163b68c..57a6467 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..b01ec8a 100644 --- a/Clas12Banks/particle.cpp +++ b/Clas12Banks/particle.cpp @@ -5,7 +5,7 @@ */ #include "particle.h" -#include "dictionary.h" +#include 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/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.h b/Clas12Banks/scaler_reader.h index 5d3f219..b82b04a 100644 --- a/Clas12Banks/scaler_reader.h +++ b/Clas12Banks/scaler_reader.h @@ -1,7 +1,7 @@ #pragma once -#include "reader.h" -#include "dictionary.h" +#include +#include #include "event.h" #include "scaler.h" #include "runconfig.h" 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 957e783..ef331ce 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}) @@ -34,14 +34,14 @@ IF (DEFINED ENV{CCDB_HOME}) ENDIF (DEFINED ENV{CCDB_HOME}) -include_directories(${hipo4_INCLUDE_DIRS}) include_directories(${CLAS12BANKS_DIR}) 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} PUBLIC ${ROOT_LIBRARIES} ${CLAS12BANKS} PkgConfig::hipo4) +target_link_libraries(${CLAS12ROOT} PUBLIC ${ROOT_LIBRARIES} ${CLAS12BANKS} PkgConfig::${HIPO4}) +target_include_directories(${CLAS12ROOT} SYSTEM PUBLIC PkgConfig::${HIPO4}) install(TARGETS ${CLAS12ROOT} 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/RunRoot/LoadProofLib.C b/RunRoot/LoadProofLib.C index cf04b15..21b5289 100644 --- a/RunRoot/LoadProofLib.C +++ b/RunRoot/LoadProofLib.C @@ -18,7 +18,7 @@ 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()){