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
T getUntrackedParameter(std::string const &, T const &) const
~AutoMagneticFieldESProducer() override
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
std::vector< std::string > maps
const DepRecordT getRecord() const
void get(HolderT &iHolder) 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
virtual MagneticField * clone() const