22 <<
" Constructing object...";
26 <<
" Set FED zero suppression high/low threshold to " <<
highThreshold_ <<
"/"
44 <<
" Destructing object...";
54 <<
" NULL pointer to SiStripConfigDb interface!"
55 <<
" Aborting upload...";
64 <<
" Uploading pedestals/noise to DB...";
67 <<
" Completed database upload of " <<
feds.size() <<
" FED descriptions!";
70 <<
" TEST! No pedestals/noise values will be uploaded to DB...";
79 SiStripConfigDb::FedDescriptionsV::const_iterator ifed;
80 for (ifed =
feds.begin(); ifed !=
feds.end(); ifed++) {
97 if (!iter->second->isValid()) {
104 <<
" NULL pointer to analysis object!";
109 uint32_t pedshift = 127;
111 uint32_t pedmin = (uint32_t)
anal->pedsMin()[iapv];
112 pedshift = pedmin < pedshift ? pedmin : pedshift;
113 std::stringstream
ss;
114 ss <<
"iapv: " << iapv <<
" pedsMin()[iapv]: " <<
anal->pedsMin()[iapv] <<
" pedmin: " << pedmin
115 <<
" pedshift: " << pedshift;
121 for (uint16_t istr = 0; istr <
anal->peds()[iapv].size(); istr++) {
123 Fed9U::Fed9UAddress
addr(ichan, iapv, istr);
124 Fed9U::Fed9UStripDescription
temp = (*ifed)->getFedStrips().getStrip(
addr);
126 if (
anal->peds()[iapv][istr] < 1.) {
128 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
129 <<
" Skipping ZERO pedestal value (ie, NO UPLOAD TO DB!) for FedKey/Id/Ch: " << hex << setw(8)
130 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/" << ichan
131 <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
132 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/"
133 << fec_key.channel();
138 bool disableStrip =
false;
140 disableStrip =
temp.getDisable();
143 if (
find(dead.begin(), dead.end(), istr) != dead.end())
146 if (
find(noisy.begin(), noisy.end(), istr) != noisy.end())
150 Fed9U::Fed9UStripDescription
data(static_cast<uint32_t>(
anal->peds()[iapv][istr] - pedshift),
153 anal->noise()[iapv][istr],
156 std::stringstream
ss;
158 ss <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
159 <<
" Disabling strip in Fed9UStripDescription object..." << std::endl
160 <<
" for FED id/channel and APV/strip : " << fed_key.
fedId() <<
"/" << fed_key.
fedChannel() <<
" "
161 << iapv <<
"/" << istr << std::endl
162 <<
" and crate/FEC/ring/CCU/module : " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
163 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() << std::endl
164 <<
" from ped/noise/high/low/disable : " << static_cast<uint16_t>(
temp.getPedestal()) <<
"/"
165 << static_cast<uint16_t>(
temp.getHighThreshold()) <<
"/"
166 << static_cast<uint16_t>(
temp.getLowThreshold()) <<
"/" << static_cast<uint16_t>(
temp.getNoise())
167 <<
"/" << static_cast<uint16_t>(
temp.getDisable()) << std::endl;
169 (*ifed)->getFedStrips().setStrip(
addr,
data);
171 ss <<
" to ped/noise/high/low/disable : " << static_cast<uint16_t>(
data.getPedestal()) <<
"/"
172 << static_cast<uint16_t>(
data.getHighThreshold()) <<
"/"
173 << static_cast<uint16_t>(
data.getLowThreshold()) <<
"/" << static_cast<uint16_t>(
data.getNoise())
174 <<
"/" << static_cast<uint16_t>(
data.getDisable()) << std::endl;
185 <<
" Unable to find pedestals/noise for FedKey/Id/Ch: " << hex << setw(8)
186 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/"
187 << ichan <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate()
188 <<
"/" << fec_key.fecSlot() <<
"/" << fec_key.fecRing() <<
"/"
189 << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/" << fec_key.channel();
196 <<
" Updated FED pedestals/noise for " << updated <<
" channels";
210 for (uint16_t iapv = 0; iapv < 2; ++iapv) {
212 PedestalsAnalysisDescription*
tmp;
213 tmp =
new PedestalsAnalysisDescription(
anal->dead()[iapv],
215 anal->pedsMean()[iapv],
216 anal->pedsSpread()[iapv],
217 anal->noiseMean()[iapv],
218 anal->noiseSpread()[iapv],
219 anal->rawMean()[iapv],
220 anal->rawSpread()[iapv],
221 anal->pedsMax()[iapv],
222 anal->pedsMin()[iapv],
223 anal->noiseMax()[iapv],
224 anal->noiseMin()[iapv],
225 anal->rawMax()[iapv],
226 anal->rawMin()[iapv],
243 typedef std::vector<std::string>
Strings;
245 Strings::const_iterator istr =
errors.begin();
246 Strings::const_iterator jstr =
errors.end();
247 for (; istr != jstr; ++istr) {
248 tmp->addComments(*istr);