22 <<
" Constructing object...";
28 <<
" Set FED zero suppression high/low threshold to " <<
highThreshold_ <<
"/"
53 <<
" Destructing object...";
63 <<
" NULL pointer to SiStripConfigDb interface!"
64 <<
" Aborting upload...";
74 <<
" Uploading pedestals/noise to DB...";
79 <<
" Completed database upload of " <<
feds.size() <<
" FED descriptions!";
82 <<
" TEST! No pedestals/noise values will be uploaded to DB...";
91 SiStripConfigDb::FedDescriptionsV::const_iterator ifed;
93 for (ifed =
feds.begin(); ifed !=
feds.end(); ifed++) {
116 <<
" NULL pointer to analysis object!";
121 uint32_t pedshift = 127;
123 uint32_t pedmin = (uint32_t)
anal->pedsMin()[iapv];
124 pedshift = pedmin < pedshift ? pedmin : pedshift;
129 for (uint16_t istr = 0; istr <
anal->peds()[iapv].size(); istr++) {
133 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
134 <<
" Skipping ZERO pedestal value (ie, NO UPLOAD TO DB!) for FedKey/Id/Ch: " << hex << setw(8)
135 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/" << ichan
136 <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
137 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/"
138 << fec_key.channel();
143 Fed9U::Fed9UAddress
addr(ichan, iapv, istr);
144 Fed9U::Fed9UStripDescription
temp = (*ifed)->getFedStrips().getStrip(
addr);
147 bool disableStrip =
false;
148 std::stringstream ss_disable;
150 if (
temp.getDisable()) {
151 ss_disable <<
"Already Disabled: " <<
conn.fecCrate() <<
" " <<
conn.fecSlot() <<
" " <<
conn.fecRing()
152 <<
" " <<
conn.ccuAddr() <<
" " <<
conn.ccuChan() <<
" " <<
conn.lldChannel() <<
" " << iapv
153 <<
" " << istr << std::endl;
163 find(dead.begin(), dead.end(), istr) != dead.end()) {
165 ss_disable <<
"Disabling Dead Strip: " <<
conn.fecCrate() <<
" " <<
conn.fecSlot() <<
" "
166 <<
conn.fecRing() <<
" " <<
conn.ccuAddr() <<
" " <<
conn.ccuChan() <<
" "
167 <<
conn.lldChannel() <<
" " << iapv <<
" " << istr << std::endl;
171 anal->badStrip()[iapv];
172 if (not disableStrip) {
173 if (
find(badcChan.begin(), badcChan.end(), istr) != badcChan.end()) {
175 ss_disable <<
"Disabling Bad strip: " <<
conn.fecCrate() <<
" " <<
conn.fecSlot() <<
" "
176 <<
conn.fecRing() <<
" " <<
conn.ccuAddr() <<
" " <<
conn.ccuChan() <<
" "
177 <<
conn.lldChannel() <<
" " << iapv <<
" " << istr << std::endl;
185 uint32_t pedestalVal = 0;
192 pedestalVal = static_cast<uint32_t>(
temp.getPedestal());
193 noiseVal = static_cast<float>(
temp.getNoise());
194 lowThr = static_cast<float>(
temp.getLowThresholdFactor());
195 highThr = static_cast<float>(
temp.getHighThresholdFactor());
197 pedestalVal = static_cast<uint32_t>(
anal->peds()[iapv][istr] - pedshift);
198 noiseVal =
anal->noise()[iapv][istr];
204 Fed9U::Fed9UStripDescription
data(pedestalVal, highThr, lowThr, noiseVal, disableStrip);
206 std::stringstream
ss;
208 ss <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
209 <<
" Disabling strip in Fed9UStripDescription object..." << std::endl
210 <<
" for FED id/channel and APV/strip : " << fed_key.
fedId() <<
"/" << fed_key.
fedChannel() <<
" "
211 << iapv <<
"/" << istr << std::endl
212 <<
" and crate/FEC/ring/CCU/module : " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
213 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() << std::endl
214 <<
" from ped/noise/high/low/disable : " << static_cast<uint32_t>(
temp.getPedestal()) <<
"/"
215 << static_cast<float>(
temp.getHighThresholdFactor()) <<
"/"
216 << static_cast<float>(
temp.getLowThresholdFactor()) <<
"/" << static_cast<float>(
temp.getNoise())
217 <<
"/" << static_cast<uint16_t>(
temp.getDisable()) << std::endl;
220 (*ifed)->getFedStrips().setStrip(
addr,
data);
223 ss <<
" to ped/noise/high/low/disable : " << static_cast<uint32_t>(
data.getPedestal()) <<
"/"
224 << static_cast<float>(
data.getHighThresholdFactor()) <<
"/"
225 << static_cast<float>(
data.getLowThresholdFactor()) <<
"/" << static_cast<float>(
data.getNoise())
226 <<
"/" << static_cast<uint16_t>(
data.getDisable()) << std::endl;
235 <<
" Unable to find pedestals/noise for FedKey/Id/Ch: " << hex << setw(8)
236 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/"
237 << ichan <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate()
238 <<
"/" << fec_key.fecSlot() <<
"/" << fec_key.fecRing() <<
"/"
239 << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/" << fec_key.channel();
246 <<
" Updated FED pedestals/noise for " << updated <<
" channels";
261 for (uint16_t iapv = 0; iapv < 2; ++iapv) {
263 PedestalsAnalysisDescription* pedestalDescription;
264 pedestalDescription =
265 new PedestalsAnalysisDescription(
anal->deadStripBit()[iapv],
266 anal->badStripBit()[iapv],
267 anal->pedsMean()[iapv],
268 anal->pedsSpread()[iapv],
269 anal->noiseMean()[iapv],
270 anal->noiseSpread()[iapv],
271 anal->rawMean()[iapv],
272 anal->rawSpread()[iapv],
273 anal->pedsMax()[iapv],
274 anal->pedsMin()[iapv],
275 anal->noiseMax()[iapv],
276 anal->noiseMin()[iapv],
277 anal->rawMax()[iapv],
278 anal->rawMin()[iapv],
295 typedef std::vector<std::string>
Strings;
297 Strings::const_iterator istr =
errors.begin();
298 Strings::const_iterator jstr =
errors.end();
299 for (; istr != jstr; ++istr) {
300 pedestalDescription->addComments(*istr);
304 desc.push_back(pedestalDescription);
308 PedsFullNoiseAnalysisDescription* pedsFullNoiseDescription;
309 pedsFullNoiseDescription =
new PedsFullNoiseAnalysisDescription(
310 anal->deadStrip()[iapv],
311 anal->badStrip()[iapv],
312 anal->shiftedStrip()[iapv],
313 anal->lowNoiseStrip()[iapv],
314 anal->largeNoiseStrip()[iapv],
315 anal->largeNoiseSignificance()[iapv],
316 anal->badFitStatus()[iapv],
317 anal->badADProbab()[iapv],
318 anal->badKSProbab()[iapv],
319 anal->badJBProbab()[iapv],
320 anal->badChi2Probab()[iapv],
321 anal->badTailStrip()[iapv],
322 anal->badDoublePeakStrip()[iapv],
324 anal->adProbab()[iapv],
325 anal->ksProbab()[iapv],
326 anal->jbProbab()[iapv],
327 anal->chi2Probab()[iapv],
329 anal->residualRMS()[iapv],
330 anal->residualSigmaGaus()[iapv],
331 anal->noiseSignificance()[iapv],
332 anal->residualSkewness()[iapv],
333 anal->residualKurtosis()[iapv],
334 anal->residualIntegralNsigma()[iapv],
335 anal->residualIntegral()[iapv],
353 for (; istr != jstr; ++istr) {
354 pedsFullNoiseDescription->addComments(*istr);
358 desc.push_back(pedsFullNoiseDescription);