67 for (
const auto& it : pDD->
detUnits()) {
68 if (dynamic_cast<PixelGeomDetUnit const*>(it) !=
nullptr) {
69 const DetId detid = it->geographicalId();
70 const unsigned int rawDetId = detid.
rawId();
78 <<
" detId=" << rawDetId <<
", layer=" << layer <<
", ladder=" <<
ladder;
80 if (it->getParameter<
int>(
"layer") == layer && it->getParameter<
int>(
"ladder") == ladder) {
81 float slope = (float)it->getParameter<
double>(
"slope");
82 float offset = (float)it->getParameter<
double>(
"offset");
94 int side = tTopo->
pxfSide(detid);
96 int disk2 = tTopo->
pxfDisk(detid);
100 <<
"Found contradicting FPIX disk number: " << disk <<
" vs." << disk2 << std::endl;
103 <<
" detId=" << rawDetId <<
", side=" << side <<
", disk=" << disk
104 <<
", ring=" <<
ring;
106 if (it->getParameter<
int>(
"side") == side && it->getParameter<
int>(
"disk") == disk &&
107 it->getParameter<
int>(
"ring") ==
ring) {
108 float slope = (float)it->getParameter<
double>(
"slope");
109 float offset = (float)it->getParameter<
double>(
"offset");
119 edm::LogError(
"SiPixelVCalDB::analyze") <<
"detid is Pixel but neither bpix nor fpix" << std::endl;
136 edm::LogError(
"SiPixelVCalDB") <<
"caught std::exception " << er.what() << std::endl;
138 edm::LogError(
"SiPixelVCalDB") <<
"Funny error" << std::endl;
141 edm::LogError(
"SiPixelVCalDB") <<
"Service is unavailable" << std::endl;
T getUntrackedParameter(std::string const &, T const &) const
Base exception class for the object to relational access.
#define DEFINE_FWK_MODULE(type)
unsigned int pxfDisk(const DetId &id) const
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
static const double slope[3]
unsigned int pxbLadder(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
Parameters FPixParameters_
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Log< level::Error, false > LogError
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
constexpr std::array< uint8_t, layerIndexSize > layer
bool getData(T &iHolder) const
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t beginOfTime() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
char const * what() const noexceptoverride
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tkTopoToken_
Log< level::Warning, true > LogPrint
unsigned int pxbLayer(const DetId &id) const
Parameters BPixParameters_
std::vector< edm::ParameterSet > Parameters
void analyze(const edm::Event &, const edm::EventSetup &) override
cond::Time_t currentTime() const
unsigned int pxfSide(const DetId &id) const
int diskName() const
disk id
int ringName() const
ring Id
~SiPixelVCalDB() override
void putSlopeAndOffset(std::map< unsigned int, VCal > &vcal)