|
|
Go to the documentation of this file.
22 <<
" Constructing object...";
27 <<
" Skipping update of FEC parameters.";
30 <<
" Skipping update of FED parameters.";
36 <<
" Enabling selective update of FED parameters.";
43 <<
" Destructing object...";
53 <<
" NULL pointer to SiStripConfigDb interface!"
54 <<
" Aborting upload...";
66 <<
" Found invalid PLL settings (coarse > 15)"
67 <<
" Aborting update to database...";
74 <<
" Uploading PLL settings to DB...";
77 <<
" Upload of PLL settings to DB finished!";
80 <<
" TEST only! No PLL settings will be uploaded to DB...";
85 <<
" No upload of PLL settings to DB, as defined by .cfg file!";
96 <<
" Uploading FED ticker thresholds to DB...";
99 <<
" Upload of FED ticker thresholds to DB finished!";
102 <<
" TEST only! No FED ticker thresholds will be uploaded to DB...";
107 <<
" No Upload of FED ticker thresholds to DB, as defined by .cfg file!";
115 uint16_t updated = 0;
116 std::vector<SiStripFecKey>
invalid;
117 SiStripConfigDb::DeviceDescriptionsV::const_iterator idevice;
119 for (idevice = devices.begin(); idevice != devices.end(); idevice++) {
121 if ((*idevice)->getDeviceType() != PLL) {
126 pllDescription*
desc = dynamic_cast<pllDescription*>(*idevice);
151 <<
" NULL pointer to analysis object!";
156 int32_t
delay = static_cast<int32_t>(rint(
anal->delay()) * 24. / 25);
158 coarse = static_cast<uint16_t>(
desc->getDelayCoarse() + (
delay / 24)) +
159 (static_cast<uint16_t>(
desc->getDelayFine()) + (
delay % 24)) / 24;
161 if ((static_cast<uint16_t>(
desc->getDelayFine()) +
delay) % 24 < 0) {
165 fine = (static_cast<uint16_t>(
desc->getDelayFine()) +
delay) % 24;
175 <<
" Unable to find FEC key with params crate/FEC/ring/CCU/module/LLD: "
191 std::stringstream
ss;
193 ss <<
"[ApvTimingHistosUsingDb::" << __func__ <<
"]"
194 <<
" Updating coarse/fine PLL settings"
195 <<
" for crate/FEC/ring/CCU/module " << fec_path.
fecCrate() <<
"/" << fec_path.
fecSlot() <<
"/"
197 << static_cast<uint16_t>(
desc->getDelayCoarse()) <<
"/" << static_cast<uint16_t>(
desc->getDelayFine());
199 desc->setDelayCoarse(coarse);
200 desc->setDelayFine(fine);
203 ss <<
" to " << static_cast<uint16_t>(
desc->getDelayCoarse()) <<
"/"
204 << static_cast<uint16_t>(
desc->getDelayFine());
210 <<
" Invalid PLL delay settings course/fine = " << coarse <<
"/" << fine
211 <<
" for crate/FEC/ring/CCU/module " << fec_path.
fecCrate() <<
"/"
219 std::stringstream
ss;
220 ss <<
"[ApvTimingHistosUsingDb::" << __func__ <<
"]"
221 <<
" Found PLL coarse setting of >15"
222 <<
" (not allowed!) for " <<
invalid.size() <<
" channels";
223 ss <<
" (Example is crate/FEC/ring/CCU/module/LLD: " <<
invalid.front().fecCrate() <<
"/"
224 <<
invalid.front().fecSlot() <<
"/" <<
invalid.front().fecRing() <<
"/" <<
invalid.front().ccuAddr() <<
"/"
231 <<
" Updated PLL settings for " << updated <<
" modules";
242 uint16_t updated = 0;
243 for (
auto ifed =
feds.begin(); ifed !=
feds.end(); ++ifed) {
245 if (
find(ids.begin(), ids.end(), (*ifed)->getFedId()) == ids.end()) {
267 <<
" NULL pointer to analysis object!";
272 Fed9U::Fed9UAddress
addr(ichan);
273 uint16_t old_threshold = static_cast<uint16_t>((*ifed)->getFrameThreshold(
addr));
274 if (
anal->isValid()) {
275 (*ifed)->setFrameThreshold(
addr,
anal->frameFindingThreshold());
278 uint16_t new_threshold = static_cast<uint16_t>((*ifed)->getFrameThreshold(
addr));
281 std::stringstream
ss;
282 ss <<
"[ApvTimingHistosUsingDb::" << __func__ <<
"]";
283 if (
anal->isValid()) {
284 ss <<
" Updating the frame-finding threshold"
285 <<
" from " << old_threshold <<
" to " << new_threshold <<
" using tick mark base/peak/height "
286 <<
anal->base() <<
"/" <<
anal->peak() <<
"/" <<
anal->height();
288 ss <<
" Cannot update the frame-finding threshold"
289 <<
" from " << old_threshold <<
" to a new value using invalid analysis ";
291 ss <<
" for crate/FEC/ring/CCU/module/LLD " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
292 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() << fec_key.channel()
293 <<
" and FED id/ch " << fed_key.
fedId() <<
"/" << fed_key.
fedChannel();
299 std::stringstream
ss;
300 ss <<
"[ApvTimingHistosUsingDb::" << __func__ <<
"]"
301 <<
" Unable to find analysis object and update ticker thresholds"
302 <<
" for key/crate/FEC/ring/CCU/module/LLD " << std::hex << std::setw(8) << std::setfill(
'0')
303 << fec_key.key() <<
std::dec << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/" << fec_key.fecRing()
304 <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/" << fec_key.channel()
305 <<
" and FED key/id/ch " << std::hex << std::setw(8) << std::setfill(
'0') << fed_key.
key() <<
std::dec
314 <<
" Updated ticker thresholds for " << updated <<
" channels on " << ids.size()
329 for (uint16_t iapv = 0; iapv < 2; ++iapv) {
342 TimingAnalysisDescription*
tmp;
343 tmp =
new TimingAnalysisDescription(
anal->time(),
349 anal->frameFindingThreshold(),
350 anal->optimumSamplingPoint(),
369 typedef std::vector<std::string>
Strings;
371 Strings::const_iterator istr =
errors.begin();
372 Strings::const_iterator jstr =
errors.end();
373 for (; istr != jstr; ++istr) {
374 tmp->addComments(*istr);
DeviceDescriptionsRange getDeviceDescriptions(std::string partition="")
DeviceDescriptions::range DeviceDescriptionsRange
const edm::ParameterSet & pset() const
const SiStripDbParams & dbParams() const
const uint32_t & key() const
DeviceAddress deviceAddress(const deviceDescription &)
FedDescriptionsRange getFedDescriptions(std::string partition="")
void uploadFedDescriptions(std::string partition="")
SiStripFedCabling *const cabling() const
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
ApvTimingHistosUsingDb(const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const, edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken)
void uploadConfigurations() override
const uint16_t & fecCrate() const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
A container class for generic run and event-related info, information required by the commissioning a...
Analyses & data(bool getMaskedData=false)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Log< level::Warning, false > LogWarning
static const float tickMarkHeightThreshold_
static const char mlDqmClient_[]
bool update(SiStripConfigDb::DeviceDescriptionsRange)
FedDescriptions::range FedDescriptionsRange
const uint16_t & channel() const
const uint16_t & fecRing() const
bool allowSelectiveUpload_
An interface class to the DeviceFactory.
Utility class that identifies a position within the strip tracker control structure,...
void uploadDeviceDescriptions(std::string partition="")
const uint16_t & ccuChan() const
Class containning control, module, detector and connection information, at the level of a FED channel...
static const uint16_t CHANS_PER_LLD
Analysis for timing run using APV tick marks.
const_iterator_range partitions() const
const uint16_t & feUnit() const
bool doUploadConf() const
static const uint16_t invalid_
Log< level::Error, false > LogError
~ApvTimingHistosUsingDb() override
void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis) override
const uint16_t & i2cAddr() const
uint16_t fedChannel() const
Log< level::Info, true > LogVerbatim
const uint16_t & ccuAddr() const
std::vector< AnalysisDescription * > AnalysisDescriptionsV
T getParameter(std::string const &) const
static const uint16_t FEDCH_PER_FED
SiStripConfigDb *const db() const
FedsConstIterRange fedIds() const
def upload(url, args, files)
bool deviceIsPresent(const SiStripFecKey &)
const uint16_t & fecSlot() const
Analyses::iterator Analysis
const uint16_t & fedId() const
const uint16_t & feChan() const