CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
FineDelayHistosUsingDb Class Reference

#include <FineDelayHistosUsingDb.h>

Inheritance diagram for FineDelayHistosUsingDb:
CommissioningHistosUsingDb SamplingHistograms CommissioningHistograms CommissioningHistograms

Public Member Functions

void configure (const edm::ParameterSet &, const edm::EventSetup &) override
 
 FineDelayHistosUsingDb (const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const, edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken, edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken)
 
void uploadConfigurations () override
 
 ~FineDelayHistosUsingDb () override
 
- Public Member Functions inherited from CommissioningHistosUsingDb
 CommissioningHistosUsingDb (SiStripConfigDb *const, edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken, sistrip::RunType=sistrip::UNDEFINED_RUN_TYPE)
 
bool doUploadAnal () const
 
void doUploadAnal (bool)
 
bool doUploadConf () const
 
void doUploadConf (bool)
 
void uploadToConfigDb ()
 
 ~CommissioningHistosUsingDb () override
 
- Public Member Functions inherited from CommissioningHistograms
 CommissioningHistograms (const edm::ParameterSet &pset, DQMStore *const, const sistrip::RunType &)
 
 CommissioningHistograms ()
 
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 ()
 
- Public Member Functions inherited from SamplingHistograms
void histoAnalysis (bool debug) override
 
 SamplingHistograms (const edm::ParameterSet &pset, DQMStore *, const sistrip::RunType &task=sistrip::APV_LATENCY)
 
 ~SamplingHistograms () override
 

Private Member Functions

void computeDelays ()
 
void create (SiStripConfigDb::AnalysisDescriptionsV &, Analysis) override
 
bool update (SiStripConfigDb::DeviceDescriptionsRange)
 
void update (SiStripConfigDb::FedDescriptionsRange)
 

Private Attributes

bool cosmic_
 
std::map< unsigned int, float > delays_
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtkGeomToken_
 
const TrackerGeometrytracker_
 

Additional Inherited Members

- Public Types inherited from CommissioningHistograms
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, HistosHistosMap
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Static Public Member Functions inherited from CommissioningHistograms
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 > &)
 
- Protected Member Functions inherited from CommissioningHistosUsingDb
virtual void addDcuDetIds ()
 
void buildDetInfo ()
 
SiStripFedCabling *const cabling () const
 
virtual void createAnalyses (SiStripConfigDb::AnalysisDescriptionsV &)
 
SiStripConfigDb *const db () const
 
std::pair< std::string, DetInfodetInfo (const SiStripFecKey &)
 
bool deviceIsPresent (const SiStripFecKey &)
 
void uploadAnalyses ()
 
- Protected Member Functions inherited from CommissioningHistograms
DQMStore *const bei () const
 
void clearHistosMap ()
 
Analysesdata (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 HistosMaphistos () const
 
const FedToFecMapmapping () const
 
void printHistosMap ()
 
const edm::ParameterSetpset () const
 
const sistrip::RunTypetask () const
 
- Protected Attributes inherited from CommissioningHistograms
std::unique_ptr< Factoryfactory_
 

Detailed Description

Definition at line 14 of file FineDelayHistosUsingDb.h.

Constructor & Destructor Documentation

◆ FineDelayHistosUsingDb()

FineDelayHistosUsingDb::FineDelayHistosUsingDb ( const edm::ParameterSet pset,
DQMStore bei,
SiStripConfigDb * const  db,
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd tTopoToken,
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord tkGeomToken 
)

Definition at line 23 of file FineDelayHistosUsingDb.cc.

31  tkGeomToken_{tkGeomToken},
32  tracker_(nullptr) {
33  LogTrace(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
34  << " Constructing object...";
35  delays_.clear();
36 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
SamplingHistograms(const edm::ParameterSet &pset, DQMStore *, const sistrip::RunType &task=sistrip::APV_LATENCY)
std::map< unsigned int, float > delays_
static const char mlDqmClient_[]
#define LogTrace(id)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
SiStripConfigDb *const db() const
const TrackerGeometry * tracker_
const edm::ParameterSet & pset() const
DQMStore *const bei() const

◆ ~FineDelayHistosUsingDb()

FineDelayHistosUsingDb::~FineDelayHistosUsingDb ( )
override

Definition at line 40 of file FineDelayHistosUsingDb.cc.

References LogTrace, and sistrip::mlDqmClient_.

40  {
41  LogTrace(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
42  << " Destructing object...";
43 }
static const char mlDqmClient_[]
#define LogTrace(id)

Member Function Documentation

◆ computeDelays()

void FineDelayHistosUsingDb::computeDelays ( )
private

Definition at line 107 of file FineDelayHistosUsingDb.cc.

References HltBtagPostValidation_cff::c, CommissioningHistosUsingDb::cabling(), cosmic_, CommissioningHistograms::data(), phase2TrackerDigitizer_cfi::delay, delays_, relativeConstraints::empty, SiStripFedCabling::fedConnections(), SiStripFedCabling::fedIds(), TrackerGeometry::idToDetUnit(), crabWrapper::key, PV3DBase< T, PVType, FrameType >::mag(), sistrip::mlDqmClient_, GeomDet::toLocal(), DetId::Tracker, tracker_, x, y, and z.

Referenced by update().

107  {
108  // do nothing if delays_ map is already filled
109  if (!delays_.empty())
110  return;
111 
112  // the point from which track should originate
113  float x = 0.;
114  float y = 0.;
115  float z = 0.;
116  if (cosmic_) {
117  y = 385.;
118  z = 20.;
119  } // mean entry point of cosmics
120  GlobalPoint referenceP_ = GlobalPoint(x, y, z);
121  const double c = 30; // cm/ns
122 
123  // the reference parameters (best delay in ns, initial Latency)
124  float bestDelay_ = 0.;
125  if (!data().empty()) {
126  Analyses::const_iterator iter = data().begin();
127  bestDelay_ = dynamic_cast<SamplingAnalysis*>(iter->second)->maximum();
128  }
129 
130  // Retrieve FED ids from cabling
131  auto ids = cabling()->fedIds();
132 
133  // loop over the FED ids
134  for (auto ifed = ids.begin(); ifed != ids.end(); ++ifed) {
135  auto conns = cabling()->fedConnections(*ifed);
136  // loop over the connections for that FED
137  for (auto iconn = conns.begin(); iconn != conns.end(); ++iconn) {
138  // check that this is a tracker module
139  if (DetId(iconn->detId()).det() != DetId::Tracker)
140  continue;
141  // retrieve the position of that module in the tracker using the geometry
142  // and use it to compute the distance to the reference point set in the configuration
143  if (tracker_) {
144  float dist = tracker_->idToDetUnit(DetId(iconn->detId()))->toLocal(referenceP_).mag();
145  float tof = dist / c;
146  // compute the PLL delay shift for the module as delay + tof
147  float delay = bestDelay_ + tof;
148  // store that in the map
150  iconn->fecCrate(), iconn->fecSlot(), iconn->fecRing(), iconn->ccuAddr(), iconn->ccuChan(), 0)
151  .key()] = delay;
152  edm::LogVerbatim(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__
153  << "] Computed Delay to be added to PLL: " << bestDelay_ << " " << tof << " "
154  << delay << std::endl;
155  } else {
156  edm::LogError(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
157  << " Tracker geometry not initialized. Impossible to compute the delays.";
158  }
159  }
160  }
161 }
Log< level::Info, true > LogVerbatim
Analysis for latency run.
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Analyses & data(bool getMaskedData=false)
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::map< unsigned int, float > delays_
static const char mlDqmClient_[]
Log< level::Error, false > LogError
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
T mag() const
Definition: PV3DBase.h:64
SiStripFedCabling *const cabling() const
Definition: DetId.h:17
const TrackerGeometry * tracker_
FedsConstIterRange fedIds() const
ConnsConstIterRange fedConnections(uint16_t fed_id) const

◆ configure()

void FineDelayHistosUsingDb::configure ( const edm::ParameterSet pset,
const edm::EventSetup setup 
)
overridevirtual

Reimplemented from SamplingHistograms.

Definition at line 47 of file FineDelayHistosUsingDb.cc.

References SamplingHistograms::configure(), CommissioningHistosUsingDb::configure(), cosmic_, edm::ParameterSet::getParameter(), CommissioningHistograms::pset(), singleTopDQM_cfi::setup, tkGeomToken_, and tracker_.

47  {
49  tracker_ = &setup.getData(tkGeomToken_);
51  cosmic_ = this->pset().getParameter<bool>("cosmic");
52 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
void configure(const edm::ParameterSet &, const edm::EventSetup &) override
void configure(const edm::ParameterSet &, const edm::EventSetup &) override
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
const TrackerGeometry * tracker_
const edm::ParameterSet & pset() const

◆ create()

void FineDelayHistosUsingDb::create ( SiStripConfigDb::AnalysisDescriptionsV desc,
Analysis  analysis 
)
overrideprivatevirtual

Reimplemented from CommissioningHistosUsingDb.

Definition at line 311 of file FineDelayHistosUsingDb.cc.

References conversion_template_cfg::anal, CommissioningHistosUsingDb::db(), SiStripConfigDb::dbParams(), submitPVResolutionJobs::desc, SiStripDbParams::partitions(), and createJobs::tmp.

311  {
312  SamplingAnalysis* anal = dynamic_cast<SamplingAnalysis*>(analysis->second);
313  if (!anal) {
314  return;
315  }
316 
317  SiStripFecKey fec_key(anal->fecKey()); //@@ analysis->first
318  SiStripFedKey fed_key(anal->fedKey());
319 
320  FineDelayAnalysisDescription* tmp;
321  tmp = new FineDelayAnalysisDescription(anal->maximum(),
322  anal->error(),
323  0,
324  0,
325  0,
326  0,
327  0,
328  0,
329  db()->dbParams().partitions().begin()->second.partitionName(),
330  db()->dbParams().partitions().begin()->second.runNumber(),
331  anal->isValid(),
332  "",
333  fed_key.fedId(),
334  fed_key.feUnit(),
335  fed_key.feChan(),
336  fed_key.fedApv());
337 
338  // Add comments
339  typedef std::vector<std::string> Strings;
340  Strings errors = anal->getErrorCodes();
341  Strings::const_iterator istr = errors.begin();
342  Strings::const_iterator jstr = errors.end();
343  for (; istr != jstr; ++istr) {
344  tmp->addComments(*istr);
345  }
346 
347  // Store description
348  desc.push_back(tmp);
349 }
Analysis for latency run.
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
std::vector< std::string > Strings
Definition: MsgTools.h:18
const_iterator_range partitions() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
SiStripConfigDb *const db() const
Definition: errors.py:1
const SiStripDbParams & dbParams() const
tmp
align.sh
Definition: createJobs.py:716

◆ update() [1/2]

bool FineDelayHistosUsingDb::update ( SiStripConfigDb::DeviceDescriptionsRange  devices)
private

Definition at line 165 of file FineDelayHistosUsingDb.cc.

References generateTowerEtThresholdLUT::addr, SiStripFecKey::ccuAddr(), SiStripFecKey::ccuChan(), computeDelays(), CommissioningHistosUsingDb::db(), phase2TrackerDigitizer_cfi::delay, delays_, submitPVResolutionJobs::desc, SiStripConfigDb::deviceAddress(), cms::alpakatools::devices(), SiStripFecKey::fecCrate(), SiStripFecKey::fecRing(), SiStripFecKey::fecSlot(), createfilelist::int, invalid, sistrip::invalid_, 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().

165  {
166  // do the core computation of delays per FED connection
167  computeDelays();
168 
169  // Iterate through devices and update device descriptions
170  uint16_t updated = 0;
171  std::vector<SiStripFecKey> invalid;
172  SiStripConfigDb::DeviceDescriptionsV::const_iterator idevice;
173  for (idevice = devices.begin(); idevice != devices.end(); idevice++) {
174  // Check device type
175  if ((*idevice)->getDeviceType() != PLL) {
176  continue;
177  }
178 
179  // Cast to retrieve appropriate description object
180  pllDescription* desc = dynamic_cast<pllDescription*>(*idevice);
181  if (!desc) {
182  continue;
183  }
184 
185  // Retrieve device addresses from device description
187 
188  // Construct key from device description
189  uint32_t fec_key =
190  SiStripFecKey(addr.fecCrate_, addr.fecSlot_, addr.fecRing_, addr.ccuAddr_, addr.ccuChan_, 0).key();
191  SiStripFecKey fec_path = SiStripFecKey(fec_key);
192 
193  // extract the delay from the map
194  float delay = desc->getDelayCoarse() * 25 + desc->getDelayFine() * 25. / 24. + delays_[fec_key];
195  int delayCoarse = int(delay / 25);
196  int delayFine = int(round((delay - 25 * delayCoarse) * 24. / 25.));
197  if (delayFine == 24) {
198  delayFine = 0;
199  ++delayCoarse;
200  }
201  // maximum coarse setting
202  if (delayCoarse > 15) {
203  invalid.push_back(fec_key);
204  delayCoarse = sistrip::invalid_;
205  }
206 
207  // Update PLL settings
208  if (delayCoarse != sistrip::invalid_ && delayFine != sistrip::invalid_) {
209  std::stringstream ss;
210  ss << "[FineDelayHistosUsingDb::" << __func__ << "]"
211  << " Updating coarse/fine PLL settings"
212  << " for Crate/FEC/slot/ring/CCU " << fec_path.fecCrate() << "/" << fec_path.fecSlot() << "/"
213  << fec_path.fecRing() << "/" << fec_path.ccuAddr() << "/" << fec_path.ccuChan() << " from "
214  << static_cast<uint16_t>(desc->getDelayCoarse()) << "/" << static_cast<uint16_t>(desc->getDelayFine());
215  desc->setDelayCoarse(delayCoarse);
216  desc->setDelayFine(delayFine);
217  updated++;
218  ss << " to " << static_cast<uint16_t>(desc->getDelayCoarse()) << "/"
219  << static_cast<uint16_t>(desc->getDelayFine());
220  LogTrace(mlDqmClient_) << ss.str();
221 
222  } else {
223  LogTrace(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
224  << " Unexpected PLL delay settings for Crate/FEC/slot/ring/CCU " << fec_path.fecCrate()
225  << "/" << fec_path.fecSlot() << "/" << fec_path.fecRing() << "/" << fec_path.ccuAddr()
226  << "/" << fec_path.ccuChan();
227  }
228  }
229 
230  // Check if invalid settings were found
231  if (!invalid.empty()) {
232  std::stringstream ss;
233  ss << "[FineDelayHistosUsingDb::" << __func__ << "]"
234  << " Found PLL coarse setting of 15"
235  << " (not allowed!) for following channels"
236  << " (Crate/FEC/slot/ring/CCU/LLD): ";
237  std::vector<SiStripFecKey>::iterator ikey = invalid.begin();
238  std::vector<SiStripFecKey>::iterator jkey = invalid.end();
239  for (; ikey != jkey; ++ikey) {
240  ss << ikey->fecCrate() << "/" << ikey->fecSlot() << "/" << ikey->fecRing() << "/" << ikey->ccuAddr() << "/"
241  << ikey->ccuChan() << ", ";
242  }
243  edm::LogWarning(mlDqmClient_) << ss.str();
244  return false;
245  }
246 
247  edm::LogVerbatim(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
248  << " Updated PLL settings for " << updated << " modules";
249  return true;
250 }
Log< level::Info, true > LogVerbatim
const uint16_t & ccuAddr() const
const uint16_t & ccuChan() const
std::map< unsigned int, float > delays_
static const char mlDqmClient_[]
#define LogTrace(id)
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
SiStripConfigDb *const db() const
const uint32_t & key() const
Definition: SiStripKey.h:120
DeviceAddress deviceAddress(const deviceDescription &)
static const uint16_t invalid_
Definition: Constants.h:16
const uint16_t & fecSlot() const
std::vector< alpaka::Dev< TPlatform > > const & devices()
Definition: devices.h:35
Log< level::Warning, false > LogWarning
const uint16_t & fecRing() const
const uint16_t & fecCrate() const

◆ update() [2/2]

void FineDelayHistosUsingDb::update ( SiStripConfigDb::FedDescriptionsRange  feds)
private

Definition at line 254 of file FineDelayHistosUsingDb.cc.

References CommissioningHistosUsingDb::cabling(), computeDelays(), phase2TrackerDigitizer_cfi::delay, delays_, SiStripFedCabling::fedConnections(), SiStripFedCabling::fedIds(), l1tstage2emulator_dqm_sourceclient-live_cfg::feds, spr::find(), createfilelist::int, crabWrapper::key, LogTrace, sistrip::mlDqmClient_, contentValuesCheck::ss, and DetId::Tracker.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

254  {
255  // do the core computation of delays per FED connection
256  computeDelays();
257 
258  // Retrieve FED ids from cabling
259  auto ids = cabling()->fedIds();
260 
261  // loop over the FED ids
262  for (SiStripConfigDb::FedDescriptionsV::const_iterator ifed = feds.begin(); ifed != feds.end(); ifed++) {
263  // If FED id not found in list (from cabling), then continue
264  if (find(ids.begin(), ids.end(), (*ifed)->getFedId()) == ids.end()) {
265  continue;
266  }
267  auto conns = cabling()->fedConnections((*ifed)->getFedId());
268  // loop over the connections for that FED
269  for (auto iconn = conns.begin(); iconn != conns.end(); iconn++) {
270  // check that this is a tracker module
271  if (DetId(iconn->detId()).det() != DetId::Tracker)
272  continue;
273  // build the Fed9UAddress for that channel. Used to update the description.
274  Fed9U::Fed9UAddress fedChannel = Fed9U::Fed9UAddress(iconn->fedCh());
275  // retreive the current value for the delays
276  int fedDelayCoarse = (*ifed)->getCoarseDelay(fedChannel);
277  int fedDelayFine = (*ifed)->getFineDelay(fedChannel);
278  int fedDelay = int(fedDelayCoarse * 25. - fedDelayFine * 24. / 25.);
279  // extract the delay from the map
280  int delay = int(round(
282  iconn->fecCrate(), iconn->fecSlot(), iconn->fecRing(), iconn->ccuAddr(), iconn->ccuChan(), 0)
283  .key()]));
284  // compute the FED delay
285  // this is done by substracting the best (PLL) delay to the present value (from the db)
286  fedDelay -= delay;
287  fedDelayCoarse = (fedDelay / 25) + 1;
288  fedDelayFine = fedDelayCoarse * 25 - fedDelay;
289  if (fedDelayFine == 25) {
290  fedDelayFine = 0;
291  --fedDelayCoarse;
292  }
293  // update the FED delay
294  std::stringstream ss;
295  ss << "[FineDelayHistosUsingDb::" << __func__ << "]"
296  << " Updating the FED delay"
297  << " for loop FED id/ch " << (*ifed)->getFedId() << "/" << iconn->fedCh() << " from "
298  << (*ifed)->getCoarseDelay(fedChannel) << "/" << (*ifed)->getFineDelay(fedChannel) << " to ";
299  (*ifed)->setDelay(fedChannel, fedDelayCoarse, fedDelayFine);
300  ss << (*ifed)->getCoarseDelay(fedChannel) << "/" << (*ifed)->getFineDelay(fedChannel) << std::endl;
301  LogTrace(mlDqmClient_) << ss.str();
302  }
303  }
304 
305  edm::LogVerbatim(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
306  << " Updated FED delay for " << ids.size() << " FEDs!";
307 }
Log< level::Info, true > LogVerbatim
std::map< unsigned int, float > delays_
static const char mlDqmClient_[]
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
#define LogTrace(id)
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
SiStripFedCabling *const cabling() const
Definition: DetId.h:17
FedsConstIterRange fedIds() const
ConnsConstIterRange fedConnections(uint16_t fed_id) const

◆ uploadConfigurations()

void FineDelayHistosUsingDb::uploadConfigurations ( )
overridevirtual

Reimplemented from CommissioningHistosUsingDb.

Definition at line 56 of file FineDelayHistosUsingDb.cc.

References SiStripConfigDb::clearDeviceDescriptions(), SiStripConfigDb::clearFedDescriptions(), CommissioningHistosUsingDb::db(), cms::alpakatools::devices(), CommissioningHistosUsingDb::doUploadConf(), l1tstage2emulator_dqm_sourceclient-live_cfg::feds, SiStripConfigDb::getDeviceDescriptions(), SiStripConfigDb::getFedDescriptions(), LogTrace, sistrip::mlDqmClient_, update(), alcaDQMUpload::upload(), SiStripConfigDb::uploadDeviceDescriptions(), and SiStripConfigDb::uploadFedDescriptions().

56  {
57  if (!db()) {
58  edm::LogWarning(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
59  << " NULL pointer to SiStripConfigDb interface!"
60  << " Aborting upload...";
61  return;
62  }
63 
64  // Retrieve and update PLL device descriptions
67  bool upload = update(devices);
68 
69  // Check if new PLL settings are valid
70  if (!upload) {
71  edm::LogWarning(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
72  << " Found invalid PLL settings (coarse > 15)"
73  << " Aborting update to database...";
74  return;
75  }
76 
77  // Upload PLL device descriptions
78  if (doUploadConf()) {
79  LogTrace(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
80  << " Uploading PLL settings to DB...";
82  LogTrace(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
83  << " Upload of PLL settings to DB finished!";
84  } else {
85  edm::LogWarning(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
86  << " TEST only! No PLL settings will be uploaded to DB...";
87  }
88 
89  // Update FED descriptions with new ticker thresholds
92  update(feds);
93 
94  // Update FED descriptions with new ticker thresholds
95  if (doUploadConf()) {
96  LogTrace(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
97  << " Uploading FED ticker thresholds to DB...";
99  LogTrace(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
100  << " Upload of FED ticker thresholds to DB finished!";
101  } else {
102  edm::LogWarning(mlDqmClient_) << "[FineDelayHistosUsingDb::" << __func__ << "]"
103  << " TEST only! No FED ticker thresholds will be uploaded to DB...";
104  }
105 }
def upload(url, args, files)
FedDescriptionsRange getFedDescriptions(std::string partition="")
FedDescriptions::range FedDescriptionsRange
static const char mlDqmClient_[]
void clearDeviceDescriptions(std::string partition="")
#define LogTrace(id)
SiStripConfigDb *const db() const
DeviceDescriptions::range DeviceDescriptionsRange
bool update(SiStripConfigDb::DeviceDescriptionsRange)
void uploadFedDescriptions(std::string partition="")
std::vector< alpaka::Dev< TPlatform > > const & devices()
Definition: devices.h:35
void clearFedDescriptions(std::string partition="")
DeviceDescriptionsRange getDeviceDescriptions(std::string partition="")
Log< level::Warning, false > LogWarning
void uploadDeviceDescriptions(std::string partition="")

Member Data Documentation

◆ cosmic_

bool FineDelayHistosUsingDb::cosmic_
private

Definition at line 42 of file FineDelayHistosUsingDb.h.

Referenced by computeDelays(), and configure().

◆ delays_

std::map<unsigned int, float> FineDelayHistosUsingDb::delays_
private

Definition at line 37 of file FineDelayHistosUsingDb.h.

Referenced by computeDelays(), and update().

◆ tkGeomToken_

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> FineDelayHistosUsingDb::tkGeomToken_
private

Definition at line 39 of file FineDelayHistosUsingDb.h.

Referenced by configure().

◆ tracker_

const TrackerGeometry* FineDelayHistosUsingDb::tracker_
private

Definition at line 40 of file FineDelayHistosUsingDb.h.

Referenced by computeDelays(), and configure().