33 const char* fhicl_file_path = getenv(
"FHICL_FILE_PATH");
34 assert(fhicl_file_path);
35 cet::filepath_lookup_nonabsolute policy(fhicl_file_path);
37 fhicl::ParameterSet cfg;
42 fcl = (
fcl ==
"" ?
"gallery_services_sbnd.fcl" :
fcl);
45 lar::standalone::SetupGeometry<geo::ChannelMapSBNDAlg>(
46 cfg.get<fhicl::ParameterSet>(
"services.Geometry"));
50 fcl = (
fcl ==
"" ?
"gallery_services_uboone.fcl" :
fcl);
52 fhicl::ParameterSet pset = \
53 cfg.get<fhicl::ParameterSet>(
"services.Geometry");
56 std::unique_ptr<geo::ChannelMapAlg> channelMap = \
57 std::make_unique<geo::ChannelMapUBooNEAlg>(
58 cfg.get<fhicl::ParameterSet>(
"services.ExptGeoHelperInterface"), pset);
64 fcl = (
fcl ==
"" ?
"gallery_services_icarus.fcl" :
fcl);
67 lar::standalone::SetupGeometry<geo::ChannelMapIcarusAlg>(
68 cfg.get<fhicl::ParameterSet>(
"services.Geometry"));
72 std::cerr <<
"ProviderManager: Unknown detector ID" << std::endl;
76 config =
new fhicl::ParameterSet(cfg);
79 fAuxDetGeometryProvider = std::make_unique<geo::AuxDetGeometryCore>(cfg.get<fhicl::ParameterSet>(
"services.AuxDetGeometry"));
82 std::string relPath =
config->get<std::string>(
"services.AuxDetGeometry.RelativePath",
"" );
83 const std::string
GDMLFileName =
config->get<std::string>(
"services.AuxDetGeometry.GDML" );
85 cet::search_path sp(
"FW_SEARCH_PATH");
88 std::string GDMLFilePath;
89 if( !sp.find_file(GDMLFilePathHint, GDMLFilePath) ) {
90 throw cet::exception(
"StaticLoadGeometry")
91 <<
"Can't find geometry file '" << GDMLFilePathHint << std::endl;
95 std::string ROOTFilePath;
96 if( !sp.find_file(ROOTFilePathHint, ROOTFilePath) ) {
97 throw cet::exception(
"StaticLoadGeometry")
98 <<
"Can't find geometry file '" << ROOTFilePathHint
99 <<
"' (for geometry)!\n";
105 testing::setupProvider<detinfo::LArPropertiesStandard>(
106 cfg.get<fhicl::ParameterSet>(
"services.LArPropertiesService"));
110 testing::setupProvider<detinfo::DetectorClocksStandard>(
111 cfg.get<fhicl::ParameterSet>(
"services.DetectorClocksService"));
115 testing::setupProvider<detinfo::DetectorPropertiesStandard>(
116 cfg.get<fhicl::ParameterSet>(
"services.DetectorPropertiesService"),
126 if (!setup_event_services) {
131 if (cfg.has_key(
"services.ParticleInventoryService")) {
133 cfg.get<fhicl::ParameterSet>(
"services.ParticleInventoryService"));
136 std::cerr <<
"Warning: Particle inventory service is missing from fhicl config (" <<
fcl <<
")." \
137 <<
" Setting ParticleInventoryService to NULL" << std::endl;
141 if (cfg.has_key(
"services.BackTrackerService")) {
143 testing::setupProvider<cheat::BackTracker>(
144 cfg.get<fhicl::ParameterSet>(
"services.BackTrackerService"),
149 std::cerr <<
"Warning: BackTracker service is missing from fhicl config (" <<
fcl <<
")." \
150 <<
" Setting BackTrackerService to NULL" << std::endl;
154 if (cfg.has_key(
"services.PhotonBackTrackerService")) {
156 testing::setupProvider<cheat::PhotonBackTracker>(
157 cfg.get<fhicl::ParameterSet>(
"services.PhotonBackTrackerService"),
161 std::cerr <<
"Warning: PhotonBackTracker service is missing from fhicl config (" <<
fcl <<
")." \
162 <<
" Setting PhotonBackTrackerService to NULL" << std::endl;
165 std::cout <<
"ProviderManager: Loaded configuration for: "
process_name standard_reco_uboone fcl
std::unique_ptr< cheat::PhotonBackTracker > fPhotonBackTrackerProvider
BEGIN_PROLOG could also be cerr
std::unique_ptr< detinfo::DetectorClocksStandard > fDetectorClocksProvider
fhicl::ParameterSet * config
std::unique_ptr< geo::GeometryCore > fGeometryProvider
std::unique_ptr< cheat::ParticleInventory > fParticleInventoryProvider
std::unique_ptr< geo::AuxDetGeometryCore > fAuxDetGeometryProvider
std::unique_ptr< cheat::BackTracker > fBackTrackerProvider
std::unique_ptr< detinfo::LArPropertiesStandard > fLArPropertiesProvider
std::unique_ptr< geo::GeometryCore > SetupGeometryWithChannelMapping(fhicl::ParameterSet const &pset, std::unique_ptr< geo::ChannelMapAlg > channelMap)
Initializes a LArSoft geometry object.
Container for a list of pointers to providers.
fhicl::ParameterSet ParseConfiguration(std::string configPath, cet::filepath_maker &lookupPolicy)
Parses a FHiCL configuration file.
std::unique_ptr< detinfo::DetectorPropertiesStandard > fDetectorPropertiesProvider
BEGIN_PROLOG could also be cout