9 using namespace sistrip;
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));
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__ <<
"]";
233 ss <<
" Updating the frame-finding threshold"
234 <<
" from " << old_threshold <<
" to " << new_threshold <<
" using tick mark base/peak/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],
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.,
346 istr = errors.begin();
348 for (; istr != jstr; ++istr) {
349 timing_tmp->addComments(*istr);
351 desc.push_back(timing_tmp);
const uint16_t & fecSlot() const
Log< level::Info, true > LogVerbatim
const VFloat & noiseMean() const
const uint16_t & fecCrate() const
const VVInt & dead() const
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)
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
bool allowSelectiveUpload_
A container class for generic run and event-related info, information required by the commissioning a...
const uint16_t & fedCh() const
const edm::ParameterSet & pset() const
bool deviceIsPresent(const SiStripFecKey &)
const VFloat & noiseSpread() const
FedDescriptionsRange getFedDescriptions(std::string partition="")
FedDescriptions::range FedDescriptionsRange
uint16_t frameFindingThreshold() const
static const char mlDqmClient_[]
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 VFloat & noiseMax() const
const uint16_t & i2cAddr() const
const uint16_t & fedId() const
DaqScopeModeHistosUsingDb(const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const, edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken)
const uint32_t & key() const
static const float tickMarkHeightThreshold_
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
const_iterator_range partitions() const
const uint16_t & fecRing() const
const VFloat & pedsSpread() const
Class containning control, module, detector and connection information, at the level of a FED channel...
FedsConstIterRange fedIds() const
const VVFloat & noise() const
const VFloat & rawMean() const
An interface class to the DeviceFactory.
const uint16_t & ccuChan() const
bool doUploadConf() const
const float & base() const
const uint32_t & fecKey() const
const VVFloat & peds() const
void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis) override
const float & height() const
void print(std::stringstream &, uint32_t apv_number=0) override
uint16_t fedChannel() const
const uint16_t & ccuAddr() const
const VFloat & rawSpread() const
std::vector< uint16_t > VInt
const VFloat & noiseMin() const
const float & peak() const
const VFloat & pedsMean() const
bool isValid() const override
const uint16_t & feUnit() const
const SiStripDbParams & dbParams() const
const VVInt & noisy() const
void uploadFedDescriptions(std::string partition="")
~DaqScopeModeHistosUsingDb() override
T getParameter(std::string const &) const
static const uint16_t invalid_
void update(SiStripConfigDb::FedDescriptionsRange)
static const uint16_t FEDCH_PER_FED
std::vector< AnalysisDescription * > AnalysisDescriptionsV
const uint16_t & feChan() const
const VFloat & pedsMax() const
const uint16_t & fedId() const
SiStripConfigDb *const db() const
const VFloat & pedsMin() const
const VFloat & rawMax() const
Log< level::Warning, false > LogWarning
const VFloat & rawMin() const
SiStripFedCabling *const cabling() const
const VString & getErrorCodes() const
static const uint16_t APVS_PER_FEDCH
void uploadConfigurations() override
Analysis for scope mode data.