|
|
#include <ApvTimingHistosUsingDb.h>
|
| ApvTimingHistosUsingDb (const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const, edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken) |
|
void | uploadConfigurations () override |
|
| ~ApvTimingHistosUsingDb () override |
|
| CommissioningHistosUsingDb (SiStripConfigDb *const, edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken, sistrip::RunType=sistrip::UNDEFINED_RUN_TYPE) |
|
void | configure (const edm::ParameterSet &, const edm::EventSetup &) override |
|
bool | doUploadAnal () const |
|
void | doUploadAnal (bool) |
|
bool | doUploadConf () const |
|
void | doUploadConf (bool) |
|
void | uploadToConfigDb () |
|
| ~CommissioningHistosUsingDb () override |
|
| CommissioningHistograms () |
|
| CommissioningHistograms (const edm::ParameterSet &pset, DQMStore *const, const sistrip::RunType &) |
|
void | createCollations (const std::vector< std::string > &) |
|
virtual void | createSummaryHisto (const sistrip::Monitorable &, const sistrip::Presentation &, const std::string &top_level_dir, const sistrip::Granularity &) |
|
void | extractHistograms (const std::vector< std::string > &) |
|
virtual void | printAnalyses () |
|
virtual void | printSummary () |
|
void | remove (std::string pattern="") |
|
void | save (std::string &filename, uint32_t run_number=0, std::string partitionName="") |
|
virtual | ~CommissioningHistograms () |
|
| ApvTimingHistograms (const edm::ParameterSet &pset, DQMStore *) |
|
void | histoAnalysis (bool debug) override |
|
| ~ApvTimingHistograms () override |
|
|
typedef std::map< uint32_t, CommissioningAnalysis * > | Analyses |
|
typedef Analyses::iterator | Analysis |
|
typedef dqm::harvesting::DQMStore | DQMStore |
|
typedef SummaryPlotFactory< CommissioningAnalysis * > | Factory |
|
typedef std::map< uint32_t, uint32_t > | FedToFecMap |
|
typedef std::vector< Histo * > | Histos |
|
typedef std::map< uint32_t, Histos > | HistosMap |
|
typedef dqm::harvesting::MonitorElement | MonitorElement |
|
static void | copyCustomInformation (DQMStore *const, const std::vector< std::string > &) |
|
static uint32_t | runNumber (DQMStore *const, const std::vector< std::string > &) |
|
static sistrip::RunType | runType (DQMStore *const, const std::vector< std::string > &) |
|
virtual void | addDcuDetIds () |
|
void | buildDetInfo () |
|
SiStripFedCabling *const | cabling () const |
|
virtual void | createAnalyses (SiStripConfigDb::AnalysisDescriptionsV &) |
|
SiStripConfigDb *const | db () const |
|
std::pair< std::string, DetInfo > | detInfo (const SiStripFecKey &) |
|
bool | deviceIsPresent (const SiStripFecKey &) |
|
void | uploadAnalyses () |
|
DQMStore *const | bei () const |
|
void | clearHistosMap () |
|
Analyses & | data (bool getMaskedData=false) |
|
Factory *const | factory () |
|
TH1 * | histogram (const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &directory, const uint32_t &xbins, const float &xlow=1. *sistrip::invalid_, const float &xhigh=1. *sistrip::invalid_) |
|
const HistosMap & | histos () const |
|
const FedToFecMap & | mapping () const |
|
void | printHistosMap () |
|
const edm::ParameterSet & | pset () const |
|
const sistrip::RunType & | task () const |
|
std::unique_ptr< Factory > | factory_ |
|
Definition at line 8 of file ApvTimingHistosUsingDb.h.
◆ ApvTimingHistosUsingDb()
◆ ~ApvTimingHistosUsingDb()
ApvTimingHistosUsingDb::~ApvTimingHistosUsingDb |
( |
| ) |
|
|
override |
◆ create()
Reimplemented from CommissioningHistosUsingDb.
Definition at line 320 of file ApvTimingHistosUsingDb.cc.
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);
References conversion_template_cfg::anal, CommissioningHistosUsingDb::db(), SiStripConfigDb::dbParams(), submitPVResolutionJobs::desc, SiStripFecKey::i2cAddr(), SiStripDbParams::partitions(), ApvTimingAnalysis::tickMarkHeightThreshold_, and createJobs::tmp.
◆ update() [1/2]
Definition at line 113 of file ApvTimingHistosUsingDb.cc.
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: "
176 << fec_key.fecCrate() <<
"/" << fec_key.fecSlot() <<
"/" << fec_key.fecRing()
177 <<
"/" << fec_key.ccuAddr() <<
"/" << fec_key.ccuChan() <<
"/"
178 << fec_key.channel();
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";
References generateTowerEtThresholdLUT::addr, allowSelectiveUpload_, conversion_template_cfg::anal, SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), SiStripKey::channel(), sistrip::CHANS_PER_LLD, CommissioningHistograms::data(), CommissioningHistosUsingDb::db(), phase2TrackerDigitizer_cfi::delay, submitPVResolutionJobs::desc, SiStripConfigDb::deviceAddress(), CommissioningHistosUsingDb::deviceIsPresent(), SiStripFecKey::fecCrate(), SiStripFecKey::fecRing(), SiStripFecKey::fecSlot(), invalid, sistrip::invalid_, edm::isDebugEnabled(), SiStripKey::key(), LogTrace, sistrip::mlDqmClient_, and contentValuesCheck::ss.
Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), MatrixUtil.Steps::overwrite(), and uploadConfigurations().
◆ update() [2/2]
Definition at line 237 of file ApvTimingHistosUsingDb.cc.
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
306 << fed_key.fedId() <<
"/" << fed_key.fedChannel();
314 <<
" Updated ticker thresholds for " << updated <<
" channels on " << ids.size()
References generateTowerEtThresholdLUT::addr, allowSelectiveUpload_, conversion_template_cfg::anal, CommissioningHistosUsingDb::cabling(), SiStripCommissioningClient_cfg::conn, CommissioningHistograms::data(), TauDecayModes::dec, CommissioningHistosUsingDb::deviceIsPresent(), SiStripFedKey::feChan(), sistrip::FEDCH_PER_FED, SiStripFedKey::fedChannel(), SiStripFedCabling::fedConnection(), SiStripFedKey::fedId(), SiStripFedCabling::fedIds(), l1tstage2emulator_dqm_sourceclient-live_cfg::feds, SiStripFedKey::feUnit(), spr::find(), sistrip::invalid_, SiStripKey::key(), sistrip::mlDqmClient_, and contentValuesCheck::ss.
Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().
◆ uploadConfigurations()
void ApvTimingHistosUsingDb::uploadConfigurations |
( |
| ) |
|
|
overridevirtual |
Reimplemented from CommissioningHistosUsingDb.
Definition at line 48 of file ApvTimingHistosUsingDb.cc.
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!";
References CommissioningHistosUsingDb::db(), CommissioningHistosUsingDb::doUploadConf(), l1tstage2emulator_dqm_sourceclient-live_cfg::feds, SiStripConfigDb::getDeviceDescriptions(), SiStripConfigDb::getFedDescriptions(), LogTrace, sistrip::mlDqmClient_, skipFecUpdate_, skipFedUpdate_, update(), alcaDQMUpload::upload(), SiStripConfigDb::uploadDeviceDescriptions(), and SiStripConfigDb::uploadFedDescriptions().
◆ allowSelectiveUpload_
bool ApvTimingHistosUsingDb::allowSelectiveUpload_ |
|
private |
◆ skipFecUpdate_
bool ApvTimingHistosUsingDb::skipFecUpdate_ |
|
private |
◆ skipFedUpdate_
bool ApvTimingHistosUsingDb::skipFedUpdate_ |
|
private |
DeviceDescriptionsRange getDeviceDescriptions(std::string partition="")
DeviceDescriptions::range DeviceDescriptionsRange
const edm::ParameterSet & pset() const
DQMStore *const bei() const
const SiStripDbParams & dbParams() 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
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)
CommissioningHistograms()
CommissioningHistosUsingDb()
FedDescriptions::range FedDescriptionsRange
const uint16_t & fecRing() const
bool allowSelectiveUpload_
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_
ApvTimingHistograms(const edm::ParameterSet &pset, DQMStore *)
Log< level::Error, false > LogError
const uint16_t & i2cAddr() const
Log< level::Info, true > LogVerbatim
const uint16_t & ccuAddr() const
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
const uint16_t & feChan() const