20 <<
" Constructing object...";
24 <<
" Set FED zero suppression high/low threshold to " <<
highThreshold_ <<
"/"
49 <<
" Destructing object...";
58 <<
" NULL pointer to SiStripConfigDb interface!"
59 <<
" Aborting upload...";
69 <<
" Uploading FED information to DB...";
72 <<
" Completed database upload of " <<
feds.size() <<
" FED descriptions!";
75 <<
" No FED values will be uploaded to DB...";
85 uint16_t updated_peds = 0;
86 uint16_t updated_ticks = 0;
87 SiStripConfigDb::FedDescriptionsV::const_iterator ifed;
88 for (ifed =
feds.begin(); ifed !=
feds.end(); ifed++) {
90 if (
find(ids.begin(), ids.end(), (*ifed)->getFedId()) == ids.end()) {
114 if (!iter->second->isValid()) {
116 <<
" Skipping invalid channel with coordinates: FedKey/Id/Ch: " << hex
117 << setw(8) << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId()
118 <<
"/" << ichan <<
" and device with FEC/slot/ring/CCU/LLD "
119 << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/" << fec_key.fecRing()
120 <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/"
121 << fec_key.channel();
128 <<
" NULL pointer to analysis object!";
135 uint32_t pedshift = 127;
137 uint32_t pedmin = (uint32_t)
anal->pedsMin()[iapv];
138 pedshift = pedmin < pedshift ? pedmin : pedshift;
139 std::stringstream
ss;
140 ss <<
"iapv: " << iapv <<
" pedsMin()[iapv]: " <<
anal->pedsMin()[iapv] <<
" pedmin: " << pedmin
141 <<
" pedshift: " << pedshift;
147 for (uint16_t istr = 0; istr <
anal->peds()[iapv].size(); istr++) {
149 if (
anal->peds()[iapv][istr] < 1.) {
151 <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]"
152 <<
" Skipping ZERO pedestal value (ie, NO UPLOAD TO DB!) for FedKey/Id/Ch: " << hex << setw(8)
153 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/" << ichan
154 <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot()
155 <<
"/" << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/"
156 << fec_key.channel();
161 Fed9U::Fed9UAddress
addr(ichan, iapv, istr);
162 Fed9U::Fed9UStripDescription
temp = (*ifed)->getFedStrips().getStrip(
addr);
165 bool disableStrip =
false;
167 disableStrip =
temp.getDisable();
170 if (
find(dead.begin(), dead.end(), istr) != dead.end())
173 if (
find(noisy.begin(), noisy.end(), istr) != noisy.end())
177 Fed9U::Fed9UStripDescription
data(static_cast<uint32_t>(
anal->peds()[iapv][istr] - pedshift),
180 anal->noise()[iapv][istr],
183 std::stringstream
ss;
185 ss <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]"
186 <<
" Disabling strip in Fed9UStripDescription object..." << std::endl
187 <<
" for FED id/channel and APV/strip : " << fed_key.
fedId() <<
"/" << fed_key.
fedChannel() <<
" "
188 << iapv <<
"/" << istr << std::endl
189 <<
" and crate/FEC/ring/CCU/module : " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
190 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() << std::endl
191 <<
" from ped/noise/high/low/disable : " << static_cast<uint16_t>(
temp.getPedestal()) <<
"/"
192 << static_cast<uint16_t>(
temp.getHighThreshold()) <<
"/"
193 << static_cast<uint16_t>(
temp.getLowThreshold()) <<
"/" << static_cast<uint16_t>(
temp.getNoise())
194 <<
"/" << static_cast<uint16_t>(
temp.getDisable()) << std::endl;
198 (*ifed)->getFedStrips().setStrip(
addr,
data);
201 ss <<
" to ped/noise/high/low/disable : " << static_cast<uint16_t>(
data.getPedestal()) <<
"/"
202 << static_cast<uint16_t>(
data.getHighThreshold()) <<
"/"
203 << static_cast<uint16_t>(
data.getLowThreshold()) <<
"/" << static_cast<uint16_t>(
data.getNoise())
204 <<
"/" << static_cast<uint16_t>(
data.getDisable()) << std::endl;
215 Fed9U::Fed9UAddress
addr(ichan);
216 uint16_t old_threshold = static_cast<uint16_t>((*ifed)->getFrameThreshold(
addr));
217 if (
anal->isValid()) {
218 (*ifed)->setFrameThreshold(
addr,
anal->frameFindingThreshold());
221 uint16_t new_threshold = static_cast<uint16_t>((*ifed)->getFrameThreshold(
addr));
223 std::stringstream
ss;
224 ss <<
"LLD channel : old frame threshold " << old_threshold <<
" new frame threshold " << new_threshold
230 ss <<
"[DaqScopeModeHistosUsingDb::" << __func__ <<
"]";
231 if (
anal->isValid()) {
232 ss <<
" Updating the frame-finding threshold"
233 <<
" from " << old_threshold <<
" to " << new_threshold <<
" using tick mark base/peak/height "
234 <<
anal->base() <<
"/" <<
anal->peak() <<
"/" <<
anal->height();
236 ss <<
" Cannot update the frame-finding threshold"
237 <<
" from " << old_threshold <<
" to a new value using invalid analysis ";
239 ss <<
" for crate/FEC/ring/CCU/module/LLD " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
240 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() << fec_key.channel()
241 <<
" and FED id/ch " << fed_key.
fedId() <<
"/" << fed_key.
fedChannel();
248 <<
" Unable to find pedestals/noise for FedKey/Id/Ch: " << hex << setw(8)
249 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/"
250 << ichan <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate()
251 <<
"/" << fec_key.fecSlot() <<
"/" << fec_key.fecRing() <<
"/"
252 << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/" << fec_key.channel();
259 <<
" Updated FED parameters for pedestal/noise " << updated_peds <<
" channels"
260 <<
" Updated FED parameters for frame finding thresholds " << updated_ticks
274 for (uint16_t iapv = 0; iapv < 2; ++iapv) {
276 PedestalsAnalysisDescription* peds_tmp;
277 peds_tmp =
new PedestalsAnalysisDescription(
anal->dead()[iapv],
279 anal->pedsMean()[iapv],
280 anal->pedsSpread()[iapv],
281 anal->noiseMean()[iapv],
282 anal->noiseSpread()[iapv],
283 anal->rawMean()[iapv],
284 anal->rawSpread()[iapv],
285 anal->pedsMax()[iapv],
286 anal->pedsMin()[iapv],
287 anal->noiseMax()[iapv],
288 anal->noiseMin()[iapv],
289 anal->rawMax()[iapv],
290 anal->rawMin()[iapv],
307 typedef std::vector<std::string>
Strings;
309 Strings::const_iterator istr =
errors.begin();
310 Strings::const_iterator jstr =
errors.end();
311 for (; istr != jstr; ++istr) {
312 peds_tmp->addComments(*istr);
316 desc.push_back(peds_tmp);
319 TimingAnalysisDescription* timing_tmp;
320 timing_tmp =
new TimingAnalysisDescription(-1.,
326 anal->frameFindingThreshold(),
347 for (; istr != jstr; ++istr) {
348 timing_tmp->addComments(*istr);
350 desc.push_back(timing_tmp);