CMS 3D CMS Logo

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

#include <LatencyHistosUsingDb.h>

Inheritance diagram for LatencyHistosUsingDb:
CommissioningHistosUsingDb SamplingHistograms CommissioningHistograms CommissioningHistograms

Public Member Functions

void configure (const edm::ParameterSet &, const edm::EventSetup &) override
 
 LatencyHistosUsingDb (const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const )
 
void uploadConfigurations () override
 
 ~LatencyHistosUsingDb () override
 
- Public Member Functions inherited from CommissioningHistosUsingDb
 CommissioningHistosUsingDb (SiStripConfigDb *const, 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 create (SiStripConfigDb::AnalysisDescriptionsV &, Analysis) override
 
bool update (SiStripConfigDb::DeviceDescriptionsRange, SiStripConfigDb::FedDescriptionsRange)
 

Private Attributes

bool perPartition_
 

Additional Inherited Members

- Public Types inherited from CommissioningHistograms
typedef std::map< uint32_t, CommissioningAnalysis * > Analyses
 
typedef Analyses::iterator Analysis
 
typedef SummaryPlotFactory< CommissioningAnalysis * > Factory
 
typedef std::map< uint32_t, uint32_t > FedToFecMap
 
typedef std::vector< Histo * > Histos
 
typedef std::map< uint32_t, HistosHistosMap
 
- Static Public Member Functions inherited from CommissioningHistograms
static void copyCustomInformation (DQMStore *const, const std::vector< std::string > &)
 
static void getContents (DQMStore *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::auto_ptr< Factoryfactory_
 

Detailed Description

Definition at line 12 of file LatencyHistosUsingDb.h.

Constructor & Destructor Documentation

LatencyHistosUsingDb::LatencyHistosUsingDb ( const edm::ParameterSet pset,
DQMStore bei,
SiStripConfigDb * const  db 
)

Definition at line 15 of file LatencyHistosUsingDb.cc.

References LogTrace, and sistrip::mlDqmClient_.

18  : CommissioningHistograms( pset.getParameter<edm::ParameterSet>("LatencyParameters"),
19  bei,
23  SamplingHistograms( pset.getParameter<edm::ParameterSet>("LatencyParameters"),
24  bei,
26 {
28  << "[LatencyHistosUsingDb::" << __func__ << "]"
29  << " Constructing object...";
30 }
T getParameter(std::string const &) const
SamplingHistograms(const edm::ParameterSet &pset, DQMStore *, const sistrip::RunType &task=sistrip::APV_LATENCY)
static const char mlDqmClient_[]
#define LogTrace(id)
DQMStore *const bei() const
LatencyHistosUsingDb::~LatencyHistosUsingDb ( )
override

Definition at line 34 of file LatencyHistosUsingDb.cc.

References LogTrace, and sistrip::mlDqmClient_.

34  {
36  << "[LatencyHistosUsingDb::" << __func__ << "]"
37  << " Destructing object...";
38 }
static const char mlDqmClient_[]
#define LogTrace(id)

Member Function Documentation

void LatencyHistosUsingDb::configure ( const edm::ParameterSet pset,
const edm::EventSetup es 
)
overridevirtual

Reimplemented from SamplingHistograms.

Definition at line 382 of file LatencyHistosUsingDb.cc.

References CommissioningHistosUsingDb::configure(), edm::ParameterSet::getParameter(), perPartition_, and CommissioningHistograms::pset().

383 {
385  perPartition_ = this->pset().getParameter<bool>("OptimizePerPartition");
386 }
T getParameter(std::string const &) const
const edm::ParameterSet & pset() const
void configure(const edm::ParameterSet &, const edm::EventSetup &) override
void LatencyHistosUsingDb::create ( SiStripConfigDb::AnalysisDescriptionsV desc,
Analysis  analysis 
)
overrideprivatevirtual

Reimplemented from CommissioningHistosUsingDb.

Definition at line 342 of file LatencyHistosUsingDb.cc.

References begin, CommissioningHistosUsingDb::db(), SiStripConfigDb::dbParams(), CommissioningAnalysis::fecKey(), CommissioningAnalysis::fedKey(), CommissioningAnalysis::getErrorCodes(), CommissioningAnalysis::isValid(), hcaltpdigi_cfi::latency, SamplingAnalysis::maximum(), SiStripDbParams::partitions(), edm::second(), and tmp.

343  {
344 
345  SamplingAnalysis* anal = dynamic_cast<SamplingAnalysis*>( analysis->second );
346  if ( !anal ) { return; }
347 
348  SiStripFecKey fec_key( anal->fecKey() ); //@@ analysis->first
349  SiStripFedKey fed_key( anal->fedKey() );
350 
351  uint16_t latency = static_cast<uint16_t>( ( anal->maximum() / (-25.) ) + 0.5 );
352 
353  ApvLatencyAnalysisDescription* tmp;
354  tmp = new ApvLatencyAnalysisDescription( latency,
355  0,
356  0,
357  0,
358  0,
359  0,
360  0,
361  db()->dbParams().partitions().begin()->second.partitionName(),
362  db()->dbParams().partitions().begin()->second.runNumber(),
363  anal->isValid(),
364  "",
365  fed_key.fedId(),
366  fed_key.feUnit(),
367  fed_key.feChan(),
368  fed_key.fedApv() );
369 
370  // Add comments
371  typedef std::vector<std::string> Strings;
372  Strings errors = anal->getErrorCodes();
373  Strings::const_iterator istr = errors.begin();
374  Strings::const_iterator jstr = errors.end();
375  for ( ; istr != jstr; ++istr ) { tmp->addComments( *istr ); }
376 
377  // Store description
378  desc.push_back( tmp );
379 
380 }
Analysis for latency run.
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
virtual bool isValid() const
std::vector< std::string > Strings
Definition: MsgTools.h:18
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
U second(std::pair< T, U > const &p)
const_iterator_range partitions() const
const uint32_t & fecKey() const
const SiStripDbParams & dbParams() const
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
#define begin
Definition: vmac.h:32
const float & maximum() const
Definition: errors.py:1
SiStripConfigDb *const db() const
const VString & getErrorCodes() const
latency
hardware algo
bool LatencyHistosUsingDb::update ( SiStripConfigDb::DeviceDescriptionsRange  devices,
SiStripConfigDb::FedDescriptionsRange  feds 
)
private

Definition at line 91 of file LatencyHistosUsingDb.cc.

References begin, CommissioningHistosUsingDb::cabling(), SiStripFecKey::ccuAddr(), SiStripConfigDb::DeviceAddress::ccuAddr_, SiStripFecKey::ccuChan(), SiStripConfigDb::DeviceAddress::ccuChan_, CommissioningHistograms::data(), CommissioningHistosUsingDb::db(), SiStripConfigDb::deviceAddress(), relativeConstraints::empty, SiStripFecKey::fecCrate(), SiStripConfigDb::DeviceAddress::fecCrate_, CommissioningAnalysis::fecKey(), SiStripFecKey::fecRing(), SiStripConfigDb::DeviceAddress::fecRing_, SiStripFecKey::fecSlot(), SiStripConfigDb::DeviceAddress::fecSlot_, SiStripFedCabling::fedConnections(), SiStripFedCabling::fedIds(), spr::find(), mps_fire::i, SiStripConfigDb::DeviceAddress::i2cAddr_, photons_cff::ids, createfilelist::int, align::invalid, sistrip::invalid_, SiStripKey::key(), hcaltpdigi_cfi::latency, LogTrace, MAXFEDCOARSE, SamplingAnalysis::maximum(), sistrip::mlDqmClient_, PFRecoTauDiscriminationByIsolation_cfi::offset, sistrip::PARTITION, perPartition_, edm::second(), edm::shift, DetId::Tracker, and sistrip::TRACKER.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), Vispa.Gui.PortConnection.PointToPointConnection::updateConnection(), and uploadConfigurations().

92  {
93 
94  // Obtain the latency from the analysis object
95  if(data().empty() || !data().begin()->second->isValid() ) {
97  << "[LatencyHistosUsingDb::" << __func__ << "]"
98  << " Updated NO Latency settings. No analysis result available !" ;
99  return false;
100  }
101 
102  // Compute the minimum coarse delay
103  uint16_t minCoarseDelay = 256;
104  SiStripConfigDb::DeviceDescriptionsV::const_iterator idevice;
105  for ( idevice = devices.begin(); idevice != devices.end(); idevice++ ) {
106  // Check device type
107  if ( (*idevice)->getDeviceType() == PLL ) {
108  // Cast to retrieve appropriate description object
109  pllDescription* desc = dynamic_cast<pllDescription*>( *idevice );
110  if ( desc ) {
111 /*
112  // add 1 to aim at 1 and not 0 (just to avoid a special 0 value for security)
113  int delayCoarse = desc->getDelayCoarse() - 1;
114  delayCoarse = delayCoarse < 0 ? 0 : delayCoarse;
115  minCoarseDelay = minCoarseDelay < delayCoarse ? minCoarseDelay : delayCoarse;
116 */
117  int delayCoarse = desc->getDelayCoarse();
118  minCoarseDelay = minCoarseDelay < delayCoarse ? minCoarseDelay : delayCoarse;
119  }
120  }
121  }
122 
123  // Compute latency and PLL shift from the sampling measurement
124  SamplingAnalysis* anal = nullptr;
125  for( CommissioningHistograms::Analysis it = data().begin(); it!=data().end();++it) {
126  if(dynamic_cast<SamplingAnalysis*>( it->second ) &&
127  dynamic_cast<SamplingAnalysis*>( it->second )->granularity()==sistrip::TRACKER)
128  anal = dynamic_cast<SamplingAnalysis*>( it->second );
129  }
130  if(!anal) return false;
131  uint16_t globalLatency = uint16_t(ceil(anal->maximum()/(-25.)));
132  float globalShift = anal->maximum()-(globalLatency*(-25));
133 
134  // Compute latency and PLL shift per partition... this is an option
135  uint16_t latency = globalLatency;
136  float shift[5] = {0.};
137  for( CommissioningHistograms::Analysis it = data().begin(); it!=data().end();++it) {
138  if(dynamic_cast<SamplingAnalysis*>( it->second ) &&
139  dynamic_cast<SamplingAnalysis*>( it->second )->granularity()==sistrip::PARTITION )
140  {
141  anal = dynamic_cast<SamplingAnalysis*>( it->second );
142  latency = uint16_t(ceil(anal->maximum()/(-25.)))>latency ? uint16_t(ceil(anal->maximum()/(-25.))) : latency;
143  }
144  }
145  for( CommissioningHistograms::Analysis it = data().begin(); it!=data().end();++it) {
146  if(dynamic_cast<SamplingAnalysis*>( it->second ) &&
147  dynamic_cast<SamplingAnalysis*>( it->second )->granularity()==sistrip::PARTITION )
148  {
149  anal = dynamic_cast<SamplingAnalysis*>( it->second );
150  shift[SiStripFecKey(anal->fecKey()).fecCrate()] = anal->maximum()-(latency*(-25));
151  }
152  }
153  if(!perPartition_) {
154  latency = globalLatency;
155  for(int i=0;i<5;i++) shift[i] = globalShift;
156  }
157 
158  // Take into account the minimum coarse delay to bring the coarse delay down
159  // the same quantity is subtracted to the coarse delay of each APV
160  latency -= minCoarseDelay;
161 
162  // Iterate through devices and update device descriptions
163  uint16_t updatedAPV = 0;
164  uint16_t updatedPLL = 0;
165  std::vector<SiStripFecKey> invalid;
166  for ( idevice = devices.begin(); idevice != devices.end(); idevice++ ) {
167  // Check device type
168  if ( (*idevice)->getDeviceType() != APV25 ) { continue; }
169  // Cast to retrieve appropriate description object
170  apvDescription* desc = dynamic_cast<apvDescription*>( *idevice );
171  if ( !desc ) { continue; }
172  // Retrieve device addresses from device description
173  const SiStripConfigDb::DeviceAddress& addr = db()->deviceAddress(*desc);
174  // Do it!
175  std::stringstream ss;
176  ss << "[LatencyHistosUsingDb::" << __func__ << "]"
177  << " Updating latency APV settings for crate/FEC/slot/ring/CCU/i2cAddr "
178  << addr.fecCrate_ << "/"
179  << addr.fecSlot_ << "/"
180  << addr.fecRing_ << "/"
181  << addr.ccuAddr_ << "/"
182  << addr.ccuChan_ << "/"
183  << addr.i2cAddr_
184  << " from "
185  << static_cast<uint16_t>(desc->getLatency());
186  desc->setLatency(latency);
187  ss << " to "
188  << static_cast<uint16_t>(desc->getLatency());
189  LogTrace(mlDqmClient_) << ss.str();
190  updatedAPV++;
191  }
192 
193  // Change also the PLL delay
194  for ( idevice = devices.begin(); idevice != devices.end(); idevice++ ) {
195  // Check device type
196  if ( (*idevice)->getDeviceType() != PLL ) { continue; }
197  // Cast to retrieve appropriate description object
198  pllDescription* desc = dynamic_cast<pllDescription*>( *idevice );
199  if ( !desc ) { continue; }
200  if ( desc->getDelayCoarse() >= 15 ) { continue; }
201  // Retrieve device addresses from device description
202  const SiStripConfigDb::DeviceAddress& addr = db()->deviceAddress(*desc);
203  // Construct key from device description
204  uint32_t fec_key = SiStripFecKey( addr.fecCrate_,
205  addr.fecSlot_,
206  addr.fecRing_,
207  addr.ccuAddr_,
208  addr.ccuChan_,
209  0 ).key();
210  SiStripFecKey fec_path = SiStripFecKey( fec_key );
211  // Do it!
212  float delay = desc->getDelayCoarse()*25+desc->getDelayFine()*25./24. + shift[addr.fecCrate_];
213  int delayCoarse = int(delay/25);
214  int delayFine = int(round((delay-25*delayCoarse)*24./25.));
215  if(delayFine==24) { delayFine=0; ++delayCoarse; }
216  delayCoarse -= minCoarseDelay;
217  // maximum coarse setting
218  if ( delayCoarse > 15 ) { invalid.push_back(fec_key); delayCoarse = sistrip::invalid_; }
219  // Update PLL settings
220  if ( delayCoarse != sistrip::invalid_ &&
221  delayFine != sistrip::invalid_ ) {
222  std::stringstream ss;
223  ss << "[LatencyHistosUsingDb::" << __func__ << "]"
224  << " Updating coarse/fine PLL settings"
225  << " for Crate/FEC/slot/ring/CCU "
226  << fec_path.fecCrate() << "/"
227  << fec_path.fecSlot() << "/"
228  << fec_path.fecRing() << "/"
229  << fec_path.ccuAddr() << "/"
230  << fec_path.ccuChan()
231  << " from "
232  << static_cast<uint16_t>( desc->getDelayCoarse() ) << "/"
233  << static_cast<uint16_t>( desc->getDelayFine() );
234  desc->setDelayCoarse(delayCoarse);
235  desc->setDelayFine(delayFine);
236  updatedPLL++;
237  ss << " to "
238  << static_cast<uint16_t>( desc->getDelayCoarse() ) << "/"
239  << static_cast<uint16_t>( desc->getDelayFine() );
240  LogTrace(mlDqmClient_) << ss.str();
241  }
242  }
243 
244  // Retrieve FED ids from cabling
245  auto ids = cabling()->fedIds() ;
246 
247  // loop over the FED ids to determine min and max values of coarse delay
248  uint16_t minDelay = 256;
249  uint16_t maxDelay = 0;
250  uint16_t fedDelayCoarse = 0;
251  for ( auto ifed = feds.begin(); ifed != feds.end(); ifed++ ) {
252  // If FED id not found in list (from cabling), then continue
253  if ( find( ids.begin(), ids.end(), (*ifed)->getFedId() ) == ids.end() ) { continue; }
254  auto conns = cabling()->fedConnections((*ifed)->getFedId());
255  // loop over the connections for that FED
256  for ( auto iconn = conns.begin(); iconn != conns.end(); iconn++ ) {
257  // check that this is a tracker module
258  if(DetId(iconn->detId()).det()!=DetId::Tracker) continue;
259  // build the Fed9UAddress for that channel. Used to update the description.
260  Fed9U::Fed9UAddress fedChannel = Fed9U::Fed9UAddress(iconn->fedCh());
261  // retreive the current value for the delays
262  fedDelayCoarse = (*ifed)->getCoarseDelay(fedChannel);
263  // update min and max
264  minDelay = minDelay<fedDelayCoarse ? minDelay : fedDelayCoarse;
265  maxDelay = maxDelay>fedDelayCoarse ? maxDelay : fedDelayCoarse;
266  }
267  }
268 
269  // compute the FED coarse global offset
270  int offset = (10-minDelay)*25; // try to ensure 10BX room for later fine delay scan
271  if(maxDelay+(offset/25)>MAXFEDCOARSE) offset = (MAXFEDCOARSE-maxDelay)*25; // otherwise, take the largest possible
272 
273  // loop over the FED ids
274  for ( SiStripConfigDb::FedDescriptionsV::const_iterator ifed = feds.begin(); ifed != feds.end(); ifed++ ) {
275  // If FED id not found in list (from cabling), then continue
276  if ( find( ids.begin(), ids.end(), (*ifed)->getFedId() ) == ids.end() ) { continue; }
277  auto conns = cabling()->fedConnections((*ifed)->getFedId());
278  // loop over the connections for that FED
279  for ( auto iconn = conns.begin(); iconn != conns.end(); iconn++ ) {
280  // check that this is a tracker module
281  if(DetId(iconn->detId()).det()!=DetId::Tracker) continue;
282  // build the Fed9UAddress for that channel. Used to update the description.
283  Fed9U::Fed9UAddress fedChannel = Fed9U::Fed9UAddress(iconn->fedCh());
284  // retreive the current value for the delays
285  int fedDelayCoarse = (*ifed)->getCoarseDelay(fedChannel);
286  int fedDelayFine = (*ifed)->getFineDelay(fedChannel);
287  // compute the FED delay
288  // this is done by substracting the best (PLL) delay to the present value (from the db)
289  int fedDelay = int(fedDelayCoarse*25. - fedDelayFine*24./25. - round(shift[iconn->fecCrate()]) + offset);
290  fedDelayCoarse = (fedDelay/25)+1;
291  fedDelayFine = fedDelayCoarse*25-fedDelay;
292  if(fedDelayFine==25) { fedDelayFine = 0; --fedDelayCoarse; }
293  // update the FED delay
294  std::stringstream ss;
295  ss << "[LatencyHistosUsingDb::" << __func__ << "]"
296  << " Updating the FED delay"
297  << " for loop FED id/ch "
298  << (*ifed)->getFedId() << "/" << iconn->fedCh()
299  << " from "
300  << (*ifed)->getCoarseDelay( fedChannel) << "/" << (*ifed)->getFineDelay( fedChannel)
301  << " to ";
302  (*ifed)->setDelay(fedChannel, fedDelayCoarse, fedDelayFine);
303  ss << (*ifed)->getCoarseDelay(fedChannel) << "/" << (*ifed)->getFineDelay( fedChannel);
304  LogTrace(mlDqmClient_) << ss.str();
305  }
306  }
307 
308  // Summary output
310  << "[LatencyHistosUsingDb::" << __func__ << "]"
311  << " Updated FED delays for " << ids.size() << " FEDs!";
312 
313  // Check if invalid settings were found
314  if ( !invalid.empty() ) {
315  std::stringstream ss;
316  ss << "[LatencyHistosUsingDb::" << __func__ << "]"
317  << " Found PLL coarse setting of 15"
318  << " (not allowed!) for following channels"
319  << " (Crate/FEC/slot/ring/CCU/LLD): ";
320  std::vector<SiStripFecKey>::iterator ikey = invalid.begin();
321  std::vector<SiStripFecKey>::iterator jkey = invalid.end();
322  for ( ; ikey != jkey; ++ikey ) {
323  ss << ikey->fecCrate() << "/"
324  << ikey->fecSlot() << "/"
325  << ikey->fecRing() << "/"
326  << ikey->ccuAddr() << "/"
327  << ikey->ccuChan() << ", ";
328  }
329  edm::LogWarning(mlDqmClient_) << ss.str();
330  return false;
331  }
332 
333  // Summary output
335  << "[LatencyHistosUsingDb::" << __func__ << "] "
336  << "Updated settings for " << updatedAPV << " APV devices and " << updatedPLL << " PLL devices.";
337  return true;
338 }
Analysis for latency run.
Analyses & data(bool getMaskedData=false)
const uint16_t & fecRing() const
static const char mlDqmClient_[]
const uint16_t & fecSlot() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
const uint32_t & key() const
Definition: SiStripKey.h:125
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Definition: SiStripFecKey.h:45
U second(std::pair< T, U > const &p)
#define MAXFEDCOARSE
FedsConstIterRange fedIds() const
const uint32_t & fecKey() const
DeviceAddress deviceAddress(const deviceDescription &)
#define LogTrace(id)
const uint16_t & fecCrate() const
Definition: DetId.h:18
const uint16_t & ccuAddr() const
static const uint16_t invalid_
Definition: Constants.h:16
ConnsConstIterRange fedConnections(uint16_t fed_id) const
#define begin
Definition: vmac.h:32
static unsigned int const shift
const uint16_t & ccuChan() const
const float & maximum() const
SiStripConfigDb *const db() const
SiStripFedCabling *const cabling() const
latency
hardware algo
void LatencyHistosUsingDb::uploadConfigurations ( )
overridevirtual

Reimplemented from CommissioningHistosUsingDb.

Definition at line 42 of file LatencyHistosUsingDb.cc.

References CommissioningHistosUsingDb::db(), CommissioningHistosUsingDb::doUploadConf(), SiStripConfigDb::getDeviceDescriptions(), SiStripConfigDb::getFedDescriptions(), LogTrace, sistrip::mlDqmClient_, update(), alcaDQMUpload::upload(), SiStripConfigDb::uploadDeviceDescriptions(), and SiStripConfigDb::uploadFedDescriptions().

42  {
43 
44  if ( !db() ) {
46  << "[LatencyHistosUsingDb::" << __func__ << "]"
47  << " NULL pointer to SiStripConfigDb interface!"
48  << " Aborting upload...";
49  return;
50  }
51 
54  bool upload = update( devices, feds );
55  // Check if new PLL settings are valid
56  if ( !upload ) {
58  << "[LatencyHistosUsingDb::" << __func__ << "]"
59  << " Found invalid PLL settings (coarse > 15)"
60  << " Aborting update to database...";
61  return;
62  }
63 
64  if ( doUploadConf() ) {
65  // Update APV descriptions with new Latency settings
67  << "[LatencyHistosUsingDb::" << __func__ << "]"
68  << " Uploading APV settings to DB...";
71  << "[LatencyHistosUsingDb::" << __func__ << "]"
72  << " Upload of APV settings to DB finished!";
73  // Update FED descriptions
75  << "[LatencyHistosUsingDb::" << __func__ << "]"
76  << " Uploading FED delays to DB...";
79  << "[LatencyHistosUsingDb::" << __func__ << "]"
80  << " Upload of FED delays to DB finished!";
81  } else {
83  << "[LatencyHistosUsingDb::" << __func__ << "]"
84  << " TEST only! No APV settings will be uploaded to DB...";
85  }
86 
87 }
def upload(url, args, files)
FedDescriptionsRange getFedDescriptions(std::string partition="")
bool update(SiStripConfigDb::DeviceDescriptionsRange, SiStripConfigDb::FedDescriptionsRange)
FedDescriptions::range FedDescriptionsRange
static const char mlDqmClient_[]
DeviceDescriptions::range DeviceDescriptionsRange
#define LogTrace(id)
void uploadFedDescriptions(std::string partition="")
SiStripConfigDb *const db() const
DeviceDescriptionsRange getDeviceDescriptions(std::string partition="")
void uploadDeviceDescriptions(std::string partition="")

Member Data Documentation

bool LatencyHistosUsingDb::perPartition_
private

Definition at line 33 of file LatencyHistosUsingDb.h.

Referenced by configure(), and update().