|
|
Go to the documentation of this file.
24 #include <unordered_map>
68 : m_record(iConfig.getParameter<
std::
string>(
"record")),
69 m_tag(iConfig.getParameter<
std::
string>(
"tag")),
70 m_value(iConfig.getParameter<double>(
"value")) {}
74 <<
"SiPhase2OuterTrackerLorentzAngleWriter::~SiPhase2OuterTrackerLorentzAngleWriter" << std::endl;
86 <<
"SiPhase2OuterTrackerLorentzAngleWriter::analyze " << std::endl;
91 edm::LogWarning(
"SiPhase2OuterTrackerLorentzAngleWriter") <<
"Service is unavailable" << std::endl;
96 unsigned int irun =
iEvent.id().run();
97 edm::LogVerbatim(
"SiPhase2OuterTrackerLorentzAngleWriter") <<
"Writing on tag : " <<
tag << std::endl;
98 edm::LogVerbatim(
"SiPhase2OuterTrackerLorentzAngleWriter") <<
"Usinng as IOV run : " << irun << std::endl;
101 std::unordered_map<unsigned int, float> detsLAtoDB;
112 <<
" There are " << pDD->
detUnits().size() <<
" modules in this geometry." << std::endl;
114 for (
auto const& det_u : pDD->
detUnits()) {
115 const DetId detid = det_u->geographicalId();
116 uint32_t rawId = detid.
rawId();
121 LogDebug(
"SiPhase2OuterTrackerLorentzAngleWriter") << rawId <<
" is a " << subid <<
" det" << std::endl;
123 LogDebug(
"SiPhase2OuterTrackerLorentzAngleWriter")
124 <<
"subdetector ID:" << subid <<
" layer:" << tTopo->
layer(detid) << std::endl;
131 <<
" There are " << detsLAtoDB.size() <<
" OT Lorentz Angle values assigned" << std::endl;
135 auto lorentzAngle = std::make_unique<SiPhase2OuterTrackerLorentzAngle>();
136 lorentzAngle->putLorentzAngles(detsLAtoDB);
137 edm::LogInfo(
"SiPhase2OuterTrackerLorentzAngleWriter") <<
"currentTime " << mydbservice->
currentTime() << std::endl;
150 desc.add<
std::string>(
"record",
"SiPhase2OuterTrackerLorentzAngleRcd");
152 desc.add<
double>(
"value", 0.07);
T const * product() const
SiPhase2OuterTrackerLorentzAngleWriter(const edm::ParameterSet &)
std::string tag(const std::string &recordName)
constexpr Detector det() const
get the detector field from this detid
unsigned int layer(const DetId &id) const
Log< level::Info, false > LogInfo
Log< level::Warning, false > LogWarning
#define DEFINE_FWK_MODULE(type)
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
~SiPhase2OuterTrackerLorentzAngleWriter() override
constexpr uint32_t rawId() const
get the raw id
Log< level::Info, true > LogVerbatim
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static constexpr auto TOB
void analyze(const edm::Event &, const edm::EventSetup &) override
void addDefault(ParameterSetDescription const &psetDescription)
cond::Time_t currentTime() const
static constexpr auto TID