Skip to content

Commit

Permalink
adding spdlog to other modules
Browse files Browse the repository at this point in the history
  • Loading branch information
martinunland committed Jan 11, 2024
1 parent f064ee1 commit cfb5fe0
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ include(${ROOT_USE_FILE})
# Include the subdirectories

add_subdirectory(common)
#add_subdirectory(effective_area)
add_subdirectory(radioactive_decays)
add_subdirectory(effective_area)
#add_subdirectory(radioactive_decays)
#add_subdirectory(supernova)

# Copy auxiliary files from source directory to binary directory
Expand Down
2 changes: 1 addition & 1 deletion effective_area/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ target_include_directories(OMSim_effective_area PUBLIC
)

# Link the libraries
target_link_libraries(OMSim_effective_area ${Geant4_LIBRARIES} ${ROOT_LIBRARIES} ${OPENSSL_LIBRARIES} /usr/lib/x86_64-linux-gnu/libargtable2.so.0 Boost::program_options $<$<BOOL:${MINGW}>:ws2_32>)
target_link_libraries(OMSim_effective_area ${Geant4_LIBRARIES} ${ROOT_LIBRARIES} ${OPENSSL_LIBRARIES} /usr/lib/x86_64-linux-gnu/libargtable2.so.0 Boost::program_options spdlog::spdlog fmt::fmt $<$<BOOL:${MINGW}>:ws2_32>)
2 changes: 2 additions & 0 deletions effective_area/OMSim_effective_area.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include "OMSimEffectiveAreaAnalyisis.hh"
#include "OMSimEffectiveAreaDetector.hh"

std::shared_ptr<spdlog::logger> global_logger;

namespace po = boost::program_options;

void effectiveAreaSimulation()
Expand Down
1 change: 0 additions & 1 deletion radioactive_decays/OMSim_radioactive_decays.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ int main(int argc, char *argv[])
lSpecific.add_options()
("world_radius,w", po::value<G4double>()->default_value(3.0), "radius of world sphere in m")
("radius,r", po::value<G4double>()->default_value(300.0), "plane wave radius in mm")
("detector_type", po::value<G4int>()->default_value(2), "module type [custom = 0, Single PMT = 1, mDOM = 2, pDDOM = 3, LOM16 = 4]")
("no_PV_decays", po::bool_switch(), "skips the simulation of decays in pressure vessel")
("no_PMT_decays", po::bool_switch(), "skips the simulation of decays in PMT glass")
("multiplicity_study", po::bool_switch(), "only multiplicity is calculated and written in output. Hit information is not written in output (file would be too large!).")
Expand Down
1 change: 0 additions & 1 deletion radioactive_decays/src/OMSimDecaysGPS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ std::map<G4String, G4int> OMSimDecaysGPS::calculateNumberOfDecays(G4MaterialProp
G4String lIsotope = pair.first;
G4double lActivity = pMPT->GetConstProperty(lIsotope + "_ACTIVITY");
mNumberDecays[pair.first] = G4int(G4Poisson(lActivity * pTimeWindow * pMass));
G4String lLog = "Number of decays for Isotope " + lIsotope + " is " + std::to_string(mNumberDecays[pair.first]);
log_trace("Number of calculated decays for Isotope {} is {}", lIsotope, mNumberDecays[pair.first]);
}
return mNumberDecays;
Expand Down
1 change: 1 addition & 0 deletions radioactive_decays/src/OMSimG4Scintillation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
////////////////////////////////////////////////////////////////////////

#include "OMSimG4Scintillation.hh"
#include "OMSimLogger.hh"

#include "globals.hh"
#include "G4DynamicParticle.hh"
Expand Down
2 changes: 1 addition & 1 deletion supernova/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ target_include_directories(OMSim_supernova PUBLIC

# Link the libraries
#target_link_libraries(OMSim_radioactive_decays ${Geant4_LIBRARIES} ${ROOT_LIBRARIES} ${OPENSSL_LIBRARIES} /usr/lib/x86_64-linux-gnu/libargtable2.so.0 Boost::program_options $<$<BOOL:${MINGW}>:ws2_32>)
target_link_libraries(OMSim_supernova ${Geant4_LIBRARIES} ${ROOT_LIBRARIES} ${OPENSSL_LIBRARIES} /usr/lib/x86_64-linux-gnu/libargtable2.so.0 Boost::program_options $<$<BOOL:${MINGW}>:ws2_32>)
target_link_libraries(OMSim_supernova ${Geant4_LIBRARIES} ${ROOT_LIBRARIES} ${OPENSSL_LIBRARIES} /usr/lib/x86_64-linux-gnu/libargtable2.so.0 Boost::program_options spdlog::spdlog fmt::fmt $<$<BOOL:${MINGW}>:ws2_32>)
2 changes: 2 additions & 0 deletions supernova/OMSim_supernova.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "G4Navigator.hh"
#include "OMSimSNdetector.hh"

std::shared_ptr<spdlog::logger> global_logger;

// TODO: change this global. getInstance?
G4Navigator* gNavigator =nullptr;
void setGlobalNavigator(G4Navigator* pNavigator){gNavigator = pNavigator;}
Expand Down

0 comments on commit cfb5fe0

Please sign in to comment.