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;
unsigned int pxbLayer(const DetId &id) const
Base exception class for the object to relational access.
int ringName() const
ring Id
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
static const double slope[3]
cond::Time_t beginOfTime() const
Parameters FPixParameters_
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
unsigned int pxbLadder(const DetId &id) const
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
T getUntrackedParameter(std::string const &, T const &) const
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t currentTime() const
int diskName() const
disk id
unsigned int pxfDisk(const DetId &id) const
#define DEFINE_FWK_MODULE(type)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tkTopoToken_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getData(T &iHolder) const
Log< level::Warning, true > LogPrint
unsigned int pxfSide(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
Parameters BPixParameters_
std::vector< edm::ParameterSet > Parameters
void analyze(const edm::Event &, const edm::EventSetup &) override
char const * what() const noexcept override
~SiPixelVCalDB() override
void putSlopeAndOffset(std::map< unsigned int, VCal > &vcal)