107 uint32_t nchannels = 0;
112 <<
"... creating dummy SiPixelGainCalibration Data for Run " <<
run <<
"\n " << std::endl;
123 edm::LogInfo(
"SiPixelCondObjBuilder") <<
" There are " << pDD->dets().size() <<
" detectors" << std::endl;
125 for (TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++) {
126 if (dynamic_cast<PixelGeomDetUnit const*>((*it)) !=
nullptr) {
127 uint32_t detid = ((*it)->geographicalId()).
rawId();
137 int nrows = topol.
nrows();
143 std::vector<char> theSiPixelGainCalibration;
147 for (
int j = 0;
j < nrows;
j++) {
150 float ped = 0.0,
gain = 0.0;
154 int chipIndex = 0, colROC = 0, rowROC = 0;
156 pIndexConverter.transformToROC(
i,
j, chipIndex, colROC, rowROC);
159 std::map<int, CalParameters, std::less<int> >::const_iterator it =
calmap_.find(chanROC);
160 CalParameters theCalParameters = (*it).second;
161 ped = theCalParameters.p0;
162 gain = theCalParameters.p1;
167 while (minped > ped || maxped < ped)
174 while (mingain >
gain || maxgain <
gain)
187 else if (
gain < mingain)
192 else if (ped < minped)
211 <<
"[SiPixelCondObjBuilder::analyze] detid already exists" << std::endl;
214 edm::LogPrint(
"SiPixelCondObjBuilder") <<
" ---> PIXEL Modules " << nmodules << std::endl;
215 edm::LogPrint(
"SiPixelCondObjBuilder") <<
" ---> PIXEL Channels " << nchannels << std::endl;
234 edm::LogPrint(
"SiPixelCondObjBuilder") <<
"Didn't get DB" << std::endl;
264 edm::LogPrint(
"SiPixelCondObjBuilder") <<
"Database exception! " << er.
what() << std::endl;
267 edm::LogPrint(
"SiPixelCondObjBuilder") <<
"Standard exception! " << er.what() << std::endl;
268 edm::LogError(
"SiPixelCondObjBuilder") <<
"caught std::exception " << er.what() << std::endl;
270 edm::LogError(
"SiPixelCondObjBuilder") <<
"Funny error" << std::endl;
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > pddToken_
Base exception class for the object to relational access.
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
std::unique_ptr< SiPixelGainCalibration > SiPixelGainCalibration_
virtual int ncolumns() const =0
cond::Time_t beginOfTime() const
virtual int nrows() const =0
Log< level::Error, false > LogError
std::map< int, CalParameters, std::less< int > > calmap_
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t currentTime() const
const double secondRocRowGainOffset_
static int pixelToChannelROC(const int rowROC, const int colROC)
const std::string recordName_
const double secondRocRowPedOffset_
Log< level::Warning, true > LogPrint
Log< level::Info, false > LogInfo
std::pair< ContainerIterator, ContainerIterator > Range
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
const int numberOfModules_
char const * what() const noexcept override