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 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 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_.

16  pset.getParameter<edm::ParameterSet>("DaqScopeModeParameters"), bei, sistrip::DAQ_SCOPE_MODE),
18  DaqScopeModeHistograms(pset.getParameter<edm::ParameterSet>("DaqScopeModeParameters"), bei) {
19  LogTrace(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
20  << " Constructing object...";
21  highThreshold_ = this->pset().getParameter<double>("HighThreshold");
22  lowThreshold_ = this->pset().getParameter<double>("LowThreshold");
23  LogTrace(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
24  << " Set FED zero suppression high/low threshold to " << highThreshold_ << "/"
25  << lowThreshold_;
26  disableBadStrips_ = this->pset().getParameter<bool>("DisableBadStrips");
27  keepStripsDisabled_ = this->pset().getParameter<bool>("KeepStripsDisabled");
28  LogTrace(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
29  << " Disabling strips: " << disableBadStrips_
30  << " ; keeping previously disabled strips: " << keepStripsDisabled_;
32  this->pset().existsAs<bool>("doSelectiveUpload") ? this->pset().getParameter<bool>("doSelectiveUpload") : false;
33  LogTrace(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
34  << " Selective upload of modules set to : " << allowSelectiveUpload_;
35 
37  this->pset().existsAs<bool>("SkipPedestalUpdate") ? this->pset().getParameter<bool>("SkipPedestalUpdate") : false;
39  this->pset().existsAs<bool>("SkipTickUpdate") ? this->pset().getParameter<bool>("SkipTickUpdate") : false;
40  LogTrace(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
41  << " Perform pedestal upload set to : " << skipPedestalUpdate_;
42  LogTrace(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
43  << " Perform tick-mark upload set to : " << skipTickUpdate_;
44 }
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:160
const edm::ParameterSet & pset() const
static const char mlDqmClient_[]
DaqScopeModeHistograms(const edm::ParameterSet &pset, DQMStore *)
DQMStore *const bei() const
#define LogTrace(id)
DaqScopeModeHistosUsingDb::~DaqScopeModeHistosUsingDb ( )
override

Definition at line 47 of file DaqScopeModeHistosUsingDb.cc.

References LogTrace, and sistrip::mlDqmClient_.

47  {
48  LogTrace(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
49  << " Destructing object...";
50 }
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 265 of file DaqScopeModeHistosUsingDb.cc.

References conversion_template_cfg::anal, 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_.

265  {
266  DaqScopeModeAnalysis* anal = dynamic_cast<DaqScopeModeAnalysis*>(analysis->second);
267  if (!anal) {
268  return;
269  }
270 
271  SiStripFecKey fec_key(anal->fecKey());
272  SiStripFedKey fed_key(anal->fedKey());
273 
274  for (uint16_t iapv = 0; iapv < 2; ++iapv) {
275  // Create description for the pedestal table
276  PedestalsAnalysisDescription* peds_tmp;
277  peds_tmp = new PedestalsAnalysisDescription(anal->dead()[iapv],
278  anal->noisy()[iapv],
279  anal->pedsMean()[iapv],
280  anal->pedsSpread()[iapv],
281  anal->noiseMean()[iapv],
282  anal->noiseSpread()[iapv],
283  anal->rawMean()[iapv],
284  anal->rawSpread()[iapv],
285  anal->pedsMax()[iapv],
286  anal->pedsMin()[iapv],
287  anal->noiseMax()[iapv],
288  anal->noiseMin()[iapv],
289  anal->rawMax()[iapv],
290  anal->rawMin()[iapv],
291  fec_key.fecCrate(),
292  fec_key.fecSlot(),
293  fec_key.fecRing(),
294  fec_key.ccuAddr(),
295  fec_key.ccuChan(),
296  SiStripFecKey::i2cAddr(fec_key.lldChan(), !iapv),
297  db()->dbParams().partitions().begin()->second.partitionName(),
298  db()->dbParams().partitions().begin()->second.runNumber(),
299  anal->isValid(),
300  "",
301  fed_key.fedId(),
302  fed_key.feUnit(),
303  fed_key.feChan(),
304  fed_key.fedApv());
305 
306  // Add comments
307  typedef std::vector<std::string> Strings;
308  Strings errors = anal->getErrorCodes();
309  Strings::const_iterator istr = errors.begin();
310  Strings::const_iterator jstr = errors.end();
311  for (; istr != jstr; ++istr) {
312  peds_tmp->addComments(*istr);
313  }
314 
315  // Store description
316  desc.push_back(peds_tmp);
317 
318  // Create description
319  TimingAnalysisDescription* timing_tmp;
320  timing_tmp = new TimingAnalysisDescription(-1.,
321  -1.,
322  -1.,
323  anal->height(),
324  anal->base(),
325  anal->peak(),
326  anal->frameFindingThreshold(),
327  -1.,
329  true, //@@ APV timing analysis (not FED timing)
330  fec_key.fecCrate(),
331  fec_key.fecSlot(),
332  fec_key.fecRing(),
333  fec_key.ccuAddr(),
334  fec_key.ccuChan(),
335  SiStripFecKey::i2cAddr(fec_key.lldChan(), !iapv),
336  db()->dbParams().partitions().begin()->second.partitionName(),
337  db()->dbParams().partitions().begin()->second.runNumber(),
338  anal->isValid(),
339  "",
340  fed_key.fedId(),
341  fed_key.feUnit(),
342  fed_key.feChan(),
343  fed_key.fedApv());
344 
345  istr = errors.begin();
346  jstr = errors.end();
347  for (; istr != jstr; ++istr) {
348  timing_tmp->addComments(*istr);
349  }
350  desc.push_back(timing_tmp);
351  }
352 }
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 80 of file DaqScopeModeHistosUsingDb.cc.

References generateTowerEtThresholdLUT::addr, allowSelectiveUpload_, conversion_template_cfg::anal, sistrip::APVS_PER_FEDCH, DaqScopeModeAnalysis::base(), CommissioningHistosUsingDb::cabling(), FedChannelConnection::ccuAddr(), FedChannelConnection::ccuChan(), SiStripCommissioningClient_cfg::conn, 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_, photons_cff::ids, 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_, contentValuesCheck::ss, 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().

80  {
81  // Retrieve FED ids from cabling
82  auto ids = cabling()->fedIds();
83 
84  // Iterate through feds and update fed descriptions
85  uint16_t updated_peds = 0;
86  uint16_t updated_ticks = 0;
87  SiStripConfigDb::FedDescriptionsV::const_iterator ifed;
88  for (ifed = feds.begin(); ifed != feds.end(); ifed++) {
89  // If FED id not found in list (from cabling), then continue
90  if (find(ids.begin(), ids.end(), (*ifed)->getFedId()) == ids.end()) {
91  continue;
92  }
93 
94  for (uint16_t ichan = 0; ichan < sistrip::FEDCH_PER_FED; ichan++) {
95  // Build FED and FEC keys
96  const FedChannelConnection& conn = cabling()->fedConnection((*ifed)->getFedId(), ichan);
97 
98  if (conn.fecCrate() == sistrip::invalid_ || conn.fecSlot() == sistrip::invalid_ ||
99  conn.fecRing() == sistrip::invalid_ || conn.ccuAddr() == sistrip::invalid_ ||
100  conn.ccuChan() == sistrip::invalid_ || conn.lldChannel() == sistrip::invalid_) {
101  continue;
102  }
103 
104  SiStripFedKey fed_key(conn.fedId(), SiStripFedKey::feUnit(conn.fedCh()), SiStripFedKey::feChan(conn.fedCh()));
105 
106  SiStripFecKey fec_key(
107  conn.fecCrate(), conn.fecSlot(), conn.fecRing(), conn.ccuAddr(), conn.ccuChan(), conn.lldChannel());
108 
109  // Locate appropriate analysis object
110  Analyses::const_iterator iter = data(allowSelectiveUpload_).find(fec_key.key());
111 
112  if (iter != data(allowSelectiveUpload_).end()) {
113  // Check if analysis is valid
114  if (!iter->second->isValid()) {
115  edm::LogWarning(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
116  << " Skipping invalid channel with coordinates: FedKey/Id/Ch: " << hex
117  << setw(8) << setfill('0') << fed_key.key() << dec << "/" << (*ifed)->getFedId()
118  << "/" << ichan << " and device with FEC/slot/ring/CCU/LLD "
119  << fec_key.fecCrate() << "/" << fec_key.fecSlot() << "/" << fec_key.fecRing()
120  << "/" << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << "/"
121  << fec_key.channel();
122  continue;
123  }
124 
125  DaqScopeModeAnalysis* anal = dynamic_cast<DaqScopeModeAnalysis*>(iter->second);
126  if (!anal) {
127  edm::LogError(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
128  << " NULL pointer to analysis object!";
129  continue;
130  }
131 
133  if (not skipPedestalUpdate_) {
134  // Determine the pedestal shift to apply
135  uint32_t pedshift = 127;
136  for (uint16_t iapv = 0; iapv < sistrip::APVS_PER_FEDCH; iapv++) {
137  uint32_t pedmin = (uint32_t)anal->pedsMin()[iapv];
138  pedshift = pedmin < pedshift ? pedmin : pedshift;
139  std::stringstream ss;
140  ss << "iapv: " << iapv << " pedsMin()[iapv]: " << anal->pedsMin()[iapv] << " pedmin: " << pedmin
141  << " pedshift: " << pedshift;
142  edm::LogWarning(mlDqmClient_) << ss.str();
143  }
144 
145  // Iterate through APVs and strips
146  for (uint16_t iapv = 0; iapv < sistrip::APVS_PER_FEDCH; iapv++) {
147  for (uint16_t istr = 0; istr < anal->peds()[iapv].size(); istr++) {
148  // Patch added by R.B. (I'm back! ;-), requested by J.F. and S.L. (04/11/2010)
149  if (anal->peds()[iapv][istr] < 1.) { //@@ ie, zero
151  << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
152  << " Skipping ZERO pedestal value (ie, NO UPLOAD TO DB!) for FedKey/Id/Ch: " << hex << setw(8)
153  << setfill('0') << fed_key.key() << dec << "/" << (*ifed)->getFedId() << "/" << ichan
154  << " and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate() << "/" << fec_key.fecSlot()
155  << "/" << fec_key.fecRing() << "/" << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << "/"
156  << fec_key.channel();
157  continue; //@@ do not upload
158  }
159 
160  // get the information on the strip as it was on the db
161  Fed9U::Fed9UAddress addr(ichan, iapv, istr);
162  Fed9U::Fed9UStripDescription temp = (*ifed)->getFedStrips().getStrip(addr);
163 
164  // determine whether we need to disable the strip
165  bool disableStrip = false;
166  if (keepStripsDisabled_) {
167  disableStrip = temp.getDisable();
168  } else if (disableBadStrips_) {
169  DaqScopeModeAnalysis::VInt dead = anal->dead()[iapv];
170  if (find(dead.begin(), dead.end(), istr) != dead.end())
171  disableStrip = true;
172  DaqScopeModeAnalysis::VInt noisy = anal->noisy()[iapv];
173  if (find(noisy.begin(), noisy.end(), istr) != noisy.end())
174  disableStrip = true;
175  }
176 
177  Fed9U::Fed9UStripDescription data(static_cast<uint32_t>(anal->peds()[iapv][istr] - pedshift),
180  anal->noise()[iapv][istr],
181  disableStrip);
182 
183  std::stringstream ss;
184  if (data.getDisable() && edm::isDebugEnabled()) {
185  ss << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
186  << " Disabling strip in Fed9UStripDescription object..." << std::endl
187  << " for FED id/channel and APV/strip : " << fed_key.fedId() << "/" << fed_key.fedChannel() << " "
188  << iapv << "/" << istr << std::endl
189  << " and crate/FEC/ring/CCU/module : " << fec_key.fecCrate() << "/" << fec_key.fecSlot() << "/"
190  << fec_key.fecRing() << "/" << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << std::endl
191  << " from ped/noise/high/low/disable : " << static_cast<uint16_t>(temp.getPedestal()) << "/"
192  << static_cast<uint16_t>(temp.getHighThreshold()) << "/"
193  << static_cast<uint16_t>(temp.getLowThreshold()) << "/" << static_cast<uint16_t>(temp.getNoise())
194  << "/" << static_cast<uint16_t>(temp.getDisable()) << std::endl;
195  }
196 
197  // update strip inf
198  (*ifed)->getFedStrips().setStrip(addr, data);
199 
200  if (data.getDisable() && edm::isDebugEnabled()) {
201  ss << " to ped/noise/high/low/disable : " << static_cast<uint16_t>(data.getPedestal()) << "/"
202  << static_cast<uint16_t>(data.getHighThreshold()) << "/"
203  << static_cast<uint16_t>(data.getLowThreshold()) << "/" << static_cast<uint16_t>(data.getNoise())
204  << "/" << static_cast<uint16_t>(data.getDisable()) << std::endl;
205  LogTrace(mlDqmClient_) << ss.str();
206  }
207  } // end loop on strips
208  } // end loop on apvs
209  updated_peds++;
210  }
211 
212  // if one wants to update the frame finding threhsolds
213  if (not skipTickUpdate_) {
214  // Update frame finding threshold
215  Fed9U::Fed9UAddress addr(ichan);
216  uint16_t old_threshold = static_cast<uint16_t>((*ifed)->getFrameThreshold(addr));
217  if (anal->isValid()) {
218  (*ifed)->setFrameThreshold(addr, anal->frameFindingThreshold());
219  updated_ticks++;
220  }
221  uint16_t new_threshold = static_cast<uint16_t>((*ifed)->getFrameThreshold(addr));
222 
223  std::stringstream ss;
224  ss << "LLD channel : old frame threshold " << old_threshold << " new frame threshold " << new_threshold
225  << std::endl;
226  edm::LogWarning(mlDqmClient_) << ss.str();
227 
228  // Debug
229  ss.clear();
230  ss << "[DaqScopeModeHistosUsingDb::" << __func__ << "]";
231  if (anal->isValid()) {
232  ss << " Updating the frame-finding threshold"
233  << " from " << old_threshold << " to " << new_threshold << " using tick mark base/peak/height "
234  << anal->base() << "/" << anal->peak() << "/" << anal->height();
235  } else {
236  ss << " Cannot update the frame-finding threshold"
237  << " from " << old_threshold << " to a new value using invalid analysis ";
238  }
239  ss << " for crate/FEC/ring/CCU/module/LLD " << fec_key.fecCrate() << "/" << fec_key.fecSlot() << "/"
240  << fec_key.fecRing() << "/" << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << fec_key.channel()
241  << " and FED id/ch " << fed_key.fedId() << "/" << fed_key.fedChannel();
242  anal->print(ss);
243  LogTrace(mlDqmClient_) << ss.str();
244  }
245  } else {
246  if (deviceIsPresent(fec_key)) {
247  edm::LogWarning(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
248  << " Unable to find pedestals/noise for FedKey/Id/Ch: " << hex << setw(8)
249  << setfill('0') << fed_key.key() << dec << "/" << (*ifed)->getFedId() << "/"
250  << ichan << " and device with FEC/slot/ring/CCU/LLD " << fec_key.fecCrate()
251  << "/" << fec_key.fecSlot() << "/" << fec_key.fecRing() << "/"
252  << fec_key.ccuAddr() << "/" << fec_key.ccuChan() << "/" << fec_key.channel();
253  }
254  }
255  }
256  }
257 
258  edm::LogVerbatim(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
259  << " Updated FED parameters for pedestal/noise " << updated_peds << " channels"
260  << " Updated FED parameters for frame finding thresholds " << updated_ticks
261  << " channels";
262 }
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:19
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 53 of file DaqScopeModeHistosUsingDb.cc.

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

53  {
54  LogTrace(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]";
55 
56  if (!db()) {
57  edm::LogError(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
58  << " NULL pointer to SiStripConfigDb interface!"
59  << " Aborting upload...";
60  return;
61  }
62 
63  // Update FED descriptions with new peds/noise values as well as tick-marks (no PLL delays, for these ones please use the Timing run
65  update(feds);
66 
67  if (doUploadConf()) {
68  edm::LogVerbatim(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
69  << " Uploading FED information to DB...";
71  edm::LogVerbatim(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
72  << " Completed database upload of " << feds.size() << " FED descriptions!";
73  } else {
74  edm::LogWarning(mlDqmClient_) << "[DaqScopeModeHistosUsingDb::" << __func__ << "]"
75  << " No FED values will be uploaded to DB...";
76  }
77 }
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 26 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().

bool DaqScopeModeHistosUsingDb::disableBadStrips_
private

Definition at line 22 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().

float DaqScopeModeHistosUsingDb::highThreshold_
private

Definition at line 20 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().

bool DaqScopeModeHistosUsingDb::keepStripsDisabled_
private

Definition at line 23 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().

float DaqScopeModeHistosUsingDb::lowThreshold_
private

Definition at line 21 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().

bool DaqScopeModeHistosUsingDb::skipPedestalUpdate_
private

Definition at line 28 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().

bool DaqScopeModeHistosUsingDb::skipTickUpdate_
private

Definition at line 30 of file DaqScopeModeHistosUsingDb.h.

Referenced by DaqScopeModeHistosUsingDb(), and update().