diff --git a/sbncode/BeamSpillInfoRetriever/ICARUSBNBEXTRetriever/CMakeLists.txt b/sbncode/BeamSpillInfoRetriever/ICARUSBNBEXTRetriever/CMakeLists.txt index 1b1cbce80..b1433c96b 100644 --- a/sbncode/BeamSpillInfoRetriever/ICARUSBNBEXTRetriever/CMakeLists.txt +++ b/sbncode/BeamSpillInfoRetriever/ICARUSBNBEXTRetriever/CMakeLists.txt @@ -1,6 +1,6 @@ cet_build_plugin(ICARUSBNBEXTRetriever art::module - LIBRARIES + LIBRARIES PRIVATE art::Persistency_Common art::Utilities canvas::canvas cetlib::cetlib cetlib_except::cetlib_except diff --git a/sbncode/BeamSpillInfoRetriever/ICARUSBNBRetriever/CMakeLists.txt b/sbncode/BeamSpillInfoRetriever/ICARUSBNBRetriever/CMakeLists.txt index deeda3a5c..104109bc1 100644 --- a/sbncode/BeamSpillInfoRetriever/ICARUSBNBRetriever/CMakeLists.txt +++ b/sbncode/BeamSpillInfoRetriever/ICARUSBNBRetriever/CMakeLists.txt @@ -2,7 +2,7 @@ find_package(ifbeam) find_package(ifdh_art) cet_build_plugin(ICARUSBNBRetriever art::module - LIBRARIES + LIBRARIES PRIVATE sbn_POTTools sbn_getFOM SQLite::SQLite3 diff --git a/sbncode/BeamSpillInfoRetriever/NuMIEXTRetriever/CMakeLists.txt b/sbncode/BeamSpillInfoRetriever/NuMIEXTRetriever/CMakeLists.txt index f11657b00..e323d253b 100644 --- a/sbncode/BeamSpillInfoRetriever/NuMIEXTRetriever/CMakeLists.txt +++ b/sbncode/BeamSpillInfoRetriever/NuMIEXTRetriever/CMakeLists.txt @@ -1,6 +1,6 @@ cet_build_plugin(NuMIEXTRetriever art::module - LIBRARIES + LIBRARIES PRIVATE art::Persistency_Common art::Utilities canvas::canvas cetlib::cetlib cetlib_except::cetlib_except diff --git a/sbncode/BeamSpillInfoRetriever/NuMIRetriever/CMakeLists.txt b/sbncode/BeamSpillInfoRetriever/NuMIRetriever/CMakeLists.txt index d5fd24b7c..5f03fb618 100644 --- a/sbncode/BeamSpillInfoRetriever/NuMIRetriever/CMakeLists.txt +++ b/sbncode/BeamSpillInfoRetriever/NuMIRetriever/CMakeLists.txt @@ -2,7 +2,7 @@ find_package(ifbeam) find_package(ifdh_art) cet_build_plugin(NuMIRetriever art::module - LIBRARIES + LIBRARIES PRIVATE art::Persistency_Common art::Utilities canvas::canvas cetlib::cetlib cetlib_except::cetlib_except diff --git a/sbncode/BeamSpillInfoRetriever/SBNDBNBEXTRetriever/CMakeLists.txt b/sbncode/BeamSpillInfoRetriever/SBNDBNBEXTRetriever/CMakeLists.txt index 8a16ef2e9..ff9aee2b3 100644 --- a/sbncode/BeamSpillInfoRetriever/SBNDBNBEXTRetriever/CMakeLists.txt +++ b/sbncode/BeamSpillInfoRetriever/SBNDBNBEXTRetriever/CMakeLists.txt @@ -2,7 +2,7 @@ find_package(ifbeam) find_package(ifdh_art) cet_build_plugin(SBNDBNBEXTRetriever art::module - LIBRARIES + LIBRARIES PRIVATE sbn_POTTools ) diff --git a/sbncode/BeamSpillInfoRetriever/SBNDBNBRetriever/CMakeLists.txt b/sbncode/BeamSpillInfoRetriever/SBNDBNBRetriever/CMakeLists.txt index efbf13789..a07fab958 100644 --- a/sbncode/BeamSpillInfoRetriever/SBNDBNBRetriever/CMakeLists.txt +++ b/sbncode/BeamSpillInfoRetriever/SBNDBNBRetriever/CMakeLists.txt @@ -2,7 +2,7 @@ find_package(ifbeam) find_package(ifdh_art) cet_build_plugin(SBNDBNBRetriever art::module - LIBRARIES + LIBRARIES PRIVATE sbn_POTTools sbn_getFOM ) diff --git a/sbncode/BeamSpillInfoRetriever/SBNDBNBZEROBIASRetriever/CMakeLists.txt b/sbncode/BeamSpillInfoRetriever/SBNDBNBZEROBIASRetriever/CMakeLists.txt index 7890fbd93..7187c8451 100644 --- a/sbncode/BeamSpillInfoRetriever/SBNDBNBZEROBIASRetriever/CMakeLists.txt +++ b/sbncode/BeamSpillInfoRetriever/SBNDBNBZEROBIASRetriever/CMakeLists.txt @@ -2,7 +2,7 @@ find_package(ifbeam) find_package(ifdh_art) cet_build_plugin(SBNDBNBZEROBIASRetriever art::module - LIBRARIES + LIBRARIES PRIVATE sbn_POTTools sbn_getFOM ) diff --git a/sbncode/CAFMaker/CMakeLists.txt b/sbncode/CAFMaker/CMakeLists.txt index 1dbde57ed..4368ff48a 100644 --- a/sbncode/CAFMaker/CMakeLists.txt +++ b/sbncode/CAFMaker/CMakeLists.txt @@ -56,7 +56,7 @@ art_make_library( LIBRARY_NAME sbncode_CAFMaker ) cet_build_plugin ( CAFMaker art::module - LIBRARIES + LIBRARIES PRIVATE sbncode_CAFMaker sbnanaobj::StandardRecord larcorealg::Geometry diff --git a/sbncode/Calibration/CMakeLists.txt b/sbncode/Calibration/CMakeLists.txt index 64439a086..8b83d3f70 100644 --- a/sbncode/Calibration/CMakeLists.txt +++ b/sbncode/Calibration/CMakeLists.txt @@ -1,6 +1,6 @@ cet_build_plugin( TrackCaloSkimmer art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -28,7 +28,7 @@ cet_build_plugin( TrackCaloSkimmer art::module ) cet_build_plugin(TrackCaloSkimmerSelectStoppingTrack art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -47,7 +47,7 @@ cet_build_plugin(TrackCaloSkimmerSelectStoppingTrack art::tool ) cet_build_plugin(TrackCaloSkimmerSelectAnode2CathodeTrack art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -61,7 +61,7 @@ cet_build_plugin(TrackCaloSkimmerSelectAnode2CathodeTrack art::tool ) cet_build_plugin(TrackCaloSkimmerSelectAllTrack art::tool - LIBRARIES + LIBRARIES PRIVATE sbnobj::Common_Calibration_dict art::Persistency_Common art::Utilities canvas::canvas @@ -71,7 +71,7 @@ cet_build_plugin(TrackCaloSkimmerSelectAllTrack art::tool ) cet_build_plugin(TrackCaloSkimmerSelectClearCosmicMuon art::tool - LIBRARIES + LIBRARIES PRIVATE sbnobj::Common_Calibration_dict art::Persistency_Common art::Utilities canvas::canvas @@ -81,7 +81,7 @@ cet_build_plugin(TrackCaloSkimmerSelectClearCosmicMuon art::tool ) cet_build_plugin ( DataSelect art::module - LIBRARIES + LIBRARIES PRIVATE PRIVATE ifdh_art::IFDH_service art::Framework_Core art::Framework_Principal diff --git a/sbncode/Cluster3D/CMakeLists.txt b/sbncode/Cluster3D/CMakeLists.txt index dad21f80b..c7a8bfcaf 100644 --- a/sbncode/Cluster3D/CMakeLists.txt +++ b/sbncode/Cluster3D/CMakeLists.txt @@ -56,8 +56,8 @@ set( MODULE_LIBRARIES art_root_io::TFileService_service messagefacility::MF_MessageLogger ) -cet_build_plugin(Cluster3DSBN art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(SnippetHit3DBuilderSBN art::tool LIBRARIES ${TOOL_LIBRARIES} SOURCE SnippetHit3DBuilderSBN_tool.cc) +cet_build_plugin(Cluster3DSBN art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(SnippetHit3DBuilderSBN art::tool LIBRARIES PRIVATE ${TOOL_LIBRARIES}) set_property(SOURCE SnippetHit3DBuilderSBN_tool.cc APPEND PROPERTY COMPILE_DEFINITIONS EIGEN_FFTW_DEFAULT) install_headers() diff --git a/sbncode/CosmicID/CMakeLists.txt b/sbncode/CosmicID/CMakeLists.txt index 527721870..23b551470 100644 --- a/sbncode/CosmicID/CMakeLists.txt +++ b/sbncode/CosmicID/CMakeLists.txt @@ -1,5 +1,5 @@ cet_build_plugin( CRUMBS art::module - LIBRARIES + LIBRARIES PRIVATE art_root_io::TFileService_service fhiclcpp::fhiclcpp art::Persistency_Provenance canvas::canvas diff --git a/sbncode/DetSim/CMakeLists.txt b/sbncode/DetSim/CMakeLists.txt index 113aa375a..805004f36 100644 --- a/sbncode/DetSim/CMakeLists.txt +++ b/sbncode/DetSim/CMakeLists.txt @@ -31,8 +31,8 @@ set( MODULE_LIBRARIES FFTW3::FFTW3 ) -cet_build_plugin(AdjustSimForTrigger art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(FilterSimEnergyDeposits art::module LIBRARIES ${MODULE_LIBRARIES}) +cet_build_plugin(AdjustSimForTrigger art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(FilterSimEnergyDeposits art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) add_subdirectory(fcl) diff --git a/sbncode/EventGenerator/MeVPrtl/CMakeLists.txt b/sbncode/EventGenerator/MeVPrtl/CMakeLists.txt index a4a480811..3d5655ef2 100644 --- a/sbncode/EventGenerator/MeVPrtl/CMakeLists.txt +++ b/sbncode/EventGenerator/MeVPrtl/CMakeLists.txt @@ -2,7 +2,7 @@ add_subdirectory(Tools) add_subdirectory(config) cet_build_plugin( MeVPrtlGen art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -24,7 +24,7 @@ cet_build_plugin( MeVPrtlGen art::module ) cet_build_plugin( MeVPrtlTestRayTrace art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service diff --git a/sbncode/EventGenerator/MeVPrtl/Tools/ALP/CMakeLists.txt b/sbncode/EventGenerator/MeVPrtl/Tools/ALP/CMakeLists.txt index 5b30f0ab8..a5aabb70f 100644 --- a/sbncode/EventGenerator/MeVPrtl/Tools/ALP/CMakeLists.txt +++ b/sbncode/EventGenerator/MeVPrtl/Tools/ALP/CMakeLists.txt @@ -5,7 +5,7 @@ art_make_library( LIBRARY_NAME sbncode_EventGenerator_MeVPrtl_ALP_ThreeBodyInteg ) cet_build_plugin( Meson2ALP art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -25,7 +25,7 @@ cet_build_plugin( Meson2ALP art::tool ) cet_build_plugin( ALPMakeDecay art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service diff --git a/sbncode/EventGenerator/MeVPrtl/Tools/CMakeLists.txt b/sbncode/EventGenerator/MeVPrtl/Tools/CMakeLists.txt index e385350a6..b82d2ca4f 100644 --- a/sbncode/EventGenerator/MeVPrtl/Tools/CMakeLists.txt +++ b/sbncode/EventGenerator/MeVPrtl/Tools/CMakeLists.txt @@ -11,7 +11,7 @@ art_make_library( LIBRARY_NAME sbncode_EventGenerator_MeVPrtl_Constants cet_build_plugin( EmptyKaonGen art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -34,7 +34,7 @@ cet_build_plugin( EmptyKaonGen art::tool cet_build_plugin( NuMiKaonGen art::tool - LIBRARIES + LIBRARIES PRIVATE ifdh_art::IFDH_service art::Framework_Core art::Framework_Services_Registry @@ -57,7 +57,7 @@ cet_build_plugin( NuMiKaonGen art::tool ) cet_build_plugin( TxtFileGen art::tool - LIBRARIES + LIBRARIES PRIVATE ifdh_art::IFDH_service art::Framework_Core art::Framework_Services_Registry @@ -80,8 +80,7 @@ cet_build_plugin( TxtFileGen art::tool ) cet_build_plugin( BNBKaonGen art::tool - - LIBRARIES + LIBRARIES PRIVATE ifdh_art::IFDH_service art::Framework_Core art::Framework_Services_Registry @@ -104,7 +103,7 @@ cet_build_plugin( BNBKaonGen art::tool ) cet_build_plugin( WeightedRayTraceBox art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -127,7 +126,7 @@ cet_build_plugin( WeightedRayTraceBox art::tool ) cet_build_plugin( MixedWeightRayTraceBox art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -153,7 +152,7 @@ cet_build_plugin( MixedWeightRayTraceBox art::tool cet_build_plugin( ReThrowRayTraceBox art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -175,7 +174,7 @@ cet_build_plugin( ReThrowRayTraceBox art::tool ) cet_build_plugin( RayTraceBox art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service diff --git a/sbncode/EventGenerator/MeVPrtl/Tools/HNL/CMakeLists.txt b/sbncode/EventGenerator/MeVPrtl/Tools/HNL/CMakeLists.txt index afc82c2b6..2232fdb22 100644 --- a/sbncode/EventGenerator/MeVPrtl/Tools/HNL/CMakeLists.txt +++ b/sbncode/EventGenerator/MeVPrtl/Tools/HNL/CMakeLists.txt @@ -45,7 +45,7 @@ art_make_library( LIBRARY_NAME sbncode_EventGenerator_MeVPrtl_AnTwoBD cet_build_plugin( Kaon2HNLFlux art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -65,7 +65,7 @@ cet_build_plugin( Kaon2HNLFlux art::tool ) cet_build_plugin( Tau2HNLFlux art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -86,7 +86,7 @@ cet_build_plugin( Tau2HNLFlux art::tool ) cet_build_plugin( HNLMakeDecay art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service diff --git a/sbncode/EventGenerator/MeVPrtl/Tools/Higgs/CMakeLists.txt b/sbncode/EventGenerator/MeVPrtl/Tools/Higgs/CMakeLists.txt index 867e62a1f..314e72967 100644 --- a/sbncode/EventGenerator/MeVPrtl/Tools/Higgs/CMakeLists.txt +++ b/sbncode/EventGenerator/MeVPrtl/Tools/Higgs/CMakeLists.txt @@ -1,5 +1,5 @@ cet_build_plugin( MonoEnergyHiggsFlux art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -17,7 +17,7 @@ cet_build_plugin( MonoEnergyHiggsFlux art::tool cet_build_plugin( Kaon2HiggsFlux art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -37,7 +37,7 @@ cet_build_plugin( Kaon2HiggsFlux art::tool ) cet_build_plugin( HiggsMakeDecay art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service diff --git a/sbncode/EventGenerator/WireModGen/CMakeLists.txt b/sbncode/EventGenerator/WireModGen/CMakeLists.txt index c119741b6..dfd93844e 100644 --- a/sbncode/EventGenerator/WireModGen/CMakeLists.txt +++ b/sbncode/EventGenerator/WireModGen/CMakeLists.txt @@ -1,5 +1,5 @@ cet_build_plugin(WireModMuon art::EDProducer - SOURCE CORSIKAGenSBN.cc WireModMuon_module.cc + REG_SOURCE CORSIKAGenSBN.cc WireModMuon_module.cc LIBRARIES PRIVATE larcore::Geometry_Geometry_service larcorealg::Geometry diff --git a/sbncode/FlashMatch/CMakeLists.txt b/sbncode/FlashMatch/CMakeLists.txt index 015322e49..9cfd8588b 100644 --- a/sbncode/FlashMatch/CMakeLists.txt +++ b/sbncode/FlashMatch/CMakeLists.txt @@ -36,7 +36,7 @@ set( MODULE_LIBRARIES ROOT::Gdml ) -cet_build_plugin(FlashPredict art::module LIBRARIES ${MODULE_LIBRARIES}) +cet_build_plugin(FlashPredict art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) install_headers() diff --git a/sbncode/FluxReader/CMakeLists.txt b/sbncode/FluxReader/CMakeLists.txt index ad70d3c22..0aa8b218c 100644 --- a/sbncode/FluxReader/CMakeLists.txt +++ b/sbncode/FluxReader/CMakeLists.txt @@ -4,7 +4,7 @@ cet_enable_asserts() file(GLOB INTERFACEFILES *Interface* ) cet_build_plugin( FluxReader art::source - LIBRARIES + LIBRARIES PRIVATE sbncode_FluxReader larcore::Geometry_Geometry_service nutools::EventGeneratorBase_CRY @@ -12,7 +12,7 @@ cet_build_plugin( FluxReader art::source ) cet_build_plugin ( FluxGeoFilter art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Principal art::Framework_Services_Registry @@ -71,7 +71,7 @@ cet_make_library( lardata::Utilities ) -cet_build_plugin(FluxReaderAna art::module LIBRARIES +cet_build_plugin(FluxReaderAna art::module LIBRARIES PRIVATE sbncode_FluxReader sbncode_FluxReader_FluxInterface nusimdata::SimulationBase diff --git a/sbncode/HitFinder/CMakeLists.txt b/sbncode/HitFinder/CMakeLists.txt index 1d4870cef..a150cc14c 100644 --- a/sbncode/HitFinder/CMakeLists.txt +++ b/sbncode/HitFinder/CMakeLists.txt @@ -43,13 +43,13 @@ set( MODULE_LIBRARIES ) cet_build_plugin(GaussHitFinderSBN art::module - LIBRARIES ${MODULE_LIBRARIES} + LIBRARIES PRIVATE ${MODULE_LIBRARIES} larreco::HitFinder larreco::CandidateHitFinderTool larreco::PeakFitterTool ) -cet_build_plugin(ChannelROIToWire art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(WireToChannelROI art::module LIBRARIES ${MODULE_LIBRARIES}) +cet_build_plugin(ChannelROIToWire art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(WireToChannelROI art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) install_headers() diff --git a/sbncode/LArG4/CMakeLists.txt b/sbncode/LArG4/CMakeLists.txt index f377b254d..4a00b17ef 100644 --- a/sbncode/LArG4/CMakeLists.txt +++ b/sbncode/LArG4/CMakeLists.txt @@ -25,7 +25,7 @@ set( sbncode_LArG4_PhysicsLists ) -cet_build_plugin(PhysListLoader art::module SOURCE PhysListLoader_module.cc LIBRARIES ${MODULE_LIBRARIES}) +cet_build_plugin(PhysListLoader art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) cet_make_library(SOURCE MergeSimSourcesLiteUtility.cxx LIBRARIES @@ -35,7 +35,7 @@ cet_make_library(SOURCE MergeSimSourcesLiteUtility.cxx ) cet_build_plugin(MergeSimSourcesSBN art::EDProducer - LIBRARIES + LIBRARIES PRIVATE sbncode::LArG4 larsim::MergeSimSources lardataobj::MCBase diff --git a/sbncode/LArRecoProducer/CMakeLists.txt b/sbncode/LArRecoProducer/CMakeLists.txt index 3f3fe7b4b..e0463b151 100644 --- a/sbncode/LArRecoProducer/CMakeLists.txt +++ b/sbncode/LArRecoProducer/CMakeLists.txt @@ -28,18 +28,18 @@ set( MODULE_LIBRARIES lardataobj::RecoBase ) -cet_build_plugin(CRTHitConverter art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(MCSFitAllPID art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(PMTFlashTriggerFilter art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(PMTFlashTriggerMaker art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(RangePAllPID art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(ShowerCosmicDistance art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(ShowerSelectionVars art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(TrackScatterClosestApproach art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(TrackStoppingChi2Fitter art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(TransferPFParticleFlashMatch art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(TransferPFParticleT0 art::module LIBRARIES ${MODULE_LIBRARIES}) -cet_build_plugin(TransferTrackT0 art::module LIBRARIES ${MODULE_LIBRARIES}) +cet_build_plugin(CRTHitConverter art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(MCSFitAllPID art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(PMTFlashTriggerFilter art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(PMTFlashTriggerMaker art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(RangePAllPID art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(ShowerCosmicDistance art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(ShowerSelectionVars art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(TrackScatterClosestApproach art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(TrackStoppingChi2Fitter art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(TransferPFParticleFlashMatch art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(TransferPFParticleT0 art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) +cet_build_plugin(TransferTrackT0 art::module LIBRARIES PRIVATE ${MODULE_LIBRARIES}) install_headers() install_fhicl() diff --git a/sbncode/Metadata/FileCatalogMetadataSBN.cc b/sbncode/Metadata/FileCatalogMetadataSBN.cc new file mode 100644 index 000000000..417ec09cc --- /dev/null +++ b/sbncode/Metadata/FileCatalogMetadataSBN.cc @@ -0,0 +1,110 @@ +//////////////////////////////////////////////////////////////////////// +// Name: FileCatalogMetadataSBN_service.cc. +// +// Purpose: Implementation for FileCatalogMetadataSBN. +// +// Created: 28-Oct-2014, H. Greenlee +// +//////////////////////////////////////////////////////////////////////// + +#include "sbncode/Metadata/FileCatalogMetadataSBN.h" + +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art/Framework/Services/System/FileCatalogMetadata.h" +#include "art/Framework/Principal/SubRun.h" +#include "art/Framework/Principal/Handle.h" +#include "cetlib_except/exception.h" +#include "larcoreobj/SummaryData/POTSummary.h" + +//-------------------------------------------------------------------- +// Constructor. + +util::FileCatalogMetadataSBN:: +FileCatalogMetadataSBN(fhicl::ParameterSet const& pset, art::ActivityRegistry& reg) : + fTotPOT(0.) +{ + // Insist on configuring Experiment from the fcl file (ideally) or the + // environment. + const char* expt = getenv("EXPERIMENT"); + if(expt) fExperiment = pset.get("Experiment", expt); else fExperiment = pset.get("Experiment"); + std::transform(fExperiment.begin(), fExperiment.end(), fExperiment.begin(), [](unsigned char c){return std::tolower(c);}); + + // Get parameters. + + fFCLName = pset.get("FCLName"); + fProjectName = pset.get("ProjectName"); + fProjectStage = pset.get("ProjectStage"); + fProjectVersion = pset.get("ProjectVersion"); + fProjectSoftware = pset.get("ProjectSoftware",""); + fProductionName = pset.get("ProductionName",""); //Leave as default value if not running a production + fProductionType = pset.get("ProductionType",""); //Leave as default value if not running a production + fMerge = pset.get("Merge", -1); + fParameters = pset.get>>("Parameters", std::vector>()); + fPOTModuleLabel = pset.get("POTModuleLabel", "generator"); + + // Register for callbacks. + + reg.sPostBeginJob.watch(this, &FileCatalogMetadataSBN::postBeginJob); + reg.sPostEndSubRun.watch(this, &FileCatalogMetadataSBN::postEndSubRun); + reg.sPreCloseOutputFile.watch(this, &FileCatalogMetadataSBN::preCloseOutputFile); +} + +//-------------------------------------------------------------------- +// PostBeginJob callback. +// Insert per-job metadata via FileCatalogMetadata service. +void util::FileCatalogMetadataSBN::postBeginJob() +{ + // Get art metadata service. + + art::ServiceHandle mds; + + // Add metadata. + + if (!fFCLName.empty()) mds->addMetadata("fcl.name", fFCLName); + if (!fProjectName.empty()) mds->addMetadata(fExperiment + "_project.name", fProjectName); + if (!fProjectStage.empty()) mds->addMetadata(fExperiment + "_project.stage", fProjectStage); + if (!fProjectVersion.empty()) mds->addMetadata(fExperiment + "_project.version", fProjectVersion); + if (!fProjectSoftware.empty()) mds->addMetadata(fExperiment + "_project.software", fProjectSoftware); + if (!fProductionName.empty()) mds->addMetadata("production.name", fProductionName); + if (!fProductionType.empty()) mds->addMetadata("production.type", fProductionType); + std::ostringstream ostr; + if(fMerge >= 0) { + if(fMerge > 0) + mds->addMetadata("merge.merge", "1"); + else + mds->addMetadata("merge.merge", "0"); + mds->addMetadata("merge.merged", "0"); + } + for(auto const& param : fParameters) + mds->addMetadata(param.first, param.second); +} + +//-------------------------------------------------------------------- +// PostEndSubrun callback. +void util::FileCatalogMetadataSBN::postEndSubRun(art::SubRun const& sr) +{ + + art::ServiceHandle mds; + + art::Handle< sumdata::POTSummary > potListHandle; + if(sr.getByLabel(fPOTModuleLabel,potListHandle)){ + std::lock_guard lock(fMutex); + fTotPOT+=potListHandle->totpot; + } +} + +// PreCloseOutputFile callback. +void util::FileCatalogMetadataSBN::preCloseOutputFile(const std::string& label) +{ + std::lock_guard lock(fMutex); + + art::ServiceHandle mds; + + if(fTotPOT > 0.) { + std::ostringstream streamObj; + streamObj << fTotPOT; + std::string strPOT = streamObj.str(); + mds->addMetadata("mc.pot", strPOT); + } + fTotPOT = 0.; +} diff --git a/sbncode/Metadata/FileCatalogMetadataSBN_service.cc b/sbncode/Metadata/FileCatalogMetadataSBN_service.cc index 97ed33d73..73c5ec7e4 100644 --- a/sbncode/Metadata/FileCatalogMetadataSBN_service.cc +++ b/sbncode/Metadata/FileCatalogMetadataSBN_service.cc @@ -1,113 +1,4 @@ -//////////////////////////////////////////////////////////////////////// -// Name: FileCatalogMetadataSBN_service.cc. -// -// Purpose: Implementation for FileCatalogMetadataSBN. -// -// Created: 28-Oct-2014, H. Greenlee -// -//////////////////////////////////////////////////////////////////////// - -#include "sbncode/Metadata/FileCatalogMetadataSBN.h" - -#include "art/Framework/Services/Registry/ServiceHandle.h" #include "art/Framework/Services/Registry/ServiceDefinitionMacros.h" -#include "art/Framework/Services/System/FileCatalogMetadata.h" -#include "art/Framework/Principal/SubRun.h" -#include "art/Framework/Principal/Handle.h" -#include "cetlib_except/exception.h" -#include "larcoreobj/SummaryData/POTSummary.h" - -//-------------------------------------------------------------------- -// Constructor. - -util::FileCatalogMetadataSBN:: -FileCatalogMetadataSBN(fhicl::ParameterSet const& pset, art::ActivityRegistry& reg) : - fTotPOT(0.) -{ - // Insist on configuring Experiment from the fcl file (ideally) or the - // environment. - const char* expt = getenv("EXPERIMENT"); - if(expt) fExperiment = pset.get("Experiment", expt); else fExperiment = pset.get("Experiment"); - std::transform(fExperiment.begin(), fExperiment.end(), fExperiment.begin(), [](unsigned char c){return std::tolower(c);}); - - // Get parameters. - - fFCLName = pset.get("FCLName"); - fProjectName = pset.get("ProjectName"); - fProjectStage = pset.get("ProjectStage"); - fProjectVersion = pset.get("ProjectVersion"); - fProjectSoftware = pset.get("ProjectSoftware",""); - fProductionName = pset.get("ProductionName",""); //Leave as default value if not running a production - fProductionType = pset.get("ProductionType",""); //Leave as default value if not running a production - fMerge = pset.get("Merge", -1); - fParameters = pset.get>>("Parameters", std::vector>()); - fPOTModuleLabel = pset.get("POTModuleLabel", "generator"); - - // Register for callbacks. - - reg.sPostBeginJob.watch(this, &FileCatalogMetadataSBN::postBeginJob); - reg.sPostEndSubRun.watch(this, &FileCatalogMetadataSBN::postEndSubRun); - reg.sPreCloseOutputFile.watch(this, &FileCatalogMetadataSBN::preCloseOutputFile); -} - -//-------------------------------------------------------------------- -// PostBeginJob callback. -// Insert per-job metadata via FileCatalogMetadata service. -void util::FileCatalogMetadataSBN::postBeginJob() -{ - // Get art metadata service. - - art::ServiceHandle mds; - - // Add metadata. - - if (!fFCLName.empty()) mds->addMetadata("fcl.name", fFCLName); - if (!fProjectName.empty()) mds->addMetadata(fExperiment + "_project.name", fProjectName); - if (!fProjectStage.empty()) mds->addMetadata(fExperiment + "_project.stage", fProjectStage); - if (!fProjectVersion.empty()) mds->addMetadata(fExperiment + "_project.version", fProjectVersion); - if (!fProjectSoftware.empty()) mds->addMetadata(fExperiment + "_project.software", fProjectSoftware); - if (!fProductionName.empty()) mds->addMetadata("production.name", fProductionName); - if (!fProductionType.empty()) mds->addMetadata("production.type", fProductionType); - std::ostringstream ostr; - if(fMerge >= 0) { - if(fMerge > 0) - mds->addMetadata("merge.merge", "1"); - else - mds->addMetadata("merge.merge", "0"); - mds->addMetadata("merge.merged", "0"); - } - for(auto const& param : fParameters) - mds->addMetadata(param.first, param.second); -} - -//-------------------------------------------------------------------- -// PostEndSubrun callback. -void util::FileCatalogMetadataSBN::postEndSubRun(art::SubRun const& sr) -{ - - art::ServiceHandle mds; - - art::Handle< sumdata::POTSummary > potListHandle; - if(sr.getByLabel(fPOTModuleLabel,potListHandle)){ - std::lock_guard lock(fMutex); - fTotPOT+=potListHandle->totpot; - } -} - -// PreCloseOutputFile callback. -void util::FileCatalogMetadataSBN::preCloseOutputFile(const std::string& label) -{ - std::lock_guard lock(fMutex); - - art::ServiceHandle mds; - - if(fTotPOT > 0.) { - std::ostringstream streamObj; - streamObj << fTotPOT; - std::string strPOT = streamObj.str(); - mds->addMetadata("mc.pot", strPOT); - } - fTotPOT = 0.; -} +#include "sbncode/Metadata/FileCatalogMetadataSBN.h" DEFINE_ART_SERVICE(util::FileCatalogMetadataSBN) diff --git a/sbncode/Metadata/MetadataSBN.cc b/sbncode/Metadata/MetadataSBN.cc new file mode 100644 index 000000000..92e4489cc --- /dev/null +++ b/sbncode/Metadata/MetadataSBN.cc @@ -0,0 +1,425 @@ +//////////////////////////////////////////////////////////////////////// +// Name: MetadataSBN_service.cc. +// +// Purpose: generate SBN-specific sam metadata for root Tfiles (histogram or ntuple files). +// +// FCL parameters: Experiment: Experiment name ("sbnd" or "icarus"). +// JSONFileName: Name of generated .json file(s). +// dataTier: Data tier(s). +// for ntuples, dataTier = root-tuple; +// for histos, dataTier = root-histogram +// (default value: root-tuple) +// fileFormat: This is currently specified by the user, +// the fileFormat for Tfiles is "root" (default value: root) +// Merge: Merge flag. +// 1 - Set merge.merge = 1 and merge.merged = 0 +// 0 - Set merge.merge = 0 and merge.merged = 0 +// -1 - Do not generate merge parameters. +// POTModuleLabel - POTSummary module label (default "generator"). +// +// Parameters JSONFileName, dataTier, and fileFormat can be single +// stringss or sequences of strings. In case of sequences of length +// greater than one, multiple json files will be generated. Sequences +// must be equal length. +// +// Other notes: 1. This service uses the ART's standard file_catalog_metadata service +// to extract some of the common (common to both ART and TFile outputs) +// job-specific metadata parameters, so, it is important to call this +// service in your fcl file +// stick this line in your "services" section of fcl file: +// FileCatalogMetadata: @local::art_file_catalog_mc +// +// 2. When you call FileCatalogMetadata service in your fcl file, and if +// you have (art) root Output section in your fcl file, and if you do not +// have "dataTier" specified in that section, then this service will throw +// an exception. To avoid this, either remove the entire root Output section +// in your fcl file (and remove art stream output from your end_paths) or +// include appropriate dataTier information in the section.If you are only +// running analysis job, best way is to not include any art root Output section. +// +// 3. This service is exclusively written to work with production (in other +// words for jobs submitted through grid). Some of the metadata parameters +// (output TFileName, filesize, Project related details) are captured/updated +// during and/or after the workflow. +// +// +// Created: 21-Feb-2018, D. Brailsford +// based on the SBND version by T. Junk which is based on the +// based on the MicroBooNE example by S. Gollapinni +// +//////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "sbncode/Metadata/MetadataSBN.h" +#include "sbncode/Metadata/FileCatalogMetadataSBN.h" +#include "larcoreobj/SummaryData/POTSummary.h" + +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/SubRun.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art/Framework/Services/System/FileCatalogMetadata.h" +#include "art/Framework/Services/System/TriggerNamesService.h" +#include "art/Utilities/OutputFileInfo.h" +#include "cetlib_except/exception.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + +#include "TROOT.h" +#include "TFile.h" +#include "TTimeStamp.h" + +using namespace std; + +//-------------------------------------------------------------------- + +// Constructor. +util::MetadataSBN::MetadataSBN(fhicl::ParameterSet const& pset, + art::ActivityRegistry& reg): + fFileStats{"", art::ServiceHandle{}->getProcessName()} +{ + // Insist on configuring Experiment from the fcl file (ideally) or the + // environment. + const char* expt = getenv("EXPERIMENT"); + if(expt) fExperiment = pset.get("Experiment", expt); else fExperiment = pset.get("Experiment"); + std::transform(fExperiment.begin(), fExperiment.end(), fExperiment.begin(), [](unsigned char c){return std::tolower(c);}); + + // Get scalar/vector parameters. + if(pset.is_key_to_atom("JSONFileName")) + fJSONFileName.push_back(pset.get("JSONFileName")); + else if(pset.is_key_to_sequence("JSONFileName")) + fJSONFileName = pset.get >("JSONFileName"); + + if(pset.is_key_to_atom("dataTier")) + fDataTier.push_back(pset.get("dataTier")); + else if(pset.is_key_to_sequence("dataTier")) + fDataTier = pset.get >("dataTier"); + if(fDataTier.size() != fJSONFileName.size()) + throw cet::exception("MetadataSBN") << "FCL sequence size mismatch.\n"; + + if(pset.is_key_to_atom("fileFormat")) + fFileFormat.push_back(pset.get("fileFormat")); + else if(pset.is_key_to_sequence("fileFormat")) + fFileFormat = pset.get >("fileFormat"); + if(fFileFormat.size() != fJSONFileName.size()) + throw cet::exception("MetadataSBN") << "FCL sequence size mismatch.\n"; + + if(pset.has_key("Merge")) { + if(pset.is_key_to_atom("Merge")) + fMerge.push_back(pset.get("Merge")); + else if(pset.is_key_to_sequence("Merge")) + fMerge = pset.get >("Merge"); + } + fPOTModuleLabel = pset.get("POTModuleLabel", "generator"); + + reg.sPostBeginJob.watch(this, &MetadataSBN::postBeginJob); + reg.sPostOpenFile.watch(this, &MetadataSBN::postOpenInputFile); + reg.sPostCloseFile.watch(this, &MetadataSBN::postCloseInputFile); + reg.sPostProcessEvent.watch(this, &MetadataSBN::postEvent); + reg.sPostBeginSubRun.watch(this, &MetadataSBN::postBeginSubRun); + reg.sPostEndSubRun.watch(this, &MetadataSBN::postEndSubRun); + + // get metadata from the FileCatalogMetadataSBN service, which is filled on its construction + art::ServiceHandle paramhandle; + md.fFCLName = paramhandle->GetFCLName(); + md.fProjectName = paramhandle->GetProjectName(); + md.fProjectStage = paramhandle->GetProjectStage(); + md.fProjectVersion = paramhandle->GetProjectVersion(); + md.fProjectSoftware = paramhandle->GetProjectSoftware(); + md.fProductionName = paramhandle->GetProductionName(); + md.fProductionType = paramhandle->GetProductionType(); + md.merge = -1; + md.fTotPOT = 0.; +} + +/// Un-quote quoted strings +std::string UnQuoteString(std::string s) +{ + if(s.size() < 2 || s[0] != '\"' || s[s.size()-1] != '\"') return s; + s.erase(0, 1); + s.erase(s.size()-1, 1); + return s; +} + +void MaybeCopyFromMap(const std::map& in, + const std::string& key, + std::string& out) +{ + const auto it = in.find(key); + if(it == in.end()){ + out = ""; + } + else{ + out = UnQuoteString(it->second); + } +} + +void MaybeCopyToMap(const std::string& in, + const std::string& key, + std::map& out) +{ + if(!in.empty()) out[key] = UnQuoteString(in); +} + +//-------------------------------------------------------------------- +// PostBeginJob callback. +// Insert per-job metadata via Metadata service. +void util::MetadataSBN::postBeginJob() +{ + // get the start time + md.fstart_time = time(0); + + // Get art metadata service and extract paramters from there + art::ServiceHandle artmds; + + art::FileCatalogMetadata::collection_type artmd; + artmds->getMetadata(artmd); + + std::map mdmap; + for(const auto& d: artmd) + mdmap[d.first] = UnQuoteString(d.second); + + // if a certain paramter/key is not found, assign an empty string value to it + MaybeCopyFromMap(mdmap, "application.family", std::get<0>(md.fapplication)); + MaybeCopyFromMap(mdmap, "art.process_name", std::get<1>(md.fapplication)); + MaybeCopyFromMap(mdmap, "application.version", std::get<2>(md.fapplication)); + MaybeCopyFromMap(mdmap, "group", md.fgroup); + MaybeCopyFromMap(mdmap, "file_type", md.ffile_type); + MaybeCopyFromMap(mdmap, "art.run_type", frunType); +} + + +//-------------------------------------------------------------------- +// PostOpenFile callback. +void util::MetadataSBN::postOpenInputFile(std::string const& fn) +{ + // save parent input files here + // 08/06 DBrailsford: Only save the parent string if the string is filled. The string still exists (with 0 characters) for generation stage files. See redmine issue 20124 + if (fn.length() > 0) md.fParents.insert(fn); + fFileStats.recordInputFile(fn); +} + +//-------------------------------------------------------------------- +// PostEvent callback. +void util::MetadataSBN::postEvent(art::Event const& evt, art::ScheduleContext) +{ + std::lock_guard lock(fMutex); + + art::RunNumber_t run = evt.run(); + art::SubRunNumber_t subrun = evt.subRun(); + art::EventNumber_t event = evt.event(); + art::SubRunID srid = evt.id().subRunID(); + + // save run, subrun and runType information once every subrun + if (fSubRunNumbers.count(srid) == 0){ + fSubRunNumbers.insert(srid); + md.fruns.push_back(make_tuple(run, subrun, frunType)); + } + + // save the first event + if (md.fevent_count == 0) md.ffirst_event = event; + md.flast_event = event; + // event counter + ++md.fevent_count; + +} + +//-------------------------------------------------------------------- +// PostSubRun callback. +void util::MetadataSBN::postBeginSubRun(art::SubRun const& sr) +{ + std::lock_guard lock(fMutex); + + art::RunNumber_t run = sr.run(); + art::SubRunNumber_t subrun = sr.subRun(); + art::SubRunID srid = sr.id(); + + // save run, subrun and runType information once every subrun + if (fSubRunNumbers.count(srid) == 0){ + fSubRunNumbers.insert(srid); + md.fruns.push_back(make_tuple(run, subrun, frunType)); + } +} + +//-------------------------------------------------------------------- +// PostEndSubRun callback. +void util::MetadataSBN::postEndSubRun(art::SubRun const& sr) +{ + std::lock_guard lock(fMutex); + + art::Handle< sumdata::POTSummary > potListHandle; + double fTotPOT = 0; + if(sr.getByLabel(fPOTModuleLabel,potListHandle)){ + fTotPOT+=potListHandle->totpot; + } + + md.fTotPOT += fTotPOT; +} + + +//-------------------------------------------------------------------- +std::string Escape(const std::string& s) +{ + // If it's formatted as a dict or list, trust it's already formatted + if(s.size() >= 2 && ((s[0] == '{' && s.back() == '}') || (s[0] == '[' && s.back() == ']'))) return s; + + // otherwise quote it + return "\""+s+"\""; +} + +//-------------------------------------------------------------------- +std::string util::MetadataSBN::GetParentsString() const +{ + if(md.fParents.empty()) return ""; + + unsigned int c = 0; + + std::string ret = "[\n"; + for(auto parent: md.fParents) { + std::cout<<"Parent " << c << ": " << parent << std::endl; + c++; + size_t n = parent.find_last_of('/'); + size_t f1 = (n == std::string::npos ? 0 : n+1); + ret += " {\n \"file_name\": \"" + parent.substr(f1) + "\"\n }"; + if(md.fParents.size() == 1 || c == md.fParents.size()) ret += "\n"; + else ret += ",\n"; + } + + ret += " ]"; + return ret; +} + +//-------------------------------------------------------------------- +std::string util::MetadataSBN::GetRunsString() const +{ + unsigned int c = 0; + + std::string ret = "[\n"; + for(auto&t :md.fruns){ + c++; + ret += " [\n " + std::to_string(std::get<0>(t)) + ",\n " + std::to_string(std::get<1>(t)) + ",\n \"" + std::get<2>(t) + "\"\n ]"; + if(md.fruns.size() == 1 || c == md.fruns.size()) ret += "\n"; + else ret += ",\n"; + } + ret += " ]"; + return ret; +} + +//-------------------------------------------------------------------- +void util::MetadataSBN::GetMetadataMaps(std::map& strs, + std::map& ints, + std::map& doubles, + std::map& objs) +{ + strs.clear(); ints.clear(); doubles.clear(); objs.clear(); + + objs["application"] = "{\"family\": \""+std::get<0>(md.fapplication)+"\", \"name\": \""+std::get<1>(md.fapplication)+"\", \"version\": \""+std::get<2>(md.fapplication)+"\"}"; + + if(!md.fParents.empty()) objs["parents"] = GetParentsString(); + if(!md.fruns.empty()) objs["runs"] = GetRunsString(); + + // convert start and end times into time format: Year-Month-DayTHours:Minutes:Seconds + char endbuf[80], startbuf[80]; + struct tm tstruct; + tstruct = *localtime(&md.fend_time); + strftime(endbuf,sizeof(endbuf),"%Y-%m-%dT%H:%M:%S",&tstruct); + tstruct = *localtime(&md.fstart_time); + strftime(startbuf,sizeof(startbuf),"%Y-%m-%dT%H:%M:%S",&tstruct); + + strs["start_time"] = startbuf; + strs["end_time"] = endbuf; + + strs["data_tier"] = md.fdata_tier; + ints["event_count"] = md.fevent_count; + strs["file_format"] = md.ffile_format; + ints["first_event"] = md.ffirst_event; + ints["last_event"] = md.flast_event; + + const std::string proj = fExperiment+"_project"; + MaybeCopyToMap(md.fFCLName, "fcl.name", strs); + MaybeCopyToMap(md.fProjectName, proj+".name", strs); + MaybeCopyToMap(md.fProjectStage, proj+".stage", strs); + MaybeCopyToMap(md.fProjectVersion, proj+".version", strs); + MaybeCopyToMap(md.fProjectSoftware, proj+".software", strs); + MaybeCopyToMap(md.fProductionName, "production.name", strs); + MaybeCopyToMap(md.fProductionType, "production.type", strs); + + MaybeCopyToMap(md.fgroup, "group", strs); + MaybeCopyToMap(md.ffile_type, "file_type", strs); + + if(md.merge >= 0) { + ints["merge.merge"] = (md.merge==0 ? 0 : 1); + ints["merge.merged"] = 0; + } + doubles["mc.pot"] = md.fTotPOT; +} + +//-------------------------------------------------------------------- +// PostCloseFile callback. +void util::MetadataSBN::postCloseInputFile() +{ + //update end time + md.fend_time = time(0); + + // Loop over files. + + for(unsigned int i=0; i i) + md.merge = fMerge[i]; + else + md.merge = -1; + + + std::map strs; + std::map ints; + std::map doubles; + std::map objs; + GetMetadataMaps(strs, ints, doubles, objs); + + // open a json file and write everything from the struct md complying to the + // samweb json format. This json file holds the below information temporarily. + // If you submitted a grid job invoking this service, the information from + // this file is appended to a final json file and this file will be removed + + if(!fJSONFileName[i].empty()){ + std::ofstream jsonfile; + jsonfile.open(fJSONFileName[i]); + jsonfile << "{\n"; + + bool once = true; + for(auto& it: objs){ + if(!once) jsonfile << ",\n"; + once = false; + jsonfile << " \"" << it.first << "\": " << it.second; + } + for(auto& it: strs){ + // Have to escape string outputs + jsonfile << ",\n \"" << it.first << "\": \"" << it.second << "\""; + } + for(auto& it: ints){ + jsonfile << ",\n \"" << it.first << "\": " << it.second; + } + for(auto& it: doubles){ + jsonfile << ",\n \"" << it.first << "\": " << it.second; + } + + jsonfile<<"\n}\n"; + jsonfile.close(); + } + } + + fFileStats.recordFileClose(); + //TODO figure out how to make the name identical to the TFile + //std::string new_name = fRenamer.maybeRenameFile("myjson.json",fJSONFileName); +} diff --git a/sbncode/Metadata/MetadataSBN_service.cc b/sbncode/Metadata/MetadataSBN_service.cc index fed3614ef..e4024421b 100644 --- a/sbncode/Metadata/MetadataSBN_service.cc +++ b/sbncode/Metadata/MetadataSBN_service.cc @@ -1,428 +1,4 @@ -//////////////////////////////////////////////////////////////////////// -// Name: MetadataSBN_service.cc. -// -// Purpose: generate SBN-specific sam metadata for root Tfiles (histogram or ntuple files). -// -// FCL parameters: Experiment: Experiment name ("sbnd" or "icarus"). -// JSONFileName: Name of generated .json file(s). -// dataTier: Data tier(s). -// for ntuples, dataTier = root-tuple; -// for histos, dataTier = root-histogram -// (default value: root-tuple) -// fileFormat: This is currently specified by the user, -// the fileFormat for Tfiles is "root" (default value: root) -// Merge: Merge flag. -// 1 - Set merge.merge = 1 and merge.merged = 0 -// 0 - Set merge.merge = 0 and merge.merged = 0 -// -1 - Do not generate merge parameters. -// POTModuleLabel - POTSummary module label (default "generator"). -// -// Parameters JSONFileName, dataTier, and fileFormat can be single -// stringss or sequences of strings. In case of sequences of length -// greater than one, multiple json files will be generated. Sequences -// must be equal length. -// -// Other notes: 1. This service uses the ART's standard file_catalog_metadata service -// to extract some of the common (common to both ART and TFile outputs) -// job-specific metadata parameters, so, it is important to call this -// service in your fcl file -// stick this line in your "services" section of fcl file: -// FileCatalogMetadata: @local::art_file_catalog_mc -// -// 2. When you call FileCatalogMetadata service in your fcl file, and if -// you have (art) root Output section in your fcl file, and if you do not -// have "dataTier" specified in that section, then this service will throw -// an exception. To avoid this, either remove the entire root Output section -// in your fcl file (and remove art stream output from your end_paths) or -// include appropriate dataTier information in the section.If you are only -// running analysis job, best way is to not include any art root Output section. -// -// 3. This service is exclusively written to work with production (in other -// words for jobs submitted through grid). Some of the metadata parameters -// (output TFileName, filesize, Project related details) are captured/updated -// during and/or after the workflow. -// -// -// Created: 21-Feb-2018, D. Brailsford -// based on the SBND version by T. Junk which is based on the -// based on the MicroBooNE example by S. Gollapinni -// -//////////////////////////////////////////////////////////////////////// - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "sbncode/Metadata/MetadataSBN.h" -#include "sbncode/Metadata/FileCatalogMetadataSBN.h" -#include "larcoreobj/SummaryData/POTSummary.h" - -#include "art/Framework/Principal/Event.h" -#include "art/Framework/Principal/SubRun.h" -#include "art/Framework/Services/Registry/ServiceHandle.h" #include "art/Framework/Services/Registry/ServiceDefinitionMacros.h" -#include "art/Framework/Services/System/FileCatalogMetadata.h" -#include "art/Framework/Services/System/TriggerNamesService.h" -#include "art/Utilities/OutputFileInfo.h" -#include "cetlib_except/exception.h" -#include "messagefacility/MessageLogger/MessageLogger.h" - -#include "TROOT.h" -#include "TFile.h" -#include "TTimeStamp.h" - -using namespace std; - -//-------------------------------------------------------------------- - -// Constructor. -util::MetadataSBN::MetadataSBN(fhicl::ParameterSet const& pset, - art::ActivityRegistry& reg): - fFileStats{"", art::ServiceHandle{}->getProcessName()} -{ - // Insist on configuring Experiment from the fcl file (ideally) or the - // environment. - const char* expt = getenv("EXPERIMENT"); - if(expt) fExperiment = pset.get("Experiment", expt); else fExperiment = pset.get("Experiment"); - std::transform(fExperiment.begin(), fExperiment.end(), fExperiment.begin(), [](unsigned char c){return std::tolower(c);}); - - // Get scalar/vector parameters. - if(pset.is_key_to_atom("JSONFileName")) - fJSONFileName.push_back(pset.get("JSONFileName")); - else if(pset.is_key_to_sequence("JSONFileName")) - fJSONFileName = pset.get >("JSONFileName"); - - if(pset.is_key_to_atom("dataTier")) - fDataTier.push_back(pset.get("dataTier")); - else if(pset.is_key_to_sequence("dataTier")) - fDataTier = pset.get >("dataTier"); - if(fDataTier.size() != fJSONFileName.size()) - throw cet::exception("MetadataSBN") << "FCL sequence size mismatch.\n"; - - if(pset.is_key_to_atom("fileFormat")) - fFileFormat.push_back(pset.get("fileFormat")); - else if(pset.is_key_to_sequence("fileFormat")) - fFileFormat = pset.get >("fileFormat"); - if(fFileFormat.size() != fJSONFileName.size()) - throw cet::exception("MetadataSBN") << "FCL sequence size mismatch.\n"; - - if(pset.has_key("Merge")) { - if(pset.is_key_to_atom("Merge")) - fMerge.push_back(pset.get("Merge")); - else if(pset.is_key_to_sequence("Merge")) - fMerge = pset.get >("Merge"); - } - fPOTModuleLabel = pset.get("POTModuleLabel", "generator"); - - reg.sPostBeginJob.watch(this, &MetadataSBN::postBeginJob); - reg.sPostOpenFile.watch(this, &MetadataSBN::postOpenInputFile); - reg.sPostCloseFile.watch(this, &MetadataSBN::postCloseInputFile); - reg.sPostProcessEvent.watch(this, &MetadataSBN::postEvent); - reg.sPostBeginSubRun.watch(this, &MetadataSBN::postBeginSubRun); - reg.sPostEndSubRun.watch(this, &MetadataSBN::postEndSubRun); - - // get metadata from the FileCatalogMetadataSBN service, which is filled on its construction - art::ServiceHandle paramhandle; - md.fFCLName = paramhandle->GetFCLName(); - md.fProjectName = paramhandle->GetProjectName(); - md.fProjectStage = paramhandle->GetProjectStage(); - md.fProjectVersion = paramhandle->GetProjectVersion(); - md.fProjectSoftware = paramhandle->GetProjectSoftware(); - md.fProductionName = paramhandle->GetProductionName(); - md.fProductionType = paramhandle->GetProductionType(); - md.merge = -1; - md.fTotPOT = 0.; -} - -/// Un-quote quoted strings -std::string UnQuoteString(std::string s) -{ - if(s.size() < 2 || s[0] != '\"' || s[s.size()-1] != '\"') return s; - s.erase(0, 1); - s.erase(s.size()-1, 1); - return s; -} - -void MaybeCopyFromMap(const std::map& in, - const std::string& key, - std::string& out) -{ - const auto it = in.find(key); - if(it == in.end()){ - out = ""; - } - else{ - out = UnQuoteString(it->second); - } -} - -void MaybeCopyToMap(const std::string& in, - const std::string& key, - std::map& out) -{ - if(!in.empty()) out[key] = UnQuoteString(in); -} - -//-------------------------------------------------------------------- -// PostBeginJob callback. -// Insert per-job metadata via Metadata service. -void util::MetadataSBN::postBeginJob() -{ - // get the start time - md.fstart_time = time(0); - - // Get art metadata service and extract paramters from there - art::ServiceHandle artmds; - - art::FileCatalogMetadata::collection_type artmd; - artmds->getMetadata(artmd); - - std::map mdmap; - for(const auto& d: artmd) - mdmap[d.first] = UnQuoteString(d.second); - - // if a certain paramter/key is not found, assign an empty string value to it - MaybeCopyFromMap(mdmap, "application.family", std::get<0>(md.fapplication)); - MaybeCopyFromMap(mdmap, "art.process_name", std::get<1>(md.fapplication)); - MaybeCopyFromMap(mdmap, "application.version", std::get<2>(md.fapplication)); - MaybeCopyFromMap(mdmap, "group", md.fgroup); - MaybeCopyFromMap(mdmap, "file_type", md.ffile_type); - MaybeCopyFromMap(mdmap, "art.run_type", frunType); -} - - -//-------------------------------------------------------------------- -// PostOpenFile callback. -void util::MetadataSBN::postOpenInputFile(std::string const& fn) -{ - // save parent input files here - // 08/06 DBrailsford: Only save the parent string if the string is filled. The string still exists (with 0 characters) for generation stage files. See redmine issue 20124 - if (fn.length() > 0) md.fParents.insert(fn); - fFileStats.recordInputFile(fn); -} - -//-------------------------------------------------------------------- -// PostEvent callback. -void util::MetadataSBN::postEvent(art::Event const& evt, art::ScheduleContext) -{ - std::lock_guard lock(fMutex); - - art::RunNumber_t run = evt.run(); - art::SubRunNumber_t subrun = evt.subRun(); - art::EventNumber_t event = evt.event(); - art::SubRunID srid = evt.id().subRunID(); - - // save run, subrun and runType information once every subrun - if (fSubRunNumbers.count(srid) == 0){ - fSubRunNumbers.insert(srid); - md.fruns.push_back(make_tuple(run, subrun, frunType)); - } - - // save the first event - if (md.fevent_count == 0) md.ffirst_event = event; - md.flast_event = event; - // event counter - ++md.fevent_count; - -} - -//-------------------------------------------------------------------- -// PostSubRun callback. -void util::MetadataSBN::postBeginSubRun(art::SubRun const& sr) -{ - std::lock_guard lock(fMutex); - - art::RunNumber_t run = sr.run(); - art::SubRunNumber_t subrun = sr.subRun(); - art::SubRunID srid = sr.id(); - - // save run, subrun and runType information once every subrun - if (fSubRunNumbers.count(srid) == 0){ - fSubRunNumbers.insert(srid); - md.fruns.push_back(make_tuple(run, subrun, frunType)); - } -} - -//-------------------------------------------------------------------- -// PostEndSubRun callback. -void util::MetadataSBN::postEndSubRun(art::SubRun const& sr) -{ - std::lock_guard lock(fMutex); - - art::Handle< sumdata::POTSummary > potListHandle; - double fTotPOT = 0; - if(sr.getByLabel(fPOTModuleLabel,potListHandle)){ - fTotPOT+=potListHandle->totpot; - } - - md.fTotPOT += fTotPOT; -} - - -//-------------------------------------------------------------------- -std::string Escape(const std::string& s) -{ - // If it's formatted as a dict or list, trust it's already formatted - if(s.size() >= 2 && ((s[0] == '{' && s.back() == '}') || (s[0] == '[' && s.back() == ']'))) return s; - - // otherwise quote it - return "\""+s+"\""; -} - -//-------------------------------------------------------------------- -std::string util::MetadataSBN::GetParentsString() const -{ - if(md.fParents.empty()) return ""; - - unsigned int c = 0; - - std::string ret = "[\n"; - for(auto parent: md.fParents) { - std::cout<<"Parent " << c << ": " << parent << std::endl; - c++; - size_t n = parent.find_last_of('/'); - size_t f1 = (n == std::string::npos ? 0 : n+1); - ret += " {\n \"file_name\": \"" + parent.substr(f1) + "\"\n }"; - if(md.fParents.size() == 1 || c == md.fParents.size()) ret += "\n"; - else ret += ",\n"; - } - - ret += " ]"; - return ret; -} - -//-------------------------------------------------------------------- -std::string util::MetadataSBN::GetRunsString() const -{ - unsigned int c = 0; - - std::string ret = "[\n"; - for(auto&t :md.fruns){ - c++; - ret += " [\n " + std::to_string(std::get<0>(t)) + ",\n " + std::to_string(std::get<1>(t)) + ",\n \"" + std::get<2>(t) + "\"\n ]"; - if(md.fruns.size() == 1 || c == md.fruns.size()) ret += "\n"; - else ret += ",\n"; - } - ret += " ]"; - return ret; -} - -//-------------------------------------------------------------------- -void util::MetadataSBN::GetMetadataMaps(std::map& strs, - std::map& ints, - std::map& doubles, - std::map& objs) -{ - strs.clear(); ints.clear(); doubles.clear(); objs.clear(); - - objs["application"] = "{\"family\": \""+std::get<0>(md.fapplication)+"\", \"name\": \""+std::get<1>(md.fapplication)+"\", \"version\": \""+std::get<2>(md.fapplication)+"\"}"; - - if(!md.fParents.empty()) objs["parents"] = GetParentsString(); - if(!md.fruns.empty()) objs["runs"] = GetRunsString(); - - // convert start and end times into time format: Year-Month-DayTHours:Minutes:Seconds - char endbuf[80], startbuf[80]; - struct tm tstruct; - tstruct = *localtime(&md.fend_time); - strftime(endbuf,sizeof(endbuf),"%Y-%m-%dT%H:%M:%S",&tstruct); - tstruct = *localtime(&md.fstart_time); - strftime(startbuf,sizeof(startbuf),"%Y-%m-%dT%H:%M:%S",&tstruct); - - strs["start_time"] = startbuf; - strs["end_time"] = endbuf; - - strs["data_tier"] = md.fdata_tier; - ints["event_count"] = md.fevent_count; - strs["file_format"] = md.ffile_format; - ints["first_event"] = md.ffirst_event; - ints["last_event"] = md.flast_event; - - const std::string proj = fExperiment+"_project"; - MaybeCopyToMap(md.fFCLName, "fcl.name", strs); - MaybeCopyToMap(md.fProjectName, proj+".name", strs); - MaybeCopyToMap(md.fProjectStage, proj+".stage", strs); - MaybeCopyToMap(md.fProjectVersion, proj+".version", strs); - MaybeCopyToMap(md.fProjectSoftware, proj+".software", strs); - MaybeCopyToMap(md.fProductionName, "production.name", strs); - MaybeCopyToMap(md.fProductionType, "production.type", strs); - - MaybeCopyToMap(md.fgroup, "group", strs); - MaybeCopyToMap(md.ffile_type, "file_type", strs); - - if(md.merge >= 0) { - ints["merge.merge"] = (md.merge==0 ? 0 : 1); - ints["merge.merged"] = 0; - } - doubles["mc.pot"] = md.fTotPOT; -} - -//-------------------------------------------------------------------- -// PostCloseFile callback. -void util::MetadataSBN::postCloseInputFile() -{ - //update end time - md.fend_time = time(0); - - // Loop over files. - - for(unsigned int i=0; i i) - md.merge = fMerge[i]; - else - md.merge = -1; - - - std::map strs; - std::map ints; - std::map doubles; - std::map objs; - GetMetadataMaps(strs, ints, doubles, objs); - - // open a json file and write everything from the struct md complying to the - // samweb json format. This json file holds the below information temporarily. - // If you submitted a grid job invoking this service, the information from - // this file is appended to a final json file and this file will be removed - - if(!fJSONFileName[i].empty()){ - std::ofstream jsonfile; - jsonfile.open(fJSONFileName[i]); - jsonfile << "{\n"; - - bool once = true; - for(auto& it: objs){ - if(!once) jsonfile << ",\n"; - once = false; - jsonfile << " \"" << it.first << "\": " << it.second; - } - for(auto& it: strs){ - // Have to escape string outputs - jsonfile << ",\n \"" << it.first << "\": \"" << it.second << "\""; - } - for(auto& it: ints){ - jsonfile << ",\n \"" << it.first << "\": " << it.second; - } - for(auto& it: doubles){ - jsonfile << ",\n \"" << it.first << "\": " << it.second; - } - - jsonfile<<"\n}\n"; - jsonfile.close(); - } - } - - fFileStats.recordFileClose(); - //TODO figure out how to make the name identical to the TFile - //std::string new_name = fRenamer.maybeRenameFile("myjson.json",fJSONFileName); -} +#include "sbncode/Metadata/MetadataSBN.h" DEFINE_ART_SERVICE(util::MetadataSBN) diff --git a/sbncode/NuMuSelection/CMakeLists.txt b/sbncode/NuMuSelection/CMakeLists.txt index c188909b9..485fa77a0 100644 --- a/sbncode/NuMuSelection/CMakeLists.txt +++ b/sbncode/NuMuSelection/CMakeLists.txt @@ -1,5 +1,5 @@ cet_build_plugin( MuPVertexStudy art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -25,7 +25,7 @@ cet_build_plugin( MuPVertexStudy art::module larreco::RecoAlg ) cet_build_plugin( MuonS2NStudy art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -51,7 +51,7 @@ cet_build_plugin( MuonS2NStudy art::module larreco::RecoAlg ) cet_build_plugin( NuMuEfficiencyStudy art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service diff --git a/sbncode/OpDet/CMakeLists.txt b/sbncode/OpDet/CMakeLists.txt index 8eb4378a4..4949e7afe 100644 --- a/sbncode/OpDet/CMakeLists.txt +++ b/sbncode/OpDet/CMakeLists.txt @@ -1,6 +1,6 @@ cet_enable_asserts() -cet_build_plugin(PDMapAlgSimple art::tool LIBRARIES +cet_build_plugin(PDMapAlgSimple art::tool LIBRARIES PRIVATE art::Utilities ) diff --git a/sbncode/OpDet/PDMapAlgSimple.cc b/sbncode/OpDet/PDMapAlgSimple.cc new file mode 100644 index 000000000..4801bac70 --- /dev/null +++ b/sbncode/OpDet/PDMapAlgSimple.cc @@ -0,0 +1,39 @@ +/////////////////////////////////////////////////////////////////////// +/// +/// \file PDMapAlg.h +/// +/// \brief This is the interface class for a tool to handle PD mapping +/// in SBN detectors, used for flash matching. +/// +/// \author Laura Paulucci, Franciole Marinho, Iker de Icaza, and W. Ketchum +/// +//////////////////////////////////////////////////////////////////////// + +#include "PDMapAlg.h" +#include "art/Utilities/ToolMacros.h" +#include "art/Utilities/make_tool.h" + +#include + +namespace opdet { + + //a default dummy one + class PDMapAlgSimple : PDMapAlg + { + public: + explicit PDMapAlgSimple(const fhicl::ParameterSet& pset) + { fType = pset.get("Type","pmt"); } + + ~PDMapAlgSimple(){} + + std::string pdType(size_t ch) const override { return fType; } + + private: + std::string fType; + + }; + + + DEFINE_ART_CLASS_TOOL(PDMapAlgSimple) +} // namespace + diff --git a/sbncode/PID/CMakeLists.txt b/sbncode/PID/CMakeLists.txt index 1d5da7ad7..b63ec1cf4 100644 --- a/sbncode/PID/CMakeLists.txt +++ b/sbncode/PID/CMakeLists.txt @@ -1,6 +1,6 @@ cet_build_plugin( Dazzle art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -27,7 +27,7 @@ cet_build_plugin( Dazzle art::module ) cet_build_plugin( Razzle art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -54,7 +54,7 @@ cet_build_plugin( Razzle art::module ) cet_build_plugin( Razzled art::module - LIBRARIES + LIBRARIES PRIVATE ROOT::TMVA canvas::canvas art_root_io::TFileService_service diff --git a/sbncode/SBNEventWeight/App/CMakeLists.txt b/sbncode/SBNEventWeight/App/CMakeLists.txt index 335a19557..6bb912864 100644 --- a/sbncode/SBNEventWeight/App/CMakeLists.txt +++ b/sbncode/SBNEventWeight/App/CMakeLists.txt @@ -1,5 +1,5 @@ cet_build_plugin(SBNEventWeight art::module - LIBRARIES + LIBRARIES PRIVATE sbnobj::Common_SBNEventWeight sbncode_SBNEventWeight_Base sbncode_SBNEventWeight_Calculators_CrossSection @@ -9,7 +9,7 @@ cet_build_plugin(SBNEventWeight art::module ROOT::Geom) cet_build_plugin(SystToolsEventWeight art::module - LIBRARIES + LIBRARIES PRIVATE sbnobj::Common_SBNEventWeight sbncode_SBNEventWeight_Base systematicstools::interface systematicstools::interpreters diff --git a/sbncode/SinglePhotonAnalysis/CMakeLists.txt b/sbncode/SinglePhotonAnalysis/CMakeLists.txt index 35f24c2bb..1d2a7af6a 100644 --- a/sbncode/SinglePhotonAnalysis/CMakeLists.txt +++ b/sbncode/SinglePhotonAnalysis/CMakeLists.txt @@ -23,21 +23,21 @@ art_make_library( BASENAME_ONLY ROOT::Core ) -cet_build_plugin(NCDeltaRadiative art::module BASENAME_ONLY LIBRARIES +cet_build_plugin(NCDeltaRadiative art::module BASENAME_ONLY LIBRARIES PRIVATE sbncode_SinglePhotonAnalysis_Libraries sbncode_SinglePhotonAnalysis_SEAview art_root_io::TFileService_service ROOT::Tree ) -cet_build_plugin(NCRadiativeResonant art::module BASENAME_ONLY LIBRARIES +cet_build_plugin(NCRadiativeResonant art::module BASENAME_ONLY LIBRARIES PRIVATE sbncode_SinglePhotonAnalysis_Libraries sbncode_SinglePhotonAnalysis_SEAview art_root_io::TFileService_service ROOT::Tree ) -cet_build_plugin(SinglePhoton art::module BASENAME_ONLY LIBRARIES +cet_build_plugin(SinglePhoton art::module BASENAME_ONLY LIBRARIES PRIVATE sbncode_SinglePhotonAnalysis_Libraries sbncode_SinglePhotonAnalysis_SEAview art_root_io::TFileService_service diff --git a/sbncode/TPCReco/CMakeLists.txt b/sbncode/TPCReco/CMakeLists.txt index 9ff783574..c5f85eba3 100644 --- a/sbncode/TPCReco/CMakeLists.txt +++ b/sbncode/TPCReco/CMakeLists.txt @@ -8,7 +8,7 @@ endif() cet_build_plugin(NuVertexChargeTree art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -38,7 +38,7 @@ cet_build_plugin(NuVertexChargeTree art::module cet_build_plugin( EventSelect art::module - LIBRARIES + LIBRARIES PRIVATE ifdh_art::IFDH_service art::Framework_Core art::Framework_Principal diff --git a/sbncode/TPCReco/CalorimetryAnalysis/CMakeLists.txt b/sbncode/TPCReco/CalorimetryAnalysis/CMakeLists.txt index 608bbee0a..b9ad49157 100644 --- a/sbncode/TPCReco/CalorimetryAnalysis/CMakeLists.txt +++ b/sbncode/TPCReco/CalorimetryAnalysis/CMakeLists.txt @@ -1,5 +1,5 @@ cet_build_plugin( CalorimetryAnalysis art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service diff --git a/sbncode/TPCReco/TrackHit/CMakeLists.txt b/sbncode/TPCReco/TrackHit/CMakeLists.txt index 339a71168..cc8661ab3 100644 --- a/sbncode/TPCReco/TrackHit/CMakeLists.txt +++ b/sbncode/TPCReco/TrackHit/CMakeLists.txt @@ -1,5 +1,5 @@ cet_build_plugin(TrackAreaHit art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -20,7 +20,7 @@ cet_build_plugin(TrackAreaHit art::module ) cet_build_plugin(TrackHitFilter art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Core art::Framework_Services_Registry @@ -40,7 +40,7 @@ cet_build_plugin(TrackHitFilter art::module ) cet_build_plugin(TrackHitDumper art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Core art::Framework_Services_Registry diff --git a/sbncode/TPCReco/TrackSplit/CMakeLists.txt b/sbncode/TPCReco/TrackSplit/CMakeLists.txt index a359034d4..a2f2decb0 100644 --- a/sbncode/TPCReco/TrackSplit/CMakeLists.txt +++ b/sbncode/TPCReco/TrackSplit/CMakeLists.txt @@ -1,5 +1,5 @@ cet_build_plugin(TrackSplitter art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -18,7 +18,7 @@ cet_build_plugin(TrackSplitter art::module ) cet_build_plugin(MergedTrackIdentifier art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service diff --git a/sbncode/TPCReco/VertexStub/CMakeLists.txt b/sbncode/TPCReco/VertexStub/CMakeLists.txt index 19377e502..58b8e6f55 100644 --- a/sbncode/TPCReco/VertexStub/CMakeLists.txt +++ b/sbncode/TPCReco/VertexStub/CMakeLists.txt @@ -18,7 +18,7 @@ cet_make_library( larevt::SpaceCharge ) cet_build_plugin(VertexChargeVacuum art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Principal art::Framework_Services_Registry @@ -38,7 +38,7 @@ cet_build_plugin(VertexChargeVacuum art::module ) cet_build_plugin(VertexStubTracker art::module - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -60,7 +60,7 @@ cet_build_plugin(VertexStubTracker art::module ) cet_build_plugin(PlaneStubMerge art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service @@ -82,7 +82,7 @@ cet_build_plugin(PlaneStubMerge art::tool ) cet_build_plugin(TwoPlaneStubMerge art::tool - LIBRARIES + LIBRARIES PRIVATE art::Framework_Core art::Framework_Services_Registry art_root_io::TFileService_service