|
|
Go to the documentation of this file.
24 #include <unordered_map>
72 m_record(iConfig.getParameter<
std::
string>(
"record")),
73 m_tag(iConfig.getParameter<
std::
string>(
"tag")),
74 m_value(iConfig.getParameter<double>(
"value")) {}
78 <<
"SiPhase2OuterTrackerLorentzAngleWriter::~SiPhase2OuterTrackerLorentzAngleWriter" << std::endl;
90 <<
"SiPhase2OuterTrackerLorentzAngleWriter::analyze " << std::endl;
95 edm::LogWarning(
"SiPhase2OuterTrackerLorentzAngleWriter") <<
"Service is unavailable" << std::endl;
100 unsigned int irun =
iEvent.id().run();
101 edm::LogVerbatim(
"SiPhase2OuterTrackerLorentzAngleWriter") <<
"Writing on tag : " <<
tag << std::endl;
102 edm::LogVerbatim(
"SiPhase2OuterTrackerLorentzAngleWriter") <<
"Usinng as IOV run : " << irun << std::endl;
105 std::unordered_map<unsigned int, float> detsLAtoDB;
113 <<
" There are " << pDD->
detUnits().size() <<
" modules in this geometry." << std::endl;
115 for (
auto const& det_u : pDD->
detUnits()) {
116 const DetId detid = det_u->geographicalId();
117 uint32_t rawId = detid.
rawId();
122 LogDebug(
"SiPhase2OuterTrackerLorentzAngleWriter") << rawId <<
" is a " << subid <<
" det" << std::endl;
124 LogDebug(
"SiPhase2OuterTrackerLorentzAngleWriter")
125 <<
"subdetector ID:" << subid <<
" layer:" << tTopo->
layer(detid) << std::endl;
132 <<
" There are " << detsLAtoDB.size() <<
" OT Lorentz Angle values assigned" << std::endl;
136 auto lorentzAngle = std::make_unique<SiPhase2OuterTrackerLorentzAngle>();
137 lorentzAngle->putLorentzAngles(detsLAtoDB);
138 edm::LogInfo(
"SiPhase2OuterTrackerLorentzAngleWriter") <<
"currentTime " << mydbservice->
currentTime() << std::endl;
151 desc.add<
std::string>(
"record",
"SiPhase2OuterTrackerLorentzAngleRcd");
153 desc.add<
double>(
"value", 0.07);
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
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
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
bool getData(T &iHolder) const
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
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
void addDefault(ParameterSetDescription const &psetDescription)
cond::Time_t currentTime() const
static constexpr auto TID