Skip to content

Commit

Permalink
change to include hipo4/bank.h etc, use PkgConfig::Hipo4
Browse files Browse the repository at this point in the history
  • Loading branch information
dglazier committed Jan 31, 2024
1 parent 0965a91 commit 38962fa
Show file tree
Hide file tree
Showing 30 changed files with 46 additions and 44 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 8 additions & 7 deletions Clas12Banks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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}")
2 changes: 1 addition & 1 deletion Clas12Banks/calextras.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef CLAS12_CALEXTRAS_H
#define CLAS12_CALEXTRAS_H

#include "bank.h"
#include <hipo4/bank.h>
#include <memory>


Expand Down
4 changes: 2 additions & 2 deletions Clas12Banks/clas12reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "clas12defs.h"
#include "clas12databases.h"
#include "reader.h"
#include <hipo4/reader.h>
#include "particle.h"
#include "ftbparticle.h"
#include "mcparticle.h"
Expand Down Expand Up @@ -37,7 +37,7 @@
#include "region_band.h"
#include "scaler_reader.h"
#include "rcdb_vals.h"
#include "dictionary.h"
#include <hipo4/dictionary.h>

#include <algorithm>
#include <set>
Expand Down
8 changes: 4 additions & 4 deletions Clas12Banks/clas12writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

#include "clas12defs.h"
#include "clas12reader.h"
#include "writer.h"
#include "bank.h"
#include <hipo4/writer.h>
#include <hipo4/bank.h>
#include "event.h"
#include "utils.h"
#include "dictionary.h"
#include <hipo4/utils.h>
#include <hipo4/bank.h>

#include <algorithm>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/covmatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifndef CLAS12_COVMATRIX_H
#define CLAS12_COVMATRIX_H

#include "bank.h"
#include <hipo4/bank.h>
#include <vector>
#include <map>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <map>
#include "bank.h"
#include <hipo4/bank.h>


namespace clas12 {
Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <iostream>
#include <vector>
#include <memory>
#include "bank.h"
#include <hipo4/bank.h>
#include "ftbevent.h"

namespace clas12 {
Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/ftbevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <iostream>
#include <vector>
#include <memory>
#include "bank.h"
#include <hipo4/bank.h>

namespace clas12 {

Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/ftbparticle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include "ftbparticle.h"
#include "dictionary.h"
#include <hipo4/bank.h>


namespace clas12 {
Expand Down
4 changes: 2 additions & 2 deletions Clas12Banks/ftbparticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#ifndef FTBPARTICLE_H
#define FTBPARTICLE_H

#include "bank.h"
#include "dictionary.h"
#include <hipo4/bank.h>
#include <hipo4/bank.h>
#include <memory>

namespace clas12 {
Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/helflip.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <iostream>
#include <vector>
#include <memory>
#include "bank.h"
#include <hipo4/bank.h>
#include "runconfig.h"

namespace clas12 {
Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/helonline.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <iostream>
#include <vector>
#include <memory>
#include "bank.h"
#include <hipo4/bank.h>

namespace clas12 {

Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/mcevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#ifndef MCEVENT_H
#define MCEVENT_H

#include "bank.h"
#include <hipo4/bank.h>
#include <cmath>
#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/mcmatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#ifndef MCMATCH_H
#define MCMATCH_H

#include "bank.h"
#include <hipo4/bank.h>
#include <cmath>
#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/mcparticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#ifndef MCPARTICLE_H
#define MCPARTICLE_H

#include "bank.h"
#include <hipo4/bank.h>
#include "mcmatch.h"
#include <cmath>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/mesonex_trigger.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <set>
#include "clas12defs.h"
#include "clas12reader.h"
#include "utils.h"
#include <hipo4/utils.h>

namespace clas12 {

Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/particle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include "particle.h"
#include "dictionary.h"
#include <hipo4/bank.h>


namespace clas12 {
Expand Down
4 changes: 2 additions & 2 deletions Clas12Banks/particle.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#ifndef PARTICLE_H
#define PARTICLE_H

#include "bank.h"
#include "dictionary.h"
#include <hipo4/bank.h>
#include <hipo4/dictionary.h>
#include "ftbparticle.h"
#include <cmath>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/particle_detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <string>
#include <memory>
#include "clas12defs.h"
#include "bank.h"
#include <hipo4/bank.h>


namespace clas12 {
Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/region_detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <map>
#include <string>
#include "clas12defs.h"
#include "bank.h"
#include <hipo4/bank.h>


namespace clas12 {
Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/runconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <iostream>
#include <vector>
#include <memory>
#include "bank.h"
#include <hipo4/bank.h>

namespace clas12 {

Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/scaler.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifndef SCALER_H
#define SCALER_H

#include "bank.h"
#include <hipo4/bank.h>
#include <memory>

namespace clas12 {
Expand Down
4 changes: 2 additions & 2 deletions Clas12Banks/scaler_reader.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "reader.h"
#include "dictionary.h"
#include <hipo4/reader.h>
#include <hipo4/bank.h>
#include "event.h"
#include "scaler.h"
#include "runconfig.h"
Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/scintextras.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifndef CLAS12_SCINTEXTRAS_H
#define CLAS12_SCINTEXTRAS_H

#include "bank.h"
#include <hipo4/bank.h>
#include <memory>
//#include "scintillator.h"

Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/vertdoca.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <iostream>
#include <vector>
#include <memory>
#include "bank.h"
#include <hipo4/bank.h>

namespace clas12 {

Expand Down
2 changes: 1 addition & 1 deletion Clas12Banks/vtp.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifndef VTP_H
#define VTP_H

#include "bank.h"
#include <hipo4/bank.h>
#include <bitset>
#include <memory>

Expand Down
6 changes: 3 additions & 3 deletions Clas12Root/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion Clas12Root/HipoChain.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <TError.h>
#include <TFile.h>
#include "HipoChain.h"
#include "reader.h"
#include <hipo4/reader.h>
#include "clas12reader.h"

namespace clas12root {
Expand Down
2 changes: 1 addition & 1 deletion RunRoot/LoadProofLib.C
Original file line number Diff line number Diff line change
Expand Up @@ -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()){
Expand Down

0 comments on commit 38962fa

Please sign in to comment.