36 throw cms::Exception(
"InvalidParameter") <<
"Invalid values for parameters \"nominalCurrents\" and \"maps\"";
46 std::unique_ptr<MagneticField>
57 message =
" (from RunInfo DB)";
59 message =
" (from valueOverride card)";
64 edm::LogInfo(
"MagneticField|AutoMagneticField") <<
"Current: " << current << message <<
"; using map with label: " << model;
69 iRecord.
get(model,map);
73 return std::unique_ptr<MagneticField>(
result);
79 for(;i<(
int)
maps.size()-1;i++) {
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
T getUntrackedParameter(std::string const &, T const &) const
~AutoMagneticFieldESProducer() override
std::vector< std::string > maps
const DepRecordT getRecord() const
std::unique_ptr< MagneticField > produce(const IdealMagneticFieldRecord &)
std::vector< int > nominalCurrents
std::string closerModel(float current)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
T const * product() const
bool get(HolderT &iHolder) const
virtual MagneticField * clone() const