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);
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
Analyses::iterator Analysis
const uint16_t & feChan() const
Analyses & data(bool getMaskedData=false)
const uint16_t & feUnit() const
bool allowSelectiveUpload_
A container class for generic run and event-related info, information required by the commissioning a...
EventSelector::Strings Strings
bool deviceIsPresent(const SiStripFecKey &)
FedDescriptionsRange getFedDescriptions(std::string partition="")
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
FedDescriptions::range FedDescriptionsRange
static const char mlDqmClient_[]
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const_iterator_range partitions() const
DaqScopeModeHistosUsingDb(const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const, edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken)
static const float tickMarkHeightThreshold_
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
uint16_t fedChannel() const
const uint16_t & i2cAddr() const
Class containning control, module, detector and connection information, at the level of a FED channel...
SiStripConfigDb *const db() const
An interface class to the DeviceFactory.
const uint32_t & key() const
void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis) override
SiStripFedCabling *const cabling() const
std::vector< uint16_t > VInt
const uint16_t & fedId() const
void uploadFedDescriptions(std::string partition="")
~DaqScopeModeHistosUsingDb() override
static const uint16_t invalid_
void update(SiStripConfigDb::FedDescriptionsRange)
static const uint16_t FEDCH_PER_FED
std::vector< AnalysisDescription * > AnalysisDescriptionsV
const edm::ParameterSet & pset() const
const SiStripDbParams & dbParams() const
Log< level::Warning, false > LogWarning
FedsConstIterRange fedIds() const
bool doUploadConf() const
static const uint16_t APVS_PER_FEDCH
void uploadConfigurations() override
Analysis for scope mode data.