4 #include "ubcore/Geometry/UBooNEGeometryHelper.h" 
    8 #include "icaruscode/Geometry/ChannelMapIcarusAlg.h" 
   10 #include "ubcore/Geometry/ChannelMapUBooNEAlg.h" 
   22 #include "fhiclcpp/ParameterSet.h" 
   23 #include "cetlib/filepath_maker.h" 
   24 #include "fhiclcpp/make_ParameterSet.h" 
   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: " 
  194   static std::vector<Experiment> ex = {
 
process_name standard_reco_uboone fcl
 
void PrepParticleList(const Evt &evt) const 
A function to load the ParticleList and cache it This function will find the particle list and load i...
 
std::unique_ptr< cheat::PhotonBackTracker > fPhotonBackTrackerProvider
 
void PrepSimChannels(const Evt &evt)
 
Utilities for one-line geometry initialization. 
 
Service provider with utility LAr functions. 
 
BEGIN_PROLOG could also be cerr
 
Helper functions for support of LArPropertiesService in LArSoft tests. 
 
std::unique_ptr< detinfo::DetectorClocksStandard > fDetectorClocksProvider
 
fhicl::ParameterSet * config
 
std::unique_ptr< geo::GeometryCore > fGeometryProvider
 
std::unique_ptr< cheat::ParticleInventory > fParticleInventoryProvider
 
cheat::BackTracker * GetBackTrackerProvider() const 
 
cheat::ParticleInventory * GetParticleInventoryProvider() const 
 
std::unique_ptr< geo::AuxDetGeometryCore > fAuxDetGeometryProvider
 
Access the description of auxiliary detector geometry. 
 
void PrepTrackIdToMCTruthIndex(const Evt &evt) const 
A function to prepare and cache a map of TrackIds and MCTruth object indicies from fMCTruthList...
 
Helper functions for support of DetectorClocksService in LArSoft tests. 
 
Access the description of detector geometry. 
 
void PrepMCTruthList(const Evt &evt) const 
A function to load and cache the MCTruthList of the event. 
 
Collection of functions for quick setup of basic facilities. 
 
void PrepOpDetBTRs(Evt const &evt)
 
ProviderManager(Experiment det, std::string fcl="", bool setup_event_services=true)
 
back track the reconstruction to the simulation 
 
Helpers for support of DetectorPropertiesService in LArSoft tests. 
 
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. 
 
static std::vector< Experiment > GetValidExperiments()
 
Header for the ParticleInvenotry Service Provider. 
 
cheat::PhotonBackTracker * GetPhotonBackTrackerProvider() const 
 
void SetupServices(gallery::Event &ev)
 
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
 
Channel mapping for SBND.