93 if (in_file.is_open()) {
94 edm::LogInfo(
"GenError Info") <<
"Opened GenError File: " <<
file.fullPath().c_str();
97 char title_char[80],
c;
103 for (iter = 0; (c = in_file.get()) !=
'\n'; ++iter) {
105 title_char[iter] =
c;
111 title_char[iter + 1] =
'\n';
113 for (j = 0; j < 80; j += 4) {
114 temp.
c[0] = title_char[
j];
115 temp.
c[1] = title_char[j + 1];
116 temp.
c[2] = title_char[j + 2];
117 temp.
c[3] = title_char[j + 3];
123 for (k = 0; k < 80; k++) {
124 if ((title_char[k] ==
'@') && (title_char[k - 1] ==
'T')) {
125 double localMagField = (((int)title_char[k - 4]) - 48) * 10 + ((
int)title_char[k - 2]) - 48;
128 <<
"\n -------- WARNING -------- \n Magnetic field in the cfg is " <<
theMagField <<
"T while it is "
129 << title_char[k - 4] << title_char[k - 2] << title_char[k - 1]
130 <<
" in the header \n ------------------------- \n " << std::endl;
136 in_file >> tempstore;
137 while (!in_file.eof()) {
140 in_file >> tempstore;
146 edm::LogError(
"SiPixelGenErrorDBObjectUploader") <<
"Error opening File " <<
file.fullPath().c_str();
164 edm::LogPrint(
"SiPixelGenErrorDBObjectUploader") <<
"Phase-" << phase <<
" geometry is used" << std::endl;
167 for (
const auto& it : pDD->detUnits()) {
170 DetId detid = it->geographicalId();
171 unsigned int layer = 0,
ladder = 0, disk = 0, side = 0, blade = 0, panel = 0,
module = 0;
174 short thisID = 10000;
198 unsigned int first_delim_pos = loc_string.find(
'_');
199 unsigned int second_delim_pos = loc_string.find(
'_', first_delim_pos + 1);
201 unsigned int checklayer = (
unsigned int)stoi(loc_string.substr(0, first_delim_pos));
202 unsigned int checkladder =
203 (
unsigned int)stoi(loc_string.substr(first_delim_pos + 1, second_delim_pos - first_delim_pos - 1));
204 unsigned int checkmodule = (
unsigned int)stoi(loc_string.substr(second_delim_pos + 1, 5));
206 if (
ladder == checkladder && layer == checklayer &&
module == checkmodule)
213 <<
" Could not fill barrel layer " << layer <<
", module " <<
module <<
"\n";
215 <<
"This is a barrel element with: layer " << layer <<
", ladder " <<
ladder <<
" and module " <<
module;
239 unsigned int first_delim_pos = loc_string.find(
'_');
240 unsigned int second_delim_pos = loc_string.find(
'_', first_delim_pos + 1);
241 unsigned int third_delim_pos = loc_string.find(
'_', second_delim_pos + 1);
243 unsigned int checkdisk = (
unsigned int)stoi(loc_string.substr(0, first_delim_pos));
244 unsigned int checkblade =
245 (
unsigned int)stoi(loc_string.substr(first_delim_pos + 1, second_delim_pos - first_delim_pos - 1));
246 unsigned int checkside =
247 (
unsigned int)stoi(loc_string.substr(second_delim_pos + 1, third_delim_pos - second_delim_pos - 1));
248 unsigned int checkpanel = (
unsigned int)stoi(loc_string.substr(third_delim_pos + 1, 5));
250 if (disk == checkdisk && blade == checkblade && side == checkside && panel == checkpanel)
257 <<
" Could not fill endcap det unit" << side <<
", disk " << disk <<
", blade " << blade <<
", panel "
259 edm::LogPrint(
"SiPixelGenErrorDBObjectUploader") <<
"This is an endcap element with: side " << side <<
", disk "
260 << disk <<
", blade " << blade <<
", panel " << panel;
269 <<
"The DetID: " << detid.
rawId() <<
" is mapped to the template: " << mapnum <<
"\n";
276 throw cms::Exception(
"NotAvailable") <<
"PoolDBOutputService not available";
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
vstring theEndcapLocations
const edm::EventSetup & c
void setNumOfTempl(int numOfTempl)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyToken_
unsigned int pxfDisk(const DetId &id) const
unsigned int pxbLadder(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
unsigned int pxbModule(const DetId &id) const
std::vector< uint32_t > theEndcapGenErrIds
short getGenErrorID(const uint32_t &detid) const
Log< level::Error, false > LogError
bool putGenErrorID(const uint32_t &detid, short &value)
constexpr std::array< uint8_t, layerIndexSize > layer
vstring theGenErrorCalibrations
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
bool getData(T &iHolder) const
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) ...
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
vstring theBarrelLocations
Log< level::Warning, true > LogPrint
unsigned int pxbLayer(const DetId &id) const
void push_back(float entry)
Log< level::Info, false > LogInfo
void setVersion(float version)
cond::Time_t currentTime() const
unsigned int pxfSide(const DetId &id) const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
std::vector< uint32_t > theBarrelGenErrIds
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const
void setMaxIndex(int maxIndex)