23 <<
" Constructing object...";
29 <<
" Set FED zero suppression high/low threshold to " <<
highThreshold_ <<
"/" 54 <<
" Destructing object...";
64 <<
" NULL pointer to SiStripConfigDb interface!" 65 <<
" Aborting upload...";
75 <<
" Uploading pedestals/noise to DB...";
80 <<
" Completed database upload of " <<
feds.size() <<
" FED descriptions!";
83 <<
" TEST! No pedestals/noise values will be uploaded to DB...";
92 SiStripConfigDb::FedDescriptionsV::const_iterator ifed;
94 for (ifed =
feds.begin(); ifed !=
feds.end(); ifed++) {
117 <<
" NULL pointer to analysis object!";
122 uint32_t pedshift = 127;
124 uint32_t pedmin = (uint32_t)
anal->pedsMin()[iapv];
125 pedshift = pedmin < pedshift ? pedmin : pedshift;
130 for (uint16_t istr = 0; istr <
anal->peds()[iapv].size(); istr++) {
134 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]" 135 <<
" Skipping ZERO pedestal value (ie, NO UPLOAD TO DB!) for FedKey/Id/Ch: " << hex << setw(8)
136 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/" << ichan
137 <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/" 138 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/" 139 << fec_key.channel();
144 Fed9U::Fed9UAddress
addr(ichan, iapv, istr);
145 Fed9U::Fed9UStripDescription
temp = (*ifed)->getFedStrips().getStrip(
addr);
148 bool disableStrip =
false;
149 std::stringstream ss_disable;
151 if (
temp.getDisable()) {
152 ss_disable <<
"Already Disabled: " <<
conn.fecCrate() <<
" " <<
conn.fecSlot() <<
" " <<
conn.fecRing()
153 <<
" " <<
conn.ccuAddr() <<
" " <<
conn.ccuChan() <<
" " <<
conn.lldChannel() <<
" " << iapv
154 <<
" " << istr << std::endl;
164 find(dead.begin(), dead.end(), istr) != dead.end()) {
166 ss_disable <<
"Disabling Dead Strip: " <<
conn.fecCrate() <<
" " <<
conn.fecSlot() <<
" " 167 <<
conn.fecRing() <<
" " <<
conn.ccuAddr() <<
" " <<
conn.ccuChan() <<
" " 168 <<
conn.lldChannel() <<
" " << iapv <<
" " << istr << std::endl;
172 anal->badStrip()[iapv];
173 if (not disableStrip) {
174 if (
find(badcChan.begin(), badcChan.end(), istr) != badcChan.end()) {
176 ss_disable <<
"Disabling Bad strip: " <<
conn.fecCrate() <<
" " <<
conn.fecSlot() <<
" " 177 <<
conn.fecRing() <<
" " <<
conn.ccuAddr() <<
" " <<
conn.ccuChan() <<
" " 178 <<
conn.lldChannel() <<
" " << iapv <<
" " << istr << std::endl;
186 uint32_t pedestalVal = 0;
193 pedestalVal =
static_cast<uint32_t
>(
temp.getPedestal());
194 noiseVal =
static_cast<float>(
temp.getNoise());
195 lowThr =
static_cast<float>(
temp.getLowThresholdFactor());
196 highThr =
static_cast<float>(
temp.getHighThresholdFactor());
198 pedestalVal =
static_cast<uint32_t
>(
anal->peds()[iapv][istr] - pedshift);
199 noiseVal =
anal->noise()[iapv][istr];
205 Fed9U::Fed9UStripDescription
data(pedestalVal, highThr, lowThr, noiseVal, disableStrip);
207 std::stringstream
ss;
209 ss <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]" 210 <<
" Disabling strip in Fed9UStripDescription object..." << std::endl
211 <<
" for FED id/channel and APV/strip : " << fed_key.
fedId() <<
"/" << fed_key.
fedChannel() <<
" " 212 << iapv <<
"/" << istr << std::endl
213 <<
" and crate/FEC/ring/CCU/module : " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/" 214 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() << std::endl
215 <<
" from ped/noise/high/low/disable : " <<
static_cast<uint32_t
>(
temp.getPedestal()) <<
"/" 216 << static_cast<float>(
temp.getHighThresholdFactor()) <<
"/" 217 << static_cast<float>(
temp.getLowThresholdFactor()) <<
"/" << static_cast<float>(
temp.getNoise())
218 <<
"/" << static_cast<uint16_t>(
temp.getDisable()) << std::endl;
221 (*ifed)->getFedStrips().setStrip(
addr,
data);
224 ss <<
" to ped/noise/high/low/disable : " <<
static_cast<uint32_t
>(
data.getPedestal()) <<
"/" 225 << static_cast<float>(
data.getHighThresholdFactor()) <<
"/" 226 << static_cast<float>(
data.getLowThresholdFactor()) <<
"/" << static_cast<float>(
data.getNoise())
227 <<
"/" << static_cast<uint16_t>(
data.getDisable()) << std::endl;
236 <<
" Unable to find pedestals/noise for FedKey/Id/Ch: " << hex << setw(8)
237 << setfill(
'0') << fed_key.
key() <<
dec <<
"/" << (*ifed)->getFedId() <<
"/" 238 << ichan <<
" and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate()
239 <<
"/" << fec_key.fecSlot() <<
"/" << fec_key.fecRing() <<
"/" 240 << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/" << fec_key.channel();
247 <<
" Updated FED pedestals/noise for " << updated <<
" channels";
262 for (uint16_t iapv = 0; iapv < 2; ++iapv) {
264 PedestalsAnalysisDescription* pedestalDescription;
265 pedestalDescription =
266 new PedestalsAnalysisDescription(
anal->deadStripBit()[iapv],
267 anal->badStripBit()[iapv],
268 anal->pedsMean()[iapv],
269 anal->pedsSpread()[iapv],
270 anal->noiseMean()[iapv],
271 anal->noiseSpread()[iapv],
272 anal->rawMean()[iapv],
273 anal->rawSpread()[iapv],
274 anal->pedsMax()[iapv],
275 anal->pedsMin()[iapv],
276 anal->noiseMax()[iapv],
277 anal->noiseMin()[iapv],
278 anal->rawMax()[iapv],
279 anal->rawMin()[iapv],
296 typedef std::vector<std::string>
Strings;
298 Strings::const_iterator istr =
errors.begin();
299 Strings::const_iterator jstr =
errors.end();
300 for (; istr != jstr; ++istr) {
301 pedestalDescription->addComments(*istr);
305 desc.push_back(pedestalDescription);
309 PedsFullNoiseAnalysisDescription* pedsFullNoiseDescription;
310 pedsFullNoiseDescription =
new PedsFullNoiseAnalysisDescription(
311 anal->deadStrip()[iapv],
312 anal->badStrip()[iapv],
313 anal->shiftedStrip()[iapv],
314 anal->lowNoiseStrip()[iapv],
315 anal->largeNoiseStrip()[iapv],
316 anal->largeNoiseSignificance()[iapv],
317 anal->badFitStatus()[iapv],
318 anal->badADProbab()[iapv],
319 anal->badKSProbab()[iapv],
320 anal->badJBProbab()[iapv],
321 anal->badChi2Probab()[iapv],
322 anal->badTailStrip()[iapv],
323 anal->badDoublePeakStrip()[iapv],
325 anal->adProbab()[iapv],
326 anal->ksProbab()[iapv],
327 anal->jbProbab()[iapv],
328 anal->chi2Probab()[iapv],
330 anal->residualRMS()[iapv],
331 anal->residualSigmaGaus()[iapv],
332 anal->noiseSignificance()[iapv],
333 anal->residualSkewness()[iapv],
334 anal->residualKurtosis()[iapv],
335 anal->residualIntegralNsigma()[iapv],
336 anal->residualIntegral()[iapv],
354 for (; istr != jstr; ++istr) {
355 pedsFullNoiseDescription->addComments(*istr);
359 desc.push_back(pedsFullNoiseDescription);
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
void update(SiStripConfigDb::FedDescriptionsRange)
Analyses::iterator Analysis
const uint16_t & feChan() const
Analyses & data(bool getMaskedData=false)
const uint16_t & feUnit() const
A container class for generic run and event-related info, information required by the commissioning a...
bool deviceIsPresent(const SiStripFecKey &)
FedDescriptionsRange getFedDescriptions(std::string partition="")
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
~PedsFullNoiseHistosUsingDb() override
FedDescriptions::range FedDescriptionsRange
void uploadConfigurations() override
static const char mlDqmClient_[]
bool uploadOnlyStripBadChannelBit_
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
Histogram-based analysis for pedestal run.
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
bool allowSelectiveUpload_
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
SiStripFedCabling *const cabling() const
std::vector< uint16_t > VInt
const uint16_t & fedId() const
void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis) override
void uploadFedDescriptions(std::string partition="")
static const uint16_t invalid_
PedsFullNoiseHistosUsingDb(const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const, edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken)
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
bool doUploadConf() const
static const uint16_t APVS_PER_FEDCH
bool uploadPedsFullNoiseDBTable_