13 #include "Geometry/ExptGeoHelperInterface.h" 16 #include "cetlib_except/exception.h" 33 , fRelPath (pset.
get<
std::
string >(
"RelativePath",
"" ))
34 , fNonFatalConfCheck(pset.
get<
bool >(
"SkipConfigurationCheck", false))
35 , fSortingParameters(pset.
get<
fhicl::ParameterSet>(
"SortingParameters",
fhicl::ParameterSet() ))
36 , fSegParameters(pset.
get<
fhicl::ParameterSet>(
"SegmentationAlgPars",
fhicl::ParameterSet() ))
69 <<
" is incompatible with the one configured in the job.";
74 <<
"Geometry used for run " << run.
id()
75 <<
" is incompatible with the one configured in the job!" 76 <<
"\n=== job configuration " <<
std::string(50,
'=')
78 <<
"\n=== run configuration " <<
std::string(50,
'=')
79 <<
"\n" << inputGeomInfo
80 <<
"\n======================" <<
std::string(50,
'=')
95 <<
" failed to load new channel map";
106 <<
" failed to load the ECAL segmentation";
118 <<
" failed to load the Minerva segmentation";
130 <<
" failed to load the MuID segmentation";
145 ROOTFileName.append(gdmlfile);
146 GDMLFileName.append(gdmlfile);
159 if( !sp.
find_file(GDMLFileName, GDMLfile) ) {
161 <<
"cannot find the gdml geometry file:" 162 <<
"\n" << GDMLFileName
163 <<
"\nbail ungracefully.\n";
166 if( !sp.
find_file(ROOTFileName, ROOTfile) ) {
168 <<
"cannot find the root geometry file:\n" 169 <<
"\n" << ROOTFileName
170 <<
"\nbail ungracefully.\n";
174 GDMLfile = GDMLFileName;
175 ROOTfile = GDMLFileName;
215 MF_LOG_DEBUG(
"Geometry") <<
"New geometry information:\n" 230 "Can't read geometry configuration information.\n" 231 "Is `GeometryGArConfigurationWriter` service configured?\n",
249 MF_LOG_WARNING(
"Geometry") <<
"Geometry::CompareConfigurationInfo(): " 250 "invalid version for configuration A:\n" <<
A;
254 MF_LOG_WARNING(
"Geometry") <<
"Geometry::CompareConfigurationInfo(): " 255 "invalid version for configuration B:\n" <<
B;
fhicl::ParameterSet fSortingParameters
Parameter set to define the channel map sorting.
bool CheckConfigurationInfo(gar::sumdata::GeometryConfigurationInfo const &other) const
GeometryGAr(fhicl::ParameterSet const &pset,::art::ActivityRegistry ®)
fhicl::ParameterSet fMuIDSegParameters
Parameters for the MuID Segmentation.
void FinalizeGeometryParameters()
DataVersion_t dataVersion
Version of the data in this object (0 is invalid version).
void LoadNewGeometry(std::string const &gdmlfile, std::string const &rootfile, bool bForceReload=false)
Expands the provided paths and loads the geometry description(s)
fhicl::ParameterSet fMinervaSegParameters
Parameters for the Tracker Sc Segmentation.
Description of geometry of one entire detector.
void LoadGeometryFile(std::string const &gdmlfile, std::string const &rootfile, bool bForceReload=false)
Loads the geometry information from the specified files.
gar::geo::seg::ChannelMapAlg const * ChannelMap() const
Returns the object handling the channel map.
Description of the current configuration of detector geometry.
std::string geometryServiceConfiguration
geo::Geometry service configuration, as FHiCL table.
fhicl::ParameterSet fECALSegParameters
Parameters for the ECAL Segmentation.
unsigned int DataVersion_t
Type used for the version of data.
T get(std::string const &key) const
std::string to_indented_string() const
void preBeginRun(::art::Run const &run)
Updates the geometry if needed at the beginning of each new run.
void PrintGeometry() const
static gar::sumdata::GeometryConfigurationInfo const & ReadConfigurationInfo(art::Run const &run)
gar::geo::seg::SegmentationAlg const * ECALSegmentationAlg() const
Returns the object handling the ECAL segmentation.
gar::geo::seg::SegmentationAlg const * MinervaSegmentationAlg() const
Returns the object handling the Sc Tracker segmentation.
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
General GArSoft Utilities.
#define DEFINE_ART_SERVICE(svc)
GlobalSignal< detail::SignalResponseType::FIFO, void(Run const &)> sPreBeginRun
gar::sumdata::GeometryConfigurationInfo fConfInfo
fhicl::ParameterSet fSegParameters
Parameter set to define the segmentation algorithms.
void GetGeometryParameters()
The geometry of one entire detector, as served by art.
static bool CompareConfigurationInfo(gar::sumdata::GeometryConfigurationInfo const &A, gar::sumdata::GeometryConfigurationInfo const &B)
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
std::string find_file(std::string const &filename) const
bool isDataValid() const noexcept
Protocol: whether the data content is valid.
void FillGeometryConfigurationInfo(fhicl::ParameterSet const &config)
auto const & get(AssnsNode< L, R, D > const &r)
#define MF_LOG_WARNING(category)
PROD const & getProduct(InputTag const &tag) const
LArSoft geometry interface.
art framework interface to geometry description
gar::geo::seg::SegmentationAlg const * MuIDSegmentationAlg() const
Returns the object handling the MuID segmentation.
void InitializeSegmentations()
cet::coded_exception< error, detail::translate > exception