21 <<
" Constructing object...";
25 <<
" Set FED zero suppression high/low threshold to " <<
highThreshold_ <<
"/"
50 <<
" Destructing object...";
59 <<
" NULL pointer to SiStripConfigDb interface!"
60 <<
" Aborting upload...";
70 <<
" Uploading FED information to DB...";
73 <<
" Completed database upload of " <<
feds.size() <<
" FED descriptions!";
76 <<
" No FED values will be uploaded to DB...";
86 uint16_t updated_peds = 0;
87 uint16_t updated_ticks = 0;
88 SiStripConfigDb::FedDescriptionsV::const_iterator ifed;
89 for (ifed =
feds.begin(); ifed !=
feds.end(); ifed++) {
91 if (
find(ids.begin(), ids.end(), (*ifed)->getFedId()) == ids.end()) {
115 if (!iter->second->isValid()) {
117 <<
" Skipping invalid channel with coordinates: FedKey/Id/Ch: " << hex
118 << setw(8) << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId()
119 <<
"/" << ichan <<
" and device with FEC/slot/ring/CCU/LLD "
120 << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/" << fec_key.fecRing()
121 <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/"
122 << fec_key.channel();
129 <<
" NULL pointer to analysis object!";
136 uint32_t pedshift = 127;
138 uint32_t pedmin = (uint32_t)
anal->pedsMin()[iapv];
139 pedshift = pedmin < pedshift ? pedmin : pedshift;
140 std::stringstream
ss;
141 ss <<
"iapv: " << iapv <<
" pedsMin()[iapv]: " <<
anal->pedsMin()[iapv] <<
" pedmin: " << pedmin
142 <<
" pedshift: " << pedshift;
148 for (uint16_t istr = 0; istr <
anal->peds()[iapv].size(); istr++) {
150 if (
anal->peds()[iapv][istr] < 1.) {
152 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]"
153 <<
" Skipping ZERO pedestal value (ie, NO UPLOAD TO DB!) for FedKey/Id/Ch: " << hex << setw(8)
154 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/" << ichan
155 <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot()
156 <<
"/" << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/"
157 << fec_key.channel();
162 Fed9U::Fed9UAddress
addr(ichan, iapv, istr);
163 Fed9U::Fed9UStripDescription
temp = (*ifed)->getFedStrips().getStrip(
addr);
166 bool disableStrip =
false;
168 disableStrip =
temp.getDisable();
171 if (
find(dead.begin(), dead.end(), istr) != dead.end())
174 if (
find(noisy.begin(), noisy.end(), istr) != noisy.end())
178 Fed9U::Fed9UStripDescription
data(static_cast<uint32_t>(
anal->peds()[iapv][istr] - pedshift),
181 anal->noise()[iapv][istr],
184 std::stringstream
ss;
186 ss <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]"
187 <<
" Disabling strip in Fed9UStripDescription object..." << std::endl
188 <<
" for FED id/channel and APV/strip : " << fed_key.
fedId() <<
"/" << fed_key.
fedChannel() <<
" "
189 << iapv <<
"/" << istr << std::endl
190 <<
" and crate/FEC/ring/CCU/module : " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
191 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() << std::endl
192 <<
" from ped/noise/high/low/disable : " << static_cast<uint16_t>(
temp.getPedestal()) <<
"/"
193 << static_cast<uint16_t>(
temp.getHighThreshold()) <<
"/"
194 << static_cast<uint16_t>(
temp.getLowThreshold()) <<
"/" << static_cast<uint16_t>(
temp.getNoise())
195 <<
"/" << static_cast<uint16_t>(
temp.getDisable()) << std::endl;
199 (*ifed)->getFedStrips().setStrip(
addr,
data);
202 ss <<
" to ped/noise/high/low/disable : " << static_cast<uint16_t>(
data.getPedestal()) <<
"/"
203 << static_cast<uint16_t>(
data.getHighThreshold()) <<
"/"
204 << static_cast<uint16_t>(
data.getLowThreshold()) <<
"/" << static_cast<uint16_t>(
data.getNoise())
205 <<
"/" << static_cast<uint16_t>(
data.getDisable()) << std::endl;
216 Fed9U::Fed9UAddress
addr(ichan);
217 uint16_t old_threshold = static_cast<uint16_t>((*ifed)->getFrameThreshold(
addr));
218 if (
anal->isValid()) {
219 (*ifed)->setFrameThreshold(
addr,
anal->frameFindingThreshold());
222 uint16_t new_threshold = static_cast<uint16_t>((*ifed)->getFrameThreshold(
addr));
224 std::stringstream
ss;
225 ss <<
"LLD channel : old frame threshold " << old_threshold <<
" new frame threshold " << new_threshold
231 ss <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]";
232 if (
anal->isValid()) {
233 ss <<
" Updating the frame-finding threshold"
234 <<
" from " << old_threshold <<
" to " << new_threshold <<
" using tick mark base/peak/height "
235 <<
anal->base() <<
"/" <<
anal->peak() <<
"/" <<
anal->height();
237 ss <<
" Cannot update the frame-finding threshold"
238 <<
" from " << old_threshold <<
" to a new value using invalid analysis ";
240 ss <<
" for crate/FEC/ring/CCU/module/LLD " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
241 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() << fec_key.channel()
242 <<
" and FED id/ch " << fed_key.
fedId() <<
"/" << fed_key.
fedChannel();
249 <<
" Unable to find pedestals/noise for FedKey/Id/Ch: " << hex << setw(8)
250 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/"
251 << ichan <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate()
252 <<
"/" << fec_key.fecSlot() <<
"/" << fec_key.fecRing() <<
"/"
253 << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/" << fec_key.channel();
260 <<
" Updated FED parameters for pedestal/noise " << updated_peds <<
" channels"
261 <<
" Updated FED parameters for frame finding thresholds " << updated_ticks
275 for (uint16_t iapv = 0; iapv < 2; ++iapv) {
277 PedestalsAnalysisDescription* peds_tmp;
278 peds_tmp =
new PedestalsAnalysisDescription(
anal->dead()[iapv],
280 anal->pedsMean()[iapv],
281 anal->pedsSpread()[iapv],
282 anal->noiseMean()[iapv],
283 anal->noiseSpread()[iapv],
284 anal->rawMean()[iapv],
285 anal->rawSpread()[iapv],
286 anal->pedsMax()[iapv],
287 anal->pedsMin()[iapv],
288 anal->noiseMax()[iapv],
289 anal->noiseMin()[iapv],
290 anal->rawMax()[iapv],
291 anal->rawMin()[iapv],
308 typedef std::vector<std::string>
Strings;
310 Strings::const_iterator istr =
errors.begin();
311 Strings::const_iterator jstr =
errors.end();
312 for (; istr != jstr; ++istr) {
313 peds_tmp->addComments(*istr);
317 desc.push_back(peds_tmp);
320 TimingAnalysisDescription* timing_tmp;
321 timing_tmp =
new TimingAnalysisDescription(-1.,
327 anal->frameFindingThreshold(),
348 for (; istr != jstr; ++istr) {
349 timing_tmp->addComments(*istr);
351 desc.push_back(timing_tmp);