9 #include "Geometry/AuxDetGeometry.h" 10 #include "Geometry/AuxDetExptGeoHelperInterface.h" 15 #include "cetlib_except/exception.h" 32 , fRelPath (pset.
get<
std::
string >(
"RelativePath",
"" ))
33 , fForceUseFCLOnly (pset.
get<
bool >(
"ForceUseFCLOnly" , false))
34 , fSortingParameters(pset.
get<
fhicl::ParameterSet>(
"SortingParameters",
fhicl::ParameterSet() ))
68 <<
"cannot find sumdata::RunData object to grab detector name\n" 69 <<
"this is expected if generating MC files\n" 70 <<
"using default geometry from configuration file\n";
75 std::string newDetectorName = rdcol.front()->DetName();
76 if (
GetProvider().DetectorName() == newDetectorName)
return;
92 throw cet::exception(
"ChannelMapLoadFail") <<
" failed to load new channel map";
104 ROOTFileName.append(gdmlfile);
105 GDMLFileName.append(gdmlfile);
114 if( !sp.
find_file(GDMLFileName, GDMLfile) ) {
116 <<
"cannot find the gdml geometry file:" 117 <<
"\n" << GDMLFileName
118 <<
"\nbail ungracefully.\n";
122 if( !sp.
find_file(ROOTFileName, ROOTfile) ) {
124 <<
"cannot find the root geometry file:\n" 125 <<
"\n" << ROOTFileName
126 <<
"\nbail ungracefully.\n";
void InitializeChannelMap()
AuxDetGeometry(fhicl::ParameterSet const &pset, art::ActivityRegistry ®)
fhicl::ParameterSet fSortingParameters
Parameter set to define the channel map sorting.
std::vector< Handle< PROD > > getMany(SelectorBase const &selector=MatchAllSelector{}) const
T get(std::string const &key) const
AuxDetGeometryCore const & GetProvider() const
Returns a constant reference to the service provider.
AuxDetGeometryCore const * GetProviderPtr() const
Returns a constant pointer to the service provider.
General GArSoft Utilities.
#define DEFINE_ART_SERVICE(svc)
GlobalSignal< detail::SignalResponseType::FIFO, void(Run const &)> sPreBeginRun
void preBeginRun(art::Run const &run)
Updates the geometry if needed at the beginning of each new run.
void LoadGeometryFile(std::string gdmlfile, std::string rootfile)
Loads the geometry information from the specified files.
std::string find_file(std::string const &filename) const
bool hasAuxDetChannelMap() const
Returns whether we have a channel map.
auto const & get(AssnsNode< L, R, D > const &r)
#define MF_LOG_WARNING(category)
The geometry of one entire detector, as served by art.
LArSoft geometry interface.
cet::coded_exception< error, detail::translate > exception
void LoadNewGeometry(std::string gdmlfile, std::string rootfile)
Expands the provided paths and loads the geometry description(s)