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
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
const DepRecordT & getRecord() const
std::vector< std::string > maps
void get(HolderT &iHolder) const
std::unique_ptr< MagneticField > produce(const IdealMagneticFieldRecord &)
~AutoMagneticFieldESProducer()
std::vector< int > nominalCurrents
std::string closerModel(float current)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
T const * product() const
virtual MagneticField * clone() const