CMS 3D CMS Logo

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

#include <DaqScopeModeHistosUsingDb.h>

Inheritance diagram for DaqScopeModeHistosUsingDb:
CommissioningHistosUsingDb DaqScopeModeHistograms CommissioningHistograms CommissioningHistograms

Public Member Functions

 DaqScopeModeHistosUsingDb (const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const )
 
void uploadConfigurations () override
 
 ~DaqScopeModeHistosUsingDb () override
 
- Public Member Functions inherited from CommissioningHistosUsingDb
 CommissioningHistosUsingDb (SiStripConfigDb *const, 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 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 DaqScopeModeHistograms
 DaqScopeModeHistograms (const edm::ParameterSet &pset, DQMStore *)
 
void histoAnalysis (bool debug) override
 
void printAnalyses () override
 
 ~DaqScopeModeHistograms () override
 

Private Member Functions

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

Private Attributes

bool allowSelectiveUpload_
 
bool disableBadStrips_
 
float highThreshold_
 
bool keepStripsDisabled_
 
float lowThreshold_
 
bool skipPedestalUpdate_
 
bool skipTickUpdate_
 

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 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 7 of file DaqScopeModeHistosUsingDb.h.

Constructor & Destructor Documentation

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

Definition at line 12 of file DaqScopeModeHistosUsingDb.cc.

References allowSelectiveUpload_, disableBadStrips_, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), highThreshold_, keepStripsDisabled_, LogTrace, lowThreshold_, sistrip::mlDqmClient_, CommissioningHistograms::pset(), skipPedestalUpdate_, and skipTickUpdate_.

15  : CommissioningHistograms( pset.getParameter<edm::ParameterSet>("DaqScopeModeParameters"),
16  bei,
20  DaqScopeModeHistograms(pset.getParameter<edm::ParameterSet>("DaqScopeModeParameters"),
21  bei )
22 {
23 
25  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
26  << " Constructing object...";
27  highThreshold_ = this->pset().getParameter<double>("HighThreshold");
28  lowThreshold_ = this->pset().getParameter<double>("LowThreshold");
30  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
31  << " Set FED zero suppression high/low threshold to "
32  << highThreshold_ << "/" << lowThreshold_;
33  disableBadStrips_ = this->pset().getParameter<bool>("DisableBadStrips");
34  keepStripsDisabled_ = this->pset().getParameter<bool>("KeepStripsDisabled");
36  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
37  << " Disabling strips: " << disableBadStrips_
38  << " ; keeping previously disabled strips: " << keepStripsDisabled_;
39  allowSelectiveUpload_ = this->pset().existsAs<bool>("doSelectiveUpload")?this->pset().getParameter<bool>("doSelectiveUpload"):false;
41  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
42  << " Selective upload of modules set to : " << allowSelectiveUpload_;
43 
44  skipPedestalUpdate_ = this->pset().existsAs<bool>("SkipPedestalUpdate")?this->pset().getParameter<bool>("SkipPedestalUpdate"):false;
45  skipTickUpdate_ = this->pset().existsAs<bool>("SkipTickUpdate")?this->pset().getParameter<bool>("SkipTickUpdate"):false;
47  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
48  << " Perform pedestal upload set to : " <<skipPedestalUpdate_;
50  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
51  << " Perform tick-mark upload set to : " <<skipTickUpdate_;
52 }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:161
const edm::ParameterSet & pset() const
static const char mlDqmClient_[]
DaqScopeModeHistograms(const edm::ParameterSet &pset, DQMStore *)
#define LogTrace(id)
DQMStore *const bei() const
DaqScopeModeHistosUsingDb::~DaqScopeModeHistosUsingDb ( )
override

Definition at line 55 of file DaqScopeModeHistosUsingDb.cc.

References LogTrace, and sistrip::mlDqmClient_.

55  {
57  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
58  << " Destructing object...";
59 }
static const char mlDqmClient_[]
#define LogTrace(id)

Member Function Documentation

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

Reimplemented from CommissioningHistosUsingDb.

Definition at line 334 of file DaqScopeModeHistosUsingDb.cc.

References DaqScopeModeAnalysis::base(), CommissioningHistosUsingDb::db(), SiStripConfigDb::dbParams(), DaqScopeModeAnalysis::dead(), CommissioningAnalysis::fecKey(), CommissioningAnalysis::fedKey(), DaqScopeModeAnalysis::frameFindingThreshold(), CommissioningAnalysis::getErrorCodes(), DaqScopeModeAnalysis::height(), SiStripFecKey::i2cAddr(), DaqScopeModeAnalysis::isValid(), DaqScopeModeAnalysis::noiseMax(), DaqScopeModeAnalysis::noiseMean(), DaqScopeModeAnalysis::noiseMin(), DaqScopeModeAnalysis::noiseSpread(), DaqScopeModeAnalysis::noisy(), SiStripDbParams::partitions(), DaqScopeModeAnalysis::peak(), DaqScopeModeAnalysis::pedsMax(), DaqScopeModeAnalysis::pedsMean(), DaqScopeModeAnalysis::pedsMin(), DaqScopeModeAnalysis::pedsSpread(), DaqScopeModeAnalysis::rawMax(), DaqScopeModeAnalysis::rawMean(), DaqScopeModeAnalysis::rawMin(), DaqScopeModeAnalysis::rawSpread(), and DaqScopeModeAnalysis::tickMarkHeightThreshold_.

335  {
336 
337  DaqScopeModeAnalysis* anal = dynamic_cast<DaqScopeModeAnalysis*>( analysis->second );
338  if ( !anal ) { return; }
339 
340  SiStripFecKey fec_key( anal->fecKey() );
341  SiStripFedKey fed_key( anal->fedKey() );
342 
343  for ( uint16_t iapv = 0; iapv < 2; ++iapv ) {
344 
345  // Create description for the pedestal table
346  PedestalsAnalysisDescription* peds_tmp;
347  peds_tmp = new PedestalsAnalysisDescription(
348  anal->dead()[iapv],
349  anal->noisy()[iapv],
350  anal->pedsMean()[iapv],
351  anal->pedsSpread()[iapv],
352  anal->noiseMean()[iapv],
353  anal->noiseSpread()[iapv],
354  anal->rawMean()[iapv],
355  anal->rawSpread()[iapv],
356  anal->pedsMax()[iapv],
357  anal->pedsMin()[iapv],
358  anal->noiseMax()[iapv],
359  anal->noiseMin()[iapv],
360  anal->rawMax()[iapv],
361  anal->rawMin()[iapv],
362  fec_key.fecCrate(),
363  fec_key.fecSlot(),
364  fec_key.fecRing(),
365  fec_key.ccuAddr(),
366  fec_key.ccuChan(),
367  SiStripFecKey::i2cAddr( fec_key.lldChan(), !iapv ),
368  db()->dbParams().partitions().begin()->second.partitionName(),
369  db()->dbParams().partitions().begin()->second.runNumber(),
370  anal->isValid(),
371  "",
372  fed_key.fedId(),
373  fed_key.feUnit(),
374  fed_key.feChan(),
375  fed_key.fedApv()
376  );
377 
378 
379  // Add comments
380  typedef std::vector<std::string> Strings;
381  Strings errors = anal->getErrorCodes();
382  Strings::const_iterator istr = errors.begin();
383  Strings::const_iterator jstr = errors.end();
384  for ( ; istr != jstr; ++istr ) { peds_tmp->addComments( *istr ); }
385 
386  // Store description
387  desc.push_back( peds_tmp );
388 
389  // Create description
390  TimingAnalysisDescription* timing_tmp;
391  timing_tmp = new TimingAnalysisDescription(
392  -1.,
393  -1.,
394  -1.,
395  anal->height(),
396  anal->base(),
397  anal->peak(),
398  anal->frameFindingThreshold(),
399  -1.,
401  true, //@@ APV timing analysis (not FED timing)
402  fec_key.fecCrate(),
403  fec_key.fecSlot(),
404  fec_key.fecRing(),
405  fec_key.ccuAddr(),
406  fec_key.ccuChan(),
407  SiStripFecKey::i2cAddr( fec_key.lldChan(), !iapv ),
408  db()->dbParams().partitions().begin()->second.partitionName(),
409  db()->dbParams().partitions().begin()->second.runNumber(),
410  anal->isValid(),
411  "",
412  fed_key.fedId(),
413  fed_key.feUnit(),
414  fed_key.feChan(),
415  fed_key.fedApv() );
416 
417  istr = errors.begin();
418  jstr = errors.end();
419  for ( ; istr != jstr; ++istr ) { timing_tmp->addComments( *istr ); }
420  desc.push_back(timing_tmp);
421  }
422 }
const VFloat & noiseMean() const
const VVInt & dead() const
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
bool isValid() const override
const VFloat & noiseSpread() const
std::vector< std::string > Strings
Definition: MsgTools.h:18
uint16_t frameFindingThreshold() const
const VFloat & noiseMax() const
const uint16_t & i2cAddr() const
static const float tickMarkHeightThreshold_
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
const VFloat & pedsSpread() const
const VFloat & rawMean() const
const float & base() const
const uint32_t & fecKey() const
const float & height() const
const VFloat & rawSpread() const
const VFloat & noiseMin() const
const float & peak() const
const VFloat & pedsMean() const
const SiStripDbParams & dbParams() const
const VVInt & noisy() const
const VFloat & pedsMax() const
Definition: errors.py:1
SiStripConfigDb *const db() const
const VFloat & pedsMin() const
const VFloat & rawMax() const
const VFloat & rawMin() const
const VString & getErrorCodes() const
Analysis for scope mode data.
void DaqScopeModeHistosUsingDb::update ( SiStripConfigDb::FedDescriptionsRange  feds)
private

Pedestal and noise uploads

Definition at line 95 of file DaqScopeModeHistosUsingDb.cc.

References allowSelectiveUpload_, sistrip::APVS_PER_FEDCH, DaqScopeModeAnalysis::base(), CommissioningHistosUsingDb::cabling(), FedChannelConnection::ccuAddr(), FedChannelConnection::ccuChan(), CommissioningHistograms::data(), DaqScopeModeAnalysis::dead(), TauDecayModes::dec, CommissioningHistosUsingDb::deviceIsPresent(), disableBadStrips_, 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(), DaqScopeModeAnalysis::frameFindingThreshold(), DaqScopeModeAnalysis::height(), highThreshold_, sistrip::invalid_, edm::isDebugEnabled(), DaqScopeModeAnalysis::isValid(), keepStripsDisabled_, SiStripKey::key(), FedChannelConnection::lldChannel(), LogTrace, lowThreshold_, sistrip::mlDqmClient_, DaqScopeModeAnalysis::noise(), DaqScopeModeAnalysis::noisy(), DaqScopeModeAnalysis::peak(), DaqScopeModeAnalysis::peds(), DaqScopeModeAnalysis::pedsMin(), DaqScopeModeAnalysis::print(), skipPedestalUpdate_, skipTickUpdate_, and groupFilesInBlocks::temp.

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().

95  {
96  // Retrieve FED ids from cabling
97  auto ids = cabling()->fedIds();
98 
99  // Iterate through feds and update fed descriptions
100  uint16_t updated_peds = 0;
101  uint16_t updated_ticks = 0;
102  SiStripConfigDb::FedDescriptionsV::const_iterator ifed;
103  for ( ifed = feds.begin(); ifed != feds.end(); ifed++ ) {
104 
105  // If FED id not found in list (from cabling), then continue
106  if ( find( ids.begin(), ids.end(), (*ifed)->getFedId() ) == ids.end() ) { continue; }
107 
108  for ( uint16_t ichan = 0; ichan < sistrip::FEDCH_PER_FED; ichan++ ) {
109 
110  // Build FED and FEC keys
111  const FedChannelConnection& conn = cabling()->fedConnection( (*ifed)->getFedId(), ichan );
112 
113  if ( conn.fecCrate() == sistrip::invalid_ ||
114  conn.fecSlot() == sistrip::invalid_ ||
115  conn.fecRing() == sistrip::invalid_ ||
116  conn.ccuAddr() == sistrip::invalid_ ||
117  conn.ccuChan() == sistrip::invalid_ ||
118  conn.lldChannel() == sistrip::invalid_ ) { continue; }
119 
120  SiStripFedKey fed_key( conn.fedId(),
121  SiStripFedKey::feUnit( conn.fedCh() ),
122  SiStripFedKey::feChan( conn.fedCh() ) );
123 
124  SiStripFecKey fec_key( conn.fecCrate(),
125  conn.fecSlot(),
126  conn.fecRing(),
127  conn.ccuAddr(),
128  conn.ccuChan(),
129  conn.lldChannel() );
130 
131  // Locate appropriate analysis object
132  Analyses::const_iterator iter = data(allowSelectiveUpload_).find( fec_key.key() );
133 
134  if ( iter != data(allowSelectiveUpload_).end() ) {
135 
136  // Check if analysis is valid
137  if ( !iter->second->isValid() ) {
139  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
140  << " Skipping invalid channel with coordinates: FedKey/Id/Ch: "
141  << hex << setw(8) << setfill('0') << fed_key.key() << dec << "/"
142  << (*ifed)->getFedId() << "/"
143  << ichan
144  << " and device with FEC/slot/ring/CCU/LLD "
145  << fec_key.fecCrate() << "/"
146  << fec_key.fecSlot() << "/"
147  << fec_key.fecRing() << "/"
148  << fec_key.ccuAddr() << "/"
149  << fec_key.ccuChan() << "/"
150  << fec_key.channel();
151  continue;
152  }
153 
154  DaqScopeModeAnalysis* anal = dynamic_cast<DaqScopeModeAnalysis*>( iter->second );
155  if ( !anal ) {
157  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
158  << " NULL pointer to analysis object!";
159  continue;
160  }
161 
163  if(not skipPedestalUpdate_){
164 
165  // Determine the pedestal shift to apply
166  uint32_t pedshift = 127;
167  for ( uint16_t iapv = 0; iapv < sistrip::APVS_PER_FEDCH; iapv++ ) {
168  uint32_t pedmin = (uint32_t) anal->pedsMin()[iapv];
169  pedshift = pedmin < pedshift ? pedmin : pedshift;
170  std::stringstream ss;
171  ss << "iapv: " << iapv << " pedsMin()[iapv]: " << anal->pedsMin()[iapv] << " pedmin: " << pedmin << " pedshift: " << pedshift;
172  edm::LogWarning(mlDqmClient_) << ss.str();
173  }
174 
175  // Iterate through APVs and strips
176  for ( uint16_t iapv = 0; iapv < sistrip::APVS_PER_FEDCH; iapv++ ) {
177  for ( uint16_t istr = 0; istr < anal->peds()[iapv].size(); istr++ ) {
178 
179  // Patch added by R.B. (I'm back! ;-), requested by J.F. and S.L. (04/11/2010)
180  if ( anal->peds()[iapv][istr] < 1. ) { //@@ ie, zero
182  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
183  << " Skipping ZERO pedestal value (ie, NO UPLOAD TO DB!) for FedKey/Id/Ch: "
184  << hex << setw(8) << setfill('0') << fed_key.key() << dec << "/"
185  << (*ifed)->getFedId() << "/"
186  << ichan
187  << " and device with FEC/slot/ring/CCU/LLD "
188  << fec_key.fecCrate() << "/"
189  << fec_key.fecSlot() << "/"
190  << fec_key.fecRing() << "/"
191  << fec_key.ccuAddr() << "/"
192  << fec_key.ccuChan() << "/"
193  << fec_key.channel();
194  continue; //@@ do not upload
195  }
196 
197  // get the information on the strip as it was on the db
198  Fed9U::Fed9UAddress addr( ichan, iapv, istr );
199  Fed9U::Fed9UStripDescription temp = (*ifed)->getFedStrips().getStrip( addr );
200 
201  // determine whether we need to disable the strip
202  bool disableStrip = false;
203  if ( keepStripsDisabled_ ) {
204  disableStrip = temp.getDisable();
205  }
206  else if (disableBadStrips_) {
207  DaqScopeModeAnalysis::VInt dead = anal->dead()[iapv];
208  if ( find( dead.begin(), dead.end(), istr ) != dead.end() ) disableStrip = true;
209  DaqScopeModeAnalysis::VInt noisy = anal->noisy()[iapv];
210  if ( find( noisy.begin(), noisy.end(), istr ) != noisy.end() ) disableStrip = true;
211  }
212 
213  Fed9U::Fed9UStripDescription data( static_cast<uint32_t>( anal->peds()[iapv][istr]-pedshift ),
216  anal->noise()[iapv][istr],
217  disableStrip);
218 
219  std::stringstream ss;
220  if ( data.getDisable() && edm::isDebugEnabled() ) {
221  ss << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
222  << " Disabling strip in Fed9UStripDescription object..." << std::endl
223  << " for FED id/channel and APV/strip : "
224  << fed_key.fedId() << "/"
225  << fed_key.fedChannel() << " "
226  << iapv << "/"
227  << istr << std::endl
228  << " and crate/FEC/ring/CCU/module : "
229  << fec_key.fecCrate() << "/"
230  << fec_key.fecSlot() << "/"
231  << fec_key.fecRing() << "/"
232  << fec_key.ccuAddr() << "/"
233  << fec_key.ccuChan() << std::endl
234  << " from ped/noise/high/low/disable : "
235  << static_cast<uint16_t>( temp.getPedestal() ) << "/"
236  << static_cast<uint16_t>( temp.getHighThreshold() ) << "/"
237  << static_cast<uint16_t>( temp.getLowThreshold() ) << "/"
238  << static_cast<uint16_t>( temp.getNoise() ) << "/"
239  << static_cast<uint16_t>( temp.getDisable() ) << std::endl;
240  }
241 
242  // update strip inf
243  (*ifed)->getFedStrips().setStrip( addr, data );
244 
245  if ( data.getDisable() && edm::isDebugEnabled() ) {
246  ss << " to ped/noise/high/low/disable : "
247  << static_cast<uint16_t>( data.getPedestal() ) << "/"
248  << static_cast<uint16_t>( data.getHighThreshold() ) << "/"
249  << static_cast<uint16_t>( data.getLowThreshold() ) << "/"
250  << static_cast<uint16_t>( data.getNoise() ) << "/"
251  << static_cast<uint16_t>( data.getDisable() ) << std::endl;
252  LogTrace(mlDqmClient_) << ss.str();
253  }
254  } // end loop on strips
255  } // end loop on apvs
256  updated_peds++;
257  }
258 
259  // if one wants to update the frame finding threhsolds
260  if(not skipTickUpdate_){
261 
262  // Update frame finding threshold
263  Fed9U::Fed9UAddress addr( ichan );
264  uint16_t old_threshold = static_cast<uint16_t>( (*ifed)->getFrameThreshold( addr ) );
265  if(anal->isValid()) {
266  (*ifed)->setFrameThreshold( addr, anal->frameFindingThreshold() );
267  updated_ticks++;
268  }
269  uint16_t new_threshold = static_cast<uint16_t>( (*ifed)->getFrameThreshold( addr ) );
270 
271  std::stringstream ss;
272  ss << "LLD channel : old frame threshold "<<old_threshold<<" new frame threshold "<<new_threshold<<std::endl;
273  edm::LogWarning(mlDqmClient_) << ss.str();
274 
275  // Debug
276  ss.clear();
277  ss << "[DaqScopeModeHistosUsingDb::" << __func__ << "]";
278  if ( anal->isValid() ) {
279  ss << " Updating the frame-finding threshold"
280  << " from " << old_threshold
281  << " to " << new_threshold
282  << " using tick mark base/peak/height "
283  << anal->base() << "/"
284  << anal->peak() << "/"
285  << anal->height();
286  } else {
287  ss << " Cannot update the frame-finding threshold"
288  << " from " << old_threshold
289  << " to a new value using invalid analysis ";
290  }
291  ss << " for crate/FEC/ring/CCU/module/LLD "
292  << fec_key.fecCrate() << "/"
293  << fec_key.fecSlot() << "/"
294  << fec_key.fecRing() << "/"
295  << fec_key.ccuAddr() << "/"
296  << fec_key.ccuChan()
297  << fec_key.channel()
298  << " and FED id/ch "
299  << fed_key.fedId() << "/"
300  << fed_key.fedChannel();
301  anal->print(ss);
302  LogTrace(mlDqmClient_) << ss.str();
303  }
304  }
305  else{
306  if ( deviceIsPresent(fec_key) ) {
308  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
309  << " Unable to find pedestals/noise for FedKey/Id/Ch: "
310  << hex << setw(8) << setfill('0') << fed_key.key() << dec << "/"
311  << (*ifed)->getFedId() << "/"
312  << ichan
313  << " and device with FEC/slot/ring/CCU/LLD "
314  << fec_key.fecCrate() << "/"
315  << fec_key.fecSlot() << "/"
316  << fec_key.fecRing() << "/"
317  << fec_key.ccuAddr() << "/"
318  << fec_key.ccuChan() << "/"
319  << fec_key.channel();
320  }
321  }
322  }
323  }
324 
326  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
327  << " Updated FED parameters for pedestal/noise "
328  << updated_peds << " channels"
329  << " Updated FED parameters for frame finding thresholds "
330  << updated_ticks << " channels";
331 }
const uint16_t & fecSlot() const
bool isDebugEnabled()
const uint16_t & fecCrate() const
const VVInt & dead() 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 &)
bool isValid() const override
uint16_t frameFindingThreshold() const
static const char mlDqmClient_[]
uint16_t lldChannel() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
const uint16_t & fedId() 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
const VVFloat & noise() const
const uint16_t & ccuChan() const
const float & base() const
const VVFloat & peds() const
const float & height() const
void print(std::stringstream &, uint32_t apv_number=0) override
const uint16_t & ccuAddr() const
#define LogTrace(id)
std::vector< uint16_t > VInt
const float & peak() const
const uint16_t & feUnit() const
const VVInt & noisy() const
static const uint16_t invalid_
Definition: Constants.h:16
static const uint16_t FEDCH_PER_FED
const uint16_t & feChan() const
const VFloat & pedsMin() const
SiStripFedCabling *const cabling() const
static const uint16_t APVS_PER_FEDCH
Analysis for scope mode data.
void DaqScopeModeHistosUsingDb::uploadConfigurations ( )
overridevirtual

Reimplemented from CommissioningHistosUsingDb.

Definition at line 62 of file DaqScopeModeHistosUsingDb.cc.

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

62  {
64  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]";
65 
66  if ( !db() ) {
68  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
69  << " NULL pointer to SiStripConfigDb interface!"
70  << " Aborting upload...";
71  return;
72  }
73 
74  // Update FED descriptions with new peds/noise values as well as tick-marks (no PLL delays, for these ones please use the Timing run
76  update( feds );
77 
78  if ( doUploadConf() ) {
80  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
81  << " Uploading FED information to DB...";
84  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
85  << " Completed database upload of " << feds.size()
86  << " FED descriptions!";
87  } else {
89  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
90  << " No FED values will be uploaded to DB...";
91  }
92 }
FedDescriptionsRange getFedDescriptions(std::string partition="")
FedDescriptions::range FedDescriptionsRange
static const char mlDqmClient_[]
#define LogTrace(id)
void uploadFedDescriptions(std::string partition="")
void update(SiStripConfigDb::FedDescriptionsRange)
SiStripConfigDb *const db() const

Member Data Documentation

bool DaqScopeModeHistosUsingDb::allowSelectiveUpload_
private

Definition at line 32 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().

bool DaqScopeModeHistosUsingDb::disableBadStrips_
private

Definition at line 28 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().

float DaqScopeModeHistosUsingDb::highThreshold_
private

Definition at line 26 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().

bool DaqScopeModeHistosUsingDb::keepStripsDisabled_
private

Definition at line 29 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().

float DaqScopeModeHistosUsingDb::lowThreshold_
private

Definition at line 27 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().

bool DaqScopeModeHistosUsingDb::skipPedestalUpdate_
private

Definition at line 34 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().

bool DaqScopeModeHistosUsingDb::skipTickUpdate_
private

Definition at line 36 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().