41 : tableSet_(
std::
move(iTableSet)) {
42 if (not useMergeFileIfAvailable)
45 if (not indexFileName.empty()) {
47 if (not binaryFileName.empty()) {
48 std::ifstream indexFile(indexFileName);
52 indexFile >> magFile >>
offset;
65 return std::make_unique<magneticfield::FakeInterpolator>();
77 double masterSectorPhi = (vol->
masterSector - 1) * 1._pi / 6.;
100 throw cms::Exception(
"MissingMagFileEntry") << vol->
magFile <<
" was not an entry in the index file";
104 throw cms::Exception(
"SeekMagFileEntry") <<
" failed seekg within merged binary file";
ROOT::Math::Plane3D::Vector Vector
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::unique_ptr< MagProviderInterpol > build(volumeHandle const *)
std::optional< interpolation::binary_ifstream > stream_
int masterSector
The sector for which an interpolator for this class of volumes should be built.
static MFGrid * build(const std::string &name, const GloballyPositioned< float > &vol)
Build interpolator for a binary grid file.
Point3DBase< T, GlobalTag > PositionType
InterpolatorBuilder(std::string iTableSet, bool useMergeFileIfAvailable=true)
const PositionType & position() const
std::unordered_map< std::string, unsigned int > offsets_
static std::string findFile(std::string const &)
const RotationType & rotation() const
const GloballyPositioned< float > * placement() const
Position and rotation.
std::string magFile
Name of magnetic field table file.