43 auto cc = setWhatProduced(
this);
44 magfieldToken_ = cc.consumes();
55 float theMagField =
magfield.inTesla(center).mag();
57 if (theMagField >= 4.1 || theMagField < -0.1)
58 edm::LogWarning(
"UnexpectedMagneticFieldUsingDefaultPixel2DTemplate") <<
"Magnetic field is " << theMagField;
60 const auto& dbobject = iRecord.
get(dbToken_);
62 if ((theMagField > 0.1) && (std::fabs(theMagField - dbobject.sVector()[22]) > 0.1))
65 <<
"Magnetic field is " << theMagField <<
" Template Magnetic field is " << dbobject.sVector()[22];
~SiPixel2DTemplateDBObjectESProducer() override
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
edm::ESGetToken< SiPixel2DTemplateDBObject, SiPixel2DTemplateDBObjectRcd > dbToken_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
SiPixel2DTemplateDBObjectESProducer(const edm::ParameterSet &iConfig)
std::shared_ptr< const SiPixel2DTemplateDBObject > produce(const SiPixel2DTemplateDBObjectESProducerRcd &)
Log< level::Warning, false > LogWarning