CMS 3D CMS Logo

InterpolatorBuilder.h
Go to the documentation of this file.
1 #ifndef MagneticField_GeomBuilder_InterpolatorBuilder_h
2 #define MagneticField_GeomBuilder_InterpolatorBuilder_h
3 // -*- C++ -*-
4 //
5 // Package: MagneticField/GeomBuilder
6 // Class : InterpolatorBuilder
7 //
16 //
17 // Original Author: Christopher Jones
18 // Created: Tue, 17 May 2022 20:50:20 GMT
19 //
20 
21 // system include files
22 #include <string>
23 #include <optional>
24 #include <unordered_map>
25 
26 // user include files
29 #include "DD4hep_volumeHandle.h"
30 
31 // forward declarations
32 
33 namespace magneticfield {
35  public:
36  InterpolatorBuilder(std::string iTableSet, bool useMergeFileIfAvailable = true);
37 
38  InterpolatorBuilder(const InterpolatorBuilder&) = delete; // stop default
39  const InterpolatorBuilder& operator=(const InterpolatorBuilder&) = delete; // stop default
40 
41  // ---------- const member functions ---------------------
42 
43  // ---------- static member functions --------------------
44 
45  // ---------- member functions ---------------------------
46  std::unique_ptr<MagProviderInterpol> build(volumeHandle const*);
47 
48  private:
49  // ---------- member data --------------------------------
51  std::unordered_map<std::string, unsigned int> offsets_;
52  std::optional<interpolation::binary_ifstream> stream_;
53  };
54 } // namespace magneticfield
55 #endif
std::unique_ptr< MagProviderInterpol > build(volumeHandle const *)
std::optional< interpolation::binary_ifstream > stream_
InterpolatorBuilder(std::string iTableSet, bool useMergeFileIfAvailable=true)
std::unordered_map< std::string, unsigned int > offsets_
const InterpolatorBuilder & operator=(const InterpolatorBuilder &)=delete