10 using namespace sistrip;
23 <<
" Constructing object...";
29 <<
" Set FED zero suppression high/low threshold to " <<
highThreshold_ <<
"/"
40 <<
" ; keeping previously disabled strips: " << keepStripsDisabled_
41 <<
" ; skip strips with no data: " << skipEmptyStrips_
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()) {
154 <<
" " << istr << std::endl;
164 find(dead.begin(), dead.end(), istr) != dead.end()) {
166 ss_disable <<
"Disabling Dead Strip: " << conn.
fecCrate() <<
" " << conn.
fecSlot() <<
" "
168 << conn.
lldChannel() <<
" " << iapv <<
" " << istr << std::endl;
173 if (not disableStrip) {
174 if (
find(badcChan.begin(), badcChan.end(), istr) != badcChan.end()) {
176 ss_disable <<
"Disabling Bad strip: " << conn.
fecCrate() <<
" " << conn.
fecSlot() <<
" "
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],
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(
352 istr = errors.begin();
354 for (; istr != jstr; ++istr) {
355 pedsFullNoiseDescription->addComments(*istr);
359 desc.push_back(pedsFullNoiseDescription);
const uint16_t & fecSlot() const
const VVInt & lowNoiseStrip() const
Log< level::Info, true > LogVerbatim
const VVInt & badJBProbab() const
const VFloat & rawMean() const
const uint16_t & fecCrate() const
void update(SiStripConfigDb::FedDescriptionsRange)
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
const uint32_t & fedKey() const
Analyses::iterator Analysis
Analyses & data(bool getMaskedData=false)
const VVFloat & residualKurtosis() const
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
A container class for generic run and event-related info, information required by the commissioning a...
const uint16_t & fedCh() const
const VVFloat & chi2Probab() const
const edm::ParameterSet & pset() const
const VVFloat & residualSkewness() const
bool deviceIsPresent(const SiStripFecKey &)
FedDescriptionsRange getFedDescriptions(std::string partition="")
const VVInt & badStripBit() const
~PedsFullNoiseHistosUsingDb() override
bool isValid() const override
FedDescriptions::range FedDescriptionsRange
void uploadConfigurations() override
static const char mlDqmClient_[]
const VVFloat & peds() const
const VVFloat & ksProbab() const
const VFloat & noiseMax() const
bool uploadOnlyStripBadChannelBit_
uint16_t lldChannel() const
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const uint16_t & i2cAddr() const
const uint16_t & fedId() const
const VVInt & badADProbab() const
Histogram-based analysis for pedestal run.
const uint32_t & key() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
const VVInt & deadStrip() const
const VFloat & noiseMin() const
const_iterator_range partitions() const
const VVFloat & residualIntegralNsigma() const
const VVFloat & adProbab() const
const VFloat & pedsSpread() const
const uint16_t & fecRing() const
bool allowSelectiveUpload_
Class containning control, module, detector and connection information, at the level of a FED channel...
const VFloat & pedsMax() const
An interface class to the DeviceFactory.
const uint16_t & ccuChan() const
bool doUploadConf() const
const VFloat & pedsMean() const
const VFloat & pedsMin() const
const VVInt & badChi2Probab() const
const uint32_t & fecKey() const
const VFloat & rawMin() const
const VFloat & rawSpread() const
uint16_t fedChannel() const
const uint16_t & ccuAddr() const
const VVInt & deadStripBit() const
const VVInt & shiftedStrip() const
const VVInt & badKSProbab() const
std::vector< uint16_t > VInt
const VFloat & rawMax() const
const VVInt & badDoublePeakStrip() const
const VVFloat & jbProbab() const
void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis) override
const VVFloat & noise() const
const VVFloat & noiseSignificance() const
const uint16_t & feUnit() const
const SiStripDbParams & dbParams() const
void uploadFedDescriptions(std::string partition="")
const VVFloat & residualSigmaGaus() const
T getParameter(std::string const &) const
const VVFloat & residualIntegral() const
static const uint16_t invalid_
PedsFullNoiseHistosUsingDb(const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const, edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken)
const VVFloat & residualRMS() const
const VVInt & largeNoiseSignificance() const
static const uint16_t FEDCH_PER_FED
std::vector< AnalysisDescription * > AnalysisDescriptionsV
const uint16_t & feChan() const
const VVInt & badTailStrip() const
const uint16_t & fedId() const
SiStripConfigDb *const db() const
const VVInt & largeNoiseStrip() const
Log< level::Warning, false > LogWarning
const VFloat & noiseSpread() const
SiStripFedCabling *const cabling() const
const VString & getErrorCodes() const
const VVInt & badFitStatus() const
const VFloat & noiseMean() const
static const uint16_t APVS_PER_FEDCH
const VVInt & badStrip() const
bool uploadPedsFullNoiseDBTable_