19 <<
" Constructing object...";
23 <<
" Set FED zero suppression high/low threshold to " <<
highThreshold_ <<
"/"
41 <<
" Destructing object...";
51 <<
" NULL pointer to SiStripConfigDb interface!"
52 <<
" Aborting upload...";
61 <<
" Uploading pedestals/noise to DB...";
64 <<
" Completed database upload of " <<
feds.size() <<
" FED descriptions!";
67 <<
" TEST! No pedestals/noise values will be uploaded to DB...";
76 SiStripConfigDb::FedDescriptionsV::const_iterator ifed;
77 for (ifed =
feds.begin(); ifed !=
feds.end(); ifed++) {
94 if (!iter->second->isValid()) {
101 <<
" NULL pointer to analysis object!";
106 uint32_t pedshift = 127;
108 uint32_t pedmin = (uint32_t)
anal->pedsMin()[iapv];
109 pedshift = pedmin < pedshift ? pedmin : pedshift;
110 std::stringstream
ss;
111 ss <<
"iapv: " << iapv <<
" pedsMin()[iapv]: " <<
anal->pedsMin()[iapv] <<
" pedmin: " << pedmin
112 <<
" pedshift: " << pedshift;
118 for (uint16_t istr = 0; istr <
anal->peds()[iapv].size(); istr++) {
120 Fed9U::Fed9UAddress
addr(ichan, iapv, istr);
121 Fed9U::Fed9UStripDescription
temp = (*ifed)->getFedStrips().getStrip(
addr);
123 if (
anal->peds()[iapv][istr] < 1.) {
125 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
126 <<
" Skipping ZERO pedestal value (ie, NO UPLOAD TO DB!) for FedKey/Id/Ch: " << hex << setw(8)
127 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/" << ichan
128 <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
129 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/"
130 << fec_key.channel();
135 bool disableStrip =
false;
137 disableStrip =
temp.getDisable();
140 if (
find(dead.begin(), dead.end(), istr) != dead.end())
143 if (
find(noisy.begin(), noisy.end(), istr) != noisy.end())
147 Fed9U::Fed9UStripDescription
data(static_cast<uint32_t>(
anal->peds()[iapv][istr] - pedshift),
150 anal->noise()[iapv][istr],
153 std::stringstream
ss;
155 ss <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
156 <<
" Disabling strip in Fed9UStripDescription object..." << std::endl
157 <<
" for FED id/channel and APV/strip : " << fed_key.
fedId() <<
"/" << fed_key.
fedChannel() <<
" "
158 << iapv <<
"/" << istr << std::endl
159 <<
" and crate/FEC/ring/CCU/module : " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
160 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() << std::endl
161 <<
" from ped/noise/high/low/disable : " << static_cast<uint16_t>(
temp.getPedestal()) <<
"/"
162 << static_cast<uint16_t>(
temp.getHighThreshold()) <<
"/"
163 << static_cast<uint16_t>(
temp.getLowThreshold()) <<
"/" << static_cast<uint16_t>(
temp.getNoise())
164 <<
"/" << static_cast<uint16_t>(
temp.getDisable()) << std::endl;
166 (*ifed)->getFedStrips().setStrip(
addr,
data);
168 ss <<
" to ped/noise/high/low/disable : " << static_cast<uint16_t>(
data.getPedestal()) <<
"/"
169 << static_cast<uint16_t>(
data.getHighThreshold()) <<
"/"
170 << static_cast<uint16_t>(
data.getLowThreshold()) <<
"/" << static_cast<uint16_t>(
data.getNoise())
171 <<
"/" << static_cast<uint16_t>(
data.getDisable()) << std::endl;
182 <<
" Unable to find pedestals/noise for FedKey/Id/Ch: " << hex << setw(8)
183 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/"
184 << ichan <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate()
185 <<
"/" << fec_key.fecSlot() <<
"/" << fec_key.fecRing() <<
"/"
186 << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/" << fec_key.channel();
193 <<
" Updated FED pedestals/noise for " << updated <<
" channels";
207 for (uint16_t iapv = 0; iapv < 2; ++iapv) {
209 PedestalsAnalysisDescription*
tmp;
210 tmp =
new PedestalsAnalysisDescription(
anal->dead()[iapv],
212 anal->pedsMean()[iapv],
213 anal->pedsSpread()[iapv],
214 anal->noiseMean()[iapv],
215 anal->noiseSpread()[iapv],
216 anal->rawMean()[iapv],
217 anal->rawSpread()[iapv],
218 anal->pedsMax()[iapv],
219 anal->pedsMin()[iapv],
220 anal->noiseMax()[iapv],
221 anal->noiseMin()[iapv],
222 anal->rawMax()[iapv],
223 anal->rawMin()[iapv],
240 typedef std::vector<std::string>
Strings;
242 Strings::const_iterator istr =
errors.begin();
243 Strings::const_iterator jstr =
errors.end();
244 for (; istr != jstr; ++istr) {
245 tmp->addComments(*istr);