|
|
Go to the documentation of this file.
19 <<
" Constructing object...";
24 <<
" Skipping update of FEC parameters.";
27 <<
" Skipping update of FED parameters.";
33 <<
" Enabling selective update of FED parameters.";
40 <<
" Destructing object...";
50 <<
" NULL pointer to SiStripConfigDb interface!"
51 <<
" Aborting upload...";
63 <<
" Found invalid PLL settings (coarse > 15)"
64 <<
" Aborting update to database...";
71 <<
" Uploading PLL settings to DB...";
74 <<
" Upload of PLL settings to DB finished!";
77 <<
" TEST only! No PLL settings will be uploaded to DB...";
82 <<
" No upload of PLL settings to DB, as defined by .cfg file!";
93 <<
" Uploading FED ticker thresholds to DB...";
96 <<
" Upload of FED ticker thresholds to DB finished!";
99 <<
" TEST only! No FED ticker thresholds will be uploaded to DB...";
104 <<
" No Upload of FED ticker thresholds to DB, as defined by .cfg file!";
112 uint16_t updated = 0;
113 std::vector<SiStripFecKey>
invalid;
114 SiStripConfigDb::DeviceDescriptionsV::const_iterator idevice;
116 for (idevice = devices.begin(); idevice != devices.end(); idevice++) {
118 if ((*idevice)->getDeviceType() != PLL) {
123 pllDescription* desc = dynamic_cast<pllDescription*>(*idevice);
148 <<
" NULL pointer to analysis object!";
153 int32_t
delay = static_cast<int32_t>(rint(
anal->delay()) * 24. / 25);
155 coarse = static_cast<uint16_t>(desc->getDelayCoarse() + (
delay / 24)) +
156 (static_cast<uint16_t>(desc->getDelayFine()) + (
delay % 24)) / 24;
158 if ((static_cast<uint16_t>(desc->getDelayFine()) +
delay) % 24 < 0) {
162 fine = (static_cast<uint16_t>(desc->getDelayFine()) +
delay) % 24;
172 <<
" Unable to find FEC key with params crate/FEC/ring/CCU/module/LLD: "
188 std::stringstream
ss;
190 ss <<
"[ApvTimingHistosUsingDb::" << __func__ <<
"]"
191 <<
" Updating coarse/fine PLL settings"
192 <<
" for crate/FEC/ring/CCU/module " << fec_path.
fecCrate() <<
"/" << fec_path.
fecSlot() <<
"/"
194 << static_cast<uint16_t>(desc->getDelayCoarse()) <<
"/" << static_cast<uint16_t>(desc->getDelayFine());
196 desc->setDelayCoarse(coarse);
197 desc->setDelayFine(fine);
200 ss <<
" to " << static_cast<uint16_t>(desc->getDelayCoarse()) <<
"/"
201 << static_cast<uint16_t>(desc->getDelayFine());
207 <<
" Invalid PLL delay settings course/fine = " << coarse <<
"/" << fine
208 <<
" for crate/FEC/ring/CCU/module " << fec_path.
fecCrate() <<
"/"
216 std::stringstream
ss;
217 ss <<
"[ApvTimingHistosUsingDb::" << __func__ <<
"]"
218 <<
" Found PLL coarse setting of >15"
219 <<
" (not allowed!) for " <<
invalid.size() <<
" channels";
220 ss <<
" (Example is crate/FEC/ring/CCU/module/LLD: " <<
invalid.front().fecCrate() <<
"/"
221 <<
invalid.front().fecSlot() <<
"/" <<
invalid.front().fecRing() <<
"/" <<
invalid.front().ccuAddr() <<
"/"
228 <<
" Updated PLL settings for " << updated <<
" modules";
239 uint16_t updated = 0;
240 for (
auto ifed =
feds.begin(); ifed !=
feds.end(); ++ifed) {
242 if (
find(ids.begin(), ids.end(), (*ifed)->getFedId()) == ids.end()) {
264 <<
" NULL pointer to analysis object!";
269 Fed9U::Fed9UAddress
addr(ichan);
270 uint16_t old_threshold = static_cast<uint16_t>((*ifed)->getFrameThreshold(
addr));
271 if (
anal->isValid()) {
272 (*ifed)->setFrameThreshold(
addr,
anal->frameFindingThreshold());
275 uint16_t new_threshold = static_cast<uint16_t>((*ifed)->getFrameThreshold(
addr));
278 std::stringstream
ss;
279 ss <<
"[ApvTimingHistosUsingDb::" << __func__ <<
"]";
280 if (
anal->isValid()) {
281 ss <<
" Updating the frame-finding threshold"
282 <<
" from " << old_threshold <<
" to " << new_threshold <<
" using tick mark base/peak/height "
283 <<
anal->base() <<
"/" <<
anal->peak() <<
"/" <<
anal->height();
285 ss <<
" Cannot update the frame-finding threshold"
286 <<
" from " << old_threshold <<
" to a new value using invalid analysis ";
288 ss <<
" for crate/FEC/ring/CCU/module/LLD " << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/"
289 << fec_key.fecRing() <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() << fec_key.channel()
290 <<
" and FED id/ch " << fed_key.
fedId() <<
"/" << fed_key.
fedChannel();
296 std::stringstream
ss;
297 ss <<
"[ApvTimingHistosUsingDb::" << __func__ <<
"]"
298 <<
" Unable to find analysis object and update ticker thresholds"
299 <<
" for key/crate/FEC/ring/CCU/module/LLD " << std::hex << std::setw(8) << std::setfill(
'0')
300 << fec_key.key() <<
std::dec << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/" << fec_key.fecRing()
301 <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/" << fec_key.channel()
302 <<
" and FED key/id/ch " << std::hex << std::setw(8) << std::setfill(
'0') << fed_key.
key() <<
std::dec
311 <<
" Updated ticker thresholds for " << updated <<
" channels on " << ids.size()
326 for (uint16_t iapv = 0; iapv < 2; ++iapv) {
339 TimingAnalysisDescription*
tmp;
340 tmp =
new TimingAnalysisDescription(
anal->time(),
346 anal->frameFindingThreshold(),
347 anal->optimumSamplingPoint(),
366 typedef std::vector<std::string>
Strings;
368 Strings::const_iterator istr =
errors.begin();
369 Strings::const_iterator jstr =
errors.end();
370 for (; istr != jstr; ++istr) {
371 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
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)
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
ApvTimingHistosUsingDb(const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const)
static const uint16_t invalid_
T getParameter(std::string const &) const
~ApvTimingHistosUsingDb() override
void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis) override
const uint16_t & i2cAddr() const
uint16_t fedChannel() const
const uint16_t & ccuAddr() const
std::vector< AnalysisDescription * > AnalysisDescriptionsV
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