29 int detid(0),
roc(0),
hits(0), nroc(0);
32 while (std::getline(INS, sline)) {
33 if (std::string::npos != sline.find(
"# SiPixelDetectorStatus START")) {
40 if (std::string::npos != sline.find(
"# SiPixelDetectorStatus END")) {
45 if (sline.find(
"# SiPixelDetectorStatus for LS") != std::string::npos) {
46 std::sscanf(sline.c_str(),
"# SiPixelDetectorStatus for LS %d .. %d", &
fLS0, &
fLS1);
49 if (sline.find(
"# SiPixelDetectorStatus for run") != std::string::npos) {
50 std::sscanf(sline.c_str(),
"# SiPixelDetectorStatus for run %d .. %d", &
fRun0, &
fRun1);
53 if (sline.find(
"# SiPixelDetectorStatus total hits = ") != std::string::npos) {
54 std::sscanf(sline.c_str(),
"# SiPixelDetectorStatus total hits = %ld", &
fDetHits);
58 std::sscanf(sline.c_str(),
"%d %d %d", &detid, &
roc, &
hits);
61 if (detid != oldDetId) {
86 OD <<
"# SiPixelDetectorStatus START" << std::endl;
87 OD <<
"# SiPixelDetectorStatus for LS " <<
fLS0 <<
" .. " <<
fLS1 << std::endl;
88 OD <<
"# SiPixelDetectorStatus for run " <<
fRun0 <<
" .. " <<
fRun1 << std::endl;
89 OD <<
"# SiPixelDetectorStatus total hits = " <<
fDetHits << std::endl;
94 for (
int iroc = 0; iroc < it->second.nrocs(); ++iroc) {
95 for (
int idc = 0; idc < 26; ++idc) {
96 OD << Form(
"%10d %2d %3d", it->first, iroc,
int(it->second.getRoc(iroc)->digiOccROC())) << std::endl;
100 OD <<
"# SiPixelDetectorStatus END" << std::endl;
107 fModules.insert(std::make_pair(detid,
a));
128 std::map<int, std::vector<int>> badRocLists_;
133 int detid = itMod->first;
135 std::vector<int>
list;
137 for (
int iroc = 0; iroc < modStatus.
nrocs(); ++iroc) {
139 if (
roc->isFEDerror25()) {
140 list.push_back(iroc);
142 badRocLists_[detid] =
list;
180 unsigned long int ave(0);
185 unsigned long int inc = it->second.digiOccMOD();
187 nrocs += it->second.nrocs();
189 return (1.0 * ave) /
nrocs;
200 unsigned long int inc = it->second.digiOccMOD();
201 sig += (fDetAverage - inc) * (fDetAverage - inc);
202 nrocs += it->second.nrocs();
205 double fDetSigma = sig / (
nrocs - 1);
206 return TMath::Sqrt(fDetSigma);
212 for (std::map<int, SiPixelModuleStatus>::iterator it = newData.
begin(); it != newData.
end(); ++it) {
213 int detid = it->first;