27 using namespace magneticfield;
36 throw cms::Exception(
"InvalidParameter") <<
"Invalid values for parameters \"nominalCurrents\" and \"maps\"";
46 std::unique_ptr<MagneticField>
56 current = rInfo->m_avg_current;
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)
T const * product() const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
tuple AutoMagneticFieldESProducer