CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
ApvTimingHistosUsingDb Class Reference

#include <ApvTimingHistosUsingDb.h>

Inheritance diagram for ApvTimingHistosUsingDb:
CommissioningHistosUsingDb ApvTimingHistograms CommissioningHistograms CommissioningHistograms

Public Member Functions

 ApvTimingHistosUsingDb (const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const, edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken)
 
void uploadConfigurations () override
 
 ~ApvTimingHistosUsingDb () override
 
- Public Member Functions inherited from CommissioningHistosUsingDb
 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
 
- 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 ApvTimingHistograms
 ApvTimingHistograms (const edm::ParameterSet &pset, DQMStore *)
 
void histoAnalysis (bool debug) override
 
 ~ApvTimingHistograms () override
 

Private Member Functions

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

Private Attributes

bool allowSelectiveUpload_
 
bool skipFecUpdate_
 
bool skipFedUpdate_
 

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,
Histos
HistosMap
 
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 8 of file ApvTimingHistosUsingDb.h.

Constructor & Destructor Documentation

ApvTimingHistosUsingDb::ApvTimingHistosUsingDb ( const edm::ParameterSet pset,
DQMStore bei,
SiStripConfigDb * const  db,
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd tTopoToken 
)

Definition at line 14 of file ApvTimingHistosUsingDb.cc.

References allowSelectiveUpload_, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), LogTrace, sistrip::mlDqmClient_, CommissioningHistograms::pset(), skipFecUpdate_, and skipFedUpdate_.

18  : CommissioningHistograms(pset.getParameter<edm::ParameterSet>("ApvTimingParameters"), bei, sistrip::APV_TIMING),
20  ApvTimingHistograms(pset.getParameter<edm::ParameterSet>("ApvTimingParameters"), bei) {
21  LogTrace(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
22  << " Constructing object...";
23  skipFecUpdate_ = this->pset().getParameter<bool>("SkipFecUpdate");
24  skipFedUpdate_ = this->pset().getParameter<bool>("SkipFedUpdate");
25  if (skipFecUpdate_)
26  LogTrace(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
27  << " Skipping update of FEC parameters.";
28  if (skipFedUpdate_)
29  LogTrace(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
30  << " Skipping update of FED parameters.";
31 
33  this->pset().existsAs<bool>("doSelectiveUpload") ? this->pset().getParameter<bool>("doSelectiveUpload") : false;
35  LogTrace(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
36  << " Enabling selective update of FED parameters.";
37 }
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
const edm::ParameterSet & pset() const
static const char mlDqmClient_[]
#define LogTrace(id)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ApvTimingHistograms(const edm::ParameterSet &pset, DQMStore *)
ApvTimingHistosUsingDb::~ApvTimingHistosUsingDb ( )
override

Definition at line 41 of file ApvTimingHistosUsingDb.cc.

References LogTrace, and sistrip::mlDqmClient_.

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

Member Function Documentation

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

Reimplemented from CommissioningHistosUsingDb.

Definition at line 320 of file ApvTimingHistosUsingDb.cc.

References ApvTimingAnalysis::base(), CommissioningHistosUsingDb::db(), SiStripConfigDb::dbParams(), ApvTimingAnalysis::delay(), CommissioningAnalysis::fecKey(), CommissioningAnalysis::fedKey(), ApvTimingAnalysis::frameFindingThreshold(), CommissioningAnalysis::getErrorCodes(), ApvTimingAnalysis::height(), SiStripFecKey::i2cAddr(), ApvTimingAnalysis::isValid(), ApvTimingAnalysis::optimumSamplingPoint(), SiStripDbParams::partitions(), ApvTimingAnalysis::peak(), ApvTimingAnalysis::refTime(), ApvTimingAnalysis::tickMarkHeightThreshold_, ApvTimingAnalysis::time(), and createJobs::tmp.

320  {
321  ApvTimingAnalysis* anal = dynamic_cast<ApvTimingAnalysis*>(analysis->second);
322  if (!anal) {
323  return;
324  }
325 
326  SiStripFecKey fec_key(anal->fecKey());
327  SiStripFedKey fed_key(anal->fedKey());
328 
329  for (uint16_t iapv = 0; iapv < 2; ++iapv) {
330  // std::stringstream ss;
331  // if ( anal->isValid() ) { ss << " TEST VALID "; }
332  // else { ss << " TEST INVALID "; }
333  // ss << std::hex << anal->fecKey() << std::dec << " "
334  // << anal->base() << " "
335  // << anal->peak() << " "
336  // << anal->height() << " "
337  // << ( anal->base() + anal->height() * ApvTimingAnalysis::frameFindingThreshold_ ) << " "
338  // << anal->frameFindingThreshold();
339  // edm::LogError("TEST") << ss.str();
340 
341  // Create description
342  TimingAnalysisDescription* tmp;
343  tmp = new TimingAnalysisDescription(anal->time(),
344  anal->refTime(),
345  anal->delay(),
346  anal->height(),
347  anal->base(),
348  anal->peak(),
349  anal->frameFindingThreshold(),
350  anal->optimumSamplingPoint(),
352  true, //@@ APV timing analysis (not FED timing)
353  fec_key.fecCrate(),
354  fec_key.fecSlot(),
355  fec_key.fecRing(),
356  fec_key.ccuAddr(),
357  fec_key.ccuChan(),
358  SiStripFecKey::i2cAddr(fec_key.lldChan(), !iapv),
359  db()->dbParams().partitions().begin()->second.partitionName(),
360  db()->dbParams().partitions().begin()->second.runNumber(),
361  anal->isValid(),
362  "",
363  fed_key.fedId(),
364  fed_key.feUnit(),
365  fed_key.feChan(),
366  fed_key.fedApv());
367 
368  // Add comments
369  typedef std::vector<std::string> Strings;
370  Strings errors = anal->getErrorCodes();
371  Strings::const_iterator istr = errors.begin();
372  Strings::const_iterator jstr = errors.end();
373  for (; istr != jstr; ++istr) {
374  tmp->addComments(*istr);
375  }
376 
377  // Store description
378  desc.push_back(tmp);
379  }
380 }
const uint32_t & fedKey() const
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 float & refTime() const
static const float tickMarkHeightThreshold_
const float & optimumSamplingPoint() const
const uint16_t & i2cAddr() const
const float & base() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
const_iterator_range partitions() const
bool isValid() const override
const uint32_t & fecKey() const
const float & peak() const
const float & time() const
const float & delay() const
uint16_t frameFindingThreshold() const
const SiStripDbParams & dbParams() const
SiStripConfigDb *const db() const
tmp
align.sh
Definition: createJobs.py:716
Analysis for timing run using APV tick marks.
const VString & getErrorCodes() const
const float & height() const
bool ApvTimingHistosUsingDb::update ( SiStripConfigDb::DeviceDescriptionsRange  devices)
private

Definition at line 113 of file ApvTimingHistosUsingDb.cc.

References generateTowerEtThresholdLUT::addr, allowSelectiveUpload_, SiStripFecKey::ccuAddr(), SiStripConfigDb::DeviceAddress::ccuAddr_, SiStripFecKey::ccuChan(), SiStripConfigDb::DeviceAddress::ccuChan_, SiStripKey::channel(), sistrip::CHANS_PER_LLD, CommissioningHistograms::data(), CommissioningHistosUsingDb::db(), ApvTimingAnalysis::delay(), submitPVResolutionJobs::desc, SiStripConfigDb::deviceAddress(), CommissioningHistosUsingDb::deviceIsPresent(), SiStripFecKey::fecCrate(), SiStripConfigDb::DeviceAddress::fecCrate_, SiStripFecKey::fecRing(), SiStripConfigDb::DeviceAddress::fecRing_, SiStripFecKey::fecSlot(), SiStripConfigDb::DeviceAddress::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().

113  {
114  // Iterate through devices and update device descriptions
115  uint16_t updated = 0;
116  std::vector<SiStripFecKey> invalid;
117  SiStripConfigDb::DeviceDescriptionsV::const_iterator idevice;
118 
119  for (idevice = devices.begin(); idevice != devices.end(); idevice++) {
120  // Check device type
121  if ((*idevice)->getDeviceType() != PLL) {
122  continue;
123  }
124 
125  // Cast to retrieve appropriate description object
126  pllDescription* desc = dynamic_cast<pllDescription*>(*idevice);
127  if (!desc) {
128  continue;
129  }
130 
131  // Retrieve device addresses from device description
133  SiStripFecKey fec_path;
134 
135  // PLL delay settings
136  uint32_t coarse = sistrip::invalid_;
137  uint32_t fine = sistrip::invalid_;
138 
139  // Iterate through LLD channels
140  for (uint16_t ichan = 0; ichan < sistrip::CHANS_PER_LLD; ichan++) {
141  // Construct key from device description
142  SiStripFecKey fec_key(addr.fecCrate_, addr.fecSlot_, addr.fecRing_, addr.ccuAddr_, addr.ccuChan_, ichan + 1);
143  fec_path = fec_key;
144 
145  // Locate appropriate analysis object
146  Analyses::const_iterator iter = data(allowSelectiveUpload_).find(fec_key.key());
147  if (iter != data(allowSelectiveUpload_).end()) {
148  ApvTimingAnalysis* anal = dynamic_cast<ApvTimingAnalysis*>(iter->second);
149  if (!anal) {
150  edm::LogError(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
151  << " NULL pointer to analysis object!";
152  continue;
153  }
154 
155  // Calculate coarse and fine delays
156  int32_t delay = static_cast<int32_t>(rint(anal->delay()) * 24. / 25);
157  // first set course delay
158  coarse = static_cast<uint16_t>(desc->getDelayCoarse() + (delay / 24)) +
159  (static_cast<uint16_t>(desc->getDelayFine()) + (delay % 24)) / 24;
160  delay = delay % 24; // only bother with fine delay now
161  if ((static_cast<uint16_t>(desc->getDelayFine()) + delay) % 24 < 0) {
162  coarse -= 1;
163  delay += 24;
164  }
165  fine = (static_cast<uint16_t>(desc->getDelayFine()) + delay) % 24;
166 
167  // Record PPLs maximum coarse setting
168  if (coarse > 15) {
169  invalid.push_back(fec_key);
170  }
171 
172  } else {
173  if (deviceIsPresent(fec_key)) {
174  edm::LogWarning(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
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();
179  }
180  }
181 
182  // Exit LLD channel loop if coarse and fine delays are known
183  if (coarse != sistrip::invalid_ && fine != sistrip::invalid_) {
184  break;
185  }
186 
187  } // lld channel loop
188 
189  // Update PLL settings
190  if (coarse != sistrip::invalid_ && fine != sistrip::invalid_) {
191  std::stringstream ss;
192  if (edm::isDebugEnabled()) {
193  ss << "[ApvTimingHistosUsingDb::" << __func__ << "]"
194  << " Updating coarse/fine PLL settings"
195  << " for crate/FEC/ring/CCU/module " << fec_path.fecCrate() << "/" << fec_path.fecSlot() << "/"
196  << fec_path.fecRing() << "/" << fec_path.ccuAddr() << "/" << fec_path.ccuChan() << " from "
197  << static_cast<uint16_t>(desc->getDelayCoarse()) << "/" << static_cast<uint16_t>(desc->getDelayFine());
198  }
199  desc->setDelayCoarse(coarse);
200  desc->setDelayFine(fine);
201  updated++;
202  if (edm::isDebugEnabled()) {
203  ss << " to " << static_cast<uint16_t>(desc->getDelayCoarse()) << "/"
204  << static_cast<uint16_t>(desc->getDelayFine());
205  LogTrace(mlDqmClient_) << ss.str();
206  }
207 
208  } else {
209  edm::LogWarning(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
210  << " Invalid PLL delay settings course/fine = " << coarse << "/" << fine
211  << " for crate/FEC/ring/CCU/module " << fec_path.fecCrate() << "/"
212  << fec_path.fecSlot() << "/" << fec_path.fecRing() << "/" << fec_path.ccuAddr()
213  << "/" << fec_path.ccuChan();
214  }
215  }
216 
217  // Check if invalid settings were found
218  if (!invalid.empty()) {
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() << "/"
225  << invalid.front().ccuChan() << "/" << invalid.front().channel();
226  edm::LogWarning(mlDqmClient_) << ss.str();
227  return false;
228  }
229 
230  edm::LogVerbatim(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
231  << " Updated PLL settings for " << updated << " modules";
232  return true;
233 }
Log< level::Info, true > LogVerbatim
bool isDebugEnabled()
Analyses & data(bool getMaskedData=false)
const uint16_t & fecRing() const
bool deviceIsPresent(const SiStripFecKey &)
static const char mlDqmClient_[]
const uint16_t & fecSlot() const
Log< level::Error, false > LogError
#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
static const uint16_t CHANS_PER_LLD
DeviceAddress deviceAddress(const deviceDescription &)
const float & delay() const
const uint16_t & fecCrate() const
const uint16_t & ccuAddr() const
static const uint16_t invalid_
Definition: Constants.h:16
const uint16_t & ccuChan() const
SiStripConfigDb *const db() const
Log< level::Warning, false > LogWarning
Analysis for timing run using APV tick marks.
void ApvTimingHistosUsingDb::update ( SiStripConfigDb::FedDescriptionsRange  feds)
private

Definition at line 237 of file ApvTimingHistosUsingDb.cc.

References generateTowerEtThresholdLUT::addr, allowSelectiveUpload_, ApvTimingAnalysis::base(), CommissioningHistosUsingDb::cabling(), FedChannelConnection::ccuAddr(), FedChannelConnection::ccuChan(), getInfo::conn, CommissioningHistograms::data(), TauDecayModes::dec, CommissioningHistosUsingDb::deviceIsPresent(), FedChannelConnection::fecCrate(), SiStripFedKey::feChan(), FedChannelConnection::fecRing(), FedChannelConnection::fecSlot(), FedChannelConnection::fedCh(), sistrip::FEDCH_PER_FED, SiStripFedKey::fedChannel(), SiStripFedCabling::fedConnection(), SiStripFedKey::fedId(), FedChannelConnection::fedId(), SiStripFedCabling::fedIds(), SiStripFedKey::feUnit(), spr::find(), ApvTimingAnalysis::frameFindingThreshold(), ApvTimingAnalysis::height(), sistrip::invalid_, ApvTimingAnalysis::isValid(), SiStripKey::key(), FedChannelConnection::lldChannel(), sistrip::mlDqmClient_, ApvTimingAnalysis::peak(), ApvTimingAnalysis::print(), 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().

237  {
238  // Retrieve FED ids from cabling
239  auto ids = cabling()->fedIds();
240 
241  // Iterate through feds and update fed descriptions
242  uint16_t updated = 0;
243  for (auto ifed = feds.begin(); ifed != feds.end(); ++ifed) {
244  // If FED id not found in list (from cabling), then continue
245  if (find(ids.begin(), ids.end(), (*ifed)->getFedId()) == ids.end()) {
246  continue;
247  }
248 
249  for (uint16_t ichan = 0; ichan < sistrip::FEDCH_PER_FED; ichan++) {
250  // Build FED and FEC keys
251  const FedChannelConnection& conn = cabling()->fedConnection((*ifed)->getFedId(), ichan);
252  if (conn.fecCrate() == sistrip::invalid_ || conn.fecSlot() == sistrip::invalid_ ||
253  conn.fecRing() == sistrip::invalid_ || conn.ccuAddr() == sistrip::invalid_ ||
254  conn.ccuChan() == sistrip::invalid_ || conn.lldChannel() == sistrip::invalid_) {
255  continue;
256  }
257  SiStripFedKey fed_key(conn.fedId(), SiStripFedKey::feUnit(conn.fedCh()), SiStripFedKey::feChan(conn.fedCh()));
258  SiStripFecKey fec_key(
259  conn.fecCrate(), conn.fecSlot(), conn.fecRing(), conn.ccuAddr(), conn.ccuChan(), conn.lldChannel());
260 
261  // Locate appropriate analysis object
262  Analyses::const_iterator iter = data(allowSelectiveUpload_).find(fec_key.key());
263  if (iter != data(allowSelectiveUpload_).end()) {
264  ApvTimingAnalysis* anal = dynamic_cast<ApvTimingAnalysis*>(iter->second);
265  if (!anal) {
266  edm::LogError(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
267  << " NULL pointer to analysis object!";
268  continue;
269  }
270 
271  // Update frame finding threshold
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());
276  updated++;
277  }
278  uint16_t new_threshold = static_cast<uint16_t>((*ifed)->getFrameThreshold(addr));
279 
280  // Debug
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();
287  } else {
288  ss << " Cannot update the frame-finding threshold"
289  << " from " << old_threshold << " to a new value using invalid analysis ";
290  }
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();
294  anal->print(ss);
295  //LogTrace(mlDqmClient_) << ss.str();
296 
297  } else {
298  if (deviceIsPresent(fec_key)) {
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();
307  edm::LogWarning(mlDqmClient_) << ss.str();
308  }
309  }
310  }
311  }
312 
313  edm::LogVerbatim(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
314  << " Updated ticker thresholds for " << updated << " channels on " << ids.size()
315  << " FEDs!";
316 }
const uint16_t & fecSlot() const
Log< level::Info, true > LogVerbatim
const uint16_t & fecCrate() const
Analyses & data(bool getMaskedData=false)
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
A container class for generic run and event-related info, information required by the commissioning a...
Definition: SiStripFedKey.h:56
const uint16_t & fedCh() const
bool deviceIsPresent(const SiStripFecKey &)
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)
Definition: FindCaloHit.cc:19
const uint16_t & fedId() const
const float & base() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
const uint16_t & fecRing() const
Class containning control, module, detector and connection information, at the level of a FED channel...
FedsConstIterRange fedIds() const
bool isValid() const override
const uint16_t & ccuChan() const
void print(std::stringstream &, uint32_t not_used=0) override
const float & peak() const
const uint16_t & ccuAddr() const
uint16_t frameFindingThreshold() const
const uint16_t & feUnit() const
static const uint16_t invalid_
Definition: Constants.h:16
static const uint16_t FEDCH_PER_FED
const uint16_t & feChan() const
tuple conn
Definition: getInfo.py:9
Log< level::Warning, false > LogWarning
Analysis for timing run using APV tick marks.
SiStripFedCabling *const cabling() const
const float & height() const
void ApvTimingHistosUsingDb::uploadConfigurations ( )
overridevirtual

Reimplemented from CommissioningHistosUsingDb.

Definition at line 48 of file ApvTimingHistosUsingDb.cc.

References CommissioningHistosUsingDb::db(), CommissioningHistosUsingDb::doUploadConf(), unpackBuffers-CaloStage1::feds, SiStripConfigDb::getDeviceDescriptions(), SiStripConfigDb::getFedDescriptions(), LogTrace, sistrip::mlDqmClient_, skipFecUpdate_, skipFedUpdate_, update(), alcaDQMUpload::upload(), SiStripConfigDb::uploadDeviceDescriptions(), and SiStripConfigDb::uploadFedDescriptions().

48  {
49  LogTrace(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]";
50 
51  if (!db()) {
52  edm::LogError(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
53  << " NULL pointer to SiStripConfigDb interface!"
54  << " Aborting upload...";
55  return;
56  }
57 
58  if (!skipFecUpdate_) {
59  // Retrieve and update PLL device descriptions
61  bool upload = update(devices);
62 
63  // Check if new PLL settings are valid
64  if (!upload) {
65  edm::LogError(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
66  << " Found invalid PLL settings (coarse > 15)"
67  << " Aborting update to database...";
68  return;
69  }
70 
71  // Upload PLL device descriptions
72  if (doUploadConf()) {
73  edm::LogVerbatim(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
74  << " Uploading PLL settings to DB...";
76  edm::LogVerbatim(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
77  << " Upload of PLL settings to DB finished!";
78  } else {
79  edm::LogWarning(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
80  << " TEST only! No PLL settings will be uploaded to DB...";
81  }
82 
83  } else {
84  LogTrace(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
85  << " No upload of PLL settings to DB, as defined by .cfg file!";
86  }
87 
88  if (!skipFedUpdate_) {
89  // Update FED descriptions with new ticker thresholds
91  update(feds);
92 
93  // Update FED descriptions with new ticker thresholds
94  if (doUploadConf()) {
95  edm::LogVerbatim(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
96  << " Uploading FED ticker thresholds to DB...";
98  edm::LogVerbatim(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
99  << " Upload of FED ticker thresholds to DB finished!";
100  } else {
101  edm::LogWarning(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
102  << " TEST only! No FED ticker thresholds will be uploaded to DB...";
103  }
104 
105  } else {
106  LogTrace(mlDqmClient_) << "[ApvTimingHistosUsingDb::" << __func__ << "]"
107  << " No Upload of FED ticker thresholds to DB, as defined by .cfg file!";
108  }
109 }
Log< level::Info, true > LogVerbatim
FedDescriptionsRange getFedDescriptions(std::string partition="")
FedDescriptions::range FedDescriptionsRange
static const char mlDqmClient_[]
Log< level::Error, false > LogError
bool update(SiStripConfigDb::DeviceDescriptionsRange)
#define LogTrace(id)
DeviceDescriptions::range DeviceDescriptionsRange
void uploadFedDescriptions(std::string partition="")
SiStripConfigDb *const db() const
DeviceDescriptionsRange getDeviceDescriptions(std::string partition="")
Log< level::Warning, false > LogWarning
void uploadDeviceDescriptions(std::string partition="")

Member Data Documentation

bool ApvTimingHistosUsingDb::allowSelectiveUpload_
private

Definition at line 31 of file ApvTimingHistosUsingDb.h.

Referenced by ApvTimingHistosUsingDb(), and update().

bool ApvTimingHistosUsingDb::skipFecUpdate_
private

Definition at line 27 of file ApvTimingHistosUsingDb.h.

Referenced by ApvTimingHistosUsingDb(), and uploadConfigurations().

bool ApvTimingHistosUsingDb::skipFedUpdate_
private

Definition at line 29 of file ApvTimingHistosUsingDb.h.

Referenced by ApvTimingHistosUsingDb(), and uploadConfigurations().