CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
SiStripFEDCheckPlugin Class Reference
Inheritance diagram for SiStripFEDCheckPlugin:
DQMEDAnalyzer edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 SiStripFEDCheckPlugin (const edm::ParameterSet &)
 
 ~SiStripFEDCheckPlugin () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void doUpdateIfNeeded ()
 
void dqmEndRun (edm::Run const &, edm::EventSetup const &) override
 
void fillFatalError (unsigned int fedId, bool fatalError)
 
void fillNonFatalError (unsigned int fedId, float nonFatalError)
 
void fillPresent (unsigned int fedId, bool present)
 
bool hasFatalError (const FEDRawData &fedData, unsigned int fedId) const
 
bool hasNonFatalError (const FEDRawData &fedData, unsigned int fedId) const
 
void updateCabling (const edm::EventSetup &eventSetup)
 
void updateHistograms ()
 

Private Attributes

const SiStripFedCablingcabling_
 
uint32_t cablingCacheId_
 
bool checkChannelLengths_
 
bool checkChannelStatusBits_
 
bool checkFELengths_
 
bool checkPacketCodes_
 
edm::ParameterSet conf_
 
std::string dirName_
 
bool doPayloadChecks_
 
bool doPLOTfedFatalErrors_
 
bool doPLOTfedNonFatalErrors_
 
bool doPLOTfedsPresent_
 
bool doPLOTnFEDinVsLS_
 
bool doPLOTnFEDinWdataVsLS_
 
unsigned int eventCount_
 
std::vector< unsigned int > fedFatalErrorBinContents_
 
MonitorElementfedFatalErrors_
 
std::vector< unsigned int > fedNonFatalErrorBinContents_
 
MonitorElementfedNonFatalErrors_
 
MonitorElementfedsPresent_
 
std::vector< unsigned int > fedsPresentBinContents_
 
MonitorElementnFEDinVsLS_
 
MonitorElementnFEDinWdataVsLS_
 
bool printDebug_
 
edm::InputTag rawDataTag_
 
edm::EDGetTokenT< FEDRawDataCollectionrawDataToken_
 
unsigned int siStripFedIdMax_
 
unsigned int siStripFedIdMin_
 
unsigned int updateFrequency_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Description: DQM source application to produce data integrety histograms for SiStrip data for use in HLT and Prompt reco

Definition at line 53 of file SiStripFEDDataCheck.cc.

Constructor & Destructor Documentation

SiStripFEDCheckPlugin::SiStripFEDCheckPlugin ( const edm::ParameterSet iConfig)
explicit

Definition at line 117 of file SiStripFEDDataCheck.cc.

References checkChannelLengths_, checkChannelStatusBits_, checkFELengths_, checkPacketCodes_, conf_, doPayloadChecks_, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINSiStripFEDID, printDebug_, rawDataTag_, rawDataToken_, siStripFedIdMax_, siStripFedIdMin_, and contentValuesCheck::ss.

118  : rawDataTag_(iConfig.getParameter<edm::InputTag>("RawDataTag")),
119  dirName_(iConfig.getUntrackedParameter<std::string>("DirName", "SiStrip/FEDIntegrity/")),
120  printDebug_(iConfig.getUntrackedParameter<bool>("PrintDebugMessages", false)),
121  doPLOTfedsPresent_(iConfig.getParameter<bool>("doPLOTfedsPresent")),
122  doPLOTfedFatalErrors_(iConfig.getParameter<bool>("doPLOTfedFatalErrors")),
123  doPLOTfedNonFatalErrors_(iConfig.getParameter<bool>("doPLOTfedNonFatalErrors")),
124  doPLOTnFEDinVsLS_(iConfig.getParameter<bool>("doPLOTnFEDinVsLS")),
125  doPLOTnFEDinWdataVsLS_(iConfig.getParameter<bool>("doPLOTnFEDinWdataVsLS")),
126  fedsPresent_(nullptr),
127  fedFatalErrors_(nullptr),
128  fedNonFatalErrors_(nullptr),
129  nFEDinVsLS_(nullptr),
130  nFEDinWdataVsLS_(nullptr),
131  updateFrequency_(iConfig.getUntrackedParameter<unsigned int>("HistogramUpdateFrequency", 0)),
135  eventCount_(0),
136  doPayloadChecks_(iConfig.getUntrackedParameter<bool>("DoPayloadChecks", true)),
137  checkChannelLengths_(iConfig.getUntrackedParameter<bool>("CheckChannelLengths", true)),
138  checkPacketCodes_(iConfig.getUntrackedParameter<bool>("CheckChannelPacketCodes", true)),
139  checkFELengths_(iConfig.getUntrackedParameter<bool>("CheckFELengths", true)),
140  checkChannelStatusBits_(iConfig.getUntrackedParameter<bool>("CheckChannelStatus", true)),
141  verbose_(iConfig.getUntrackedParameter<bool>("verbose", false)),
142  cablingCacheId_(0) {
143  rawDataToken_ = consumes<FEDRawDataCollection>(rawDataTag_);
145  std::stringstream ss;
146  ss << "Payload checks are disabled but individual payload checks have been enabled. The following payload checks "
147  "will be skipped: ";
149  ss << "Channel length check, ";
150  if (checkPacketCodes_)
151  ss << "Channel packet code check, ";
153  ss << "Cabled channel status bits checks, ";
154  if (checkFELengths_)
155  ss << "FE Unit legnth check";
156  edm::LogWarning("SiStripFEDCheck") << ss.str();
157  }
158 
161 
162  conf_ = iConfig;
163 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * nFEDinWdataVsLS_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
MonitorElement * fedNonFatalErrors_
std::vector< unsigned int > fedFatalErrorBinContents_
std::vector< unsigned int > fedsPresentBinContents_
MonitorElement * nFEDinVsLS_
MonitorElement * fedFatalErrors_
MonitorElement * fedsPresent_
std::vector< unsigned int > fedNonFatalErrorBinContents_
SiStripFEDCheckPlugin::~SiStripFEDCheckPlugin ( )
override

Definition at line 165 of file SiStripFEDDataCheck.cc.

165 {}

Member Function Documentation

void SiStripFEDCheckPlugin::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 172 of file SiStripFEDDataCheck.cc.

References edmScanValgrind::buffer, cabling_, checkChannelLengths_, checkChannelStatusBits_, checkFELengths_, checkPacketCodes_, gather_cfg::cout, FEDRawData::data(), doPayloadChecks_, doPLOTnFEDinVsLS_, doPLOTnFEDinWdataVsLS_, doUpdateIfNeeded(), FEDRawDataCollection::FEDData(), l1tstage2_dqm_sourceclient-live_cfg::fedId, dqm::impl::MonitorElement::Fill(), fillFatalError(), fillNonFatalError(), fillPresent(), edm::EventSetup::get(), edm::Event::getByToken(), edm::EventBase::id(), edm::EventID::luminosityBlock(), nFEDinVsLS_, nFEDinWdataVsLS_, printDebug_, edm::ESHandle< T >::product(), rawDataToken_, siStripFedIdMax_, siStripFedIdMin_, FEDRawData::size(), contentValuesCheck::ss, updateCabling(), and verbose_.

172  {
173  //Retrieve tracker topology from geometry
174  edm::ESHandle<TrackerTopology> tTopoHandle;
175  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
176  const TrackerTopology* const tTopo = tTopoHandle.product();
177 
178  //update cabling
179  updateCabling(iSetup);
180 
181  //get raw data
182  edm::Handle<FEDRawDataCollection> rawDataCollectionHandle;
183  const bool gotData = iEvent.getByToken(rawDataToken_, rawDataCollectionHandle);
184  if (verbose_)
185  std::cout << "[SiStripFEDCheckPlugin::analyze] gotData ? " << (gotData ? "YES" : "NOPE") << std::endl;
186  if (!gotData) {
187  //module is required to silently do nothing when data is not present
188  return;
189  }
190  const FEDRawDataCollection& rawDataCollection = *rawDataCollectionHandle;
191 
192  //FED errors
193  FEDErrors lFedErrors;
194 
195  //loop over siStrip FED IDs
196  size_t nFEDin = 0;
197  size_t nFEDinWdata = 0;
198  for (unsigned int fedId = siStripFedIdMin_; fedId <= siStripFedIdMax_; fedId++) {
199  const FEDRawData& fedData = rawDataCollection.FEDData(fedId);
200 
201  //create an object to fill all errors
202  //third param to false:save time by not initialising anything not used here
203  lFedErrors.initialiseFED(fedId, cabling_, tTopo, false);
204 
205  //check data exists
206  if (!fedData.size() || !fedData.data()) {
207  fillPresent(fedId, false);
208  continue;
209  }
210  if (verbose_)
211  std::cout << "FED " << fedId;
212  if (verbose_)
213  std::cout << " fedData.size(): " << fedData.size();
214  if (verbose_)
215  std::cout << " fedData.data(): " << fedData.data() << std::endl;
216  if (fedData.size())
217  nFEDin++;
218  if (fedData.size() && fedData.data())
219  nFEDinWdata++;
220 
221  //fill buffer present histogram
222  fillPresent(fedId, true);
223 
224  //check for fatal errors
225  //no need for debug output
226  bool hasFatalErrors = false;
227  float rateNonFatal = 0;
228 
229  std::unique_ptr<const sistrip::FEDBuffer> buffer;
230 
231  if (!lFedErrors.fillFatalFEDErrors(fedData, 0)) {
232  hasFatalErrors = true;
233  } else {
234  //need to construct full object to go any further
236  buffer.reset(new sistrip::FEDBuffer(fedData.data(), fedData.size(), true));
237  if (doPayloadChecks_) {
238  bool channelLengthsOK = checkChannelLengths_ ? buffer->checkChannelLengthsMatchBufferLength() : true;
239  bool channelPacketCodesOK = checkPacketCodes_ ? buffer->checkChannelPacketCodes() : true;
240  bool feLengthsOK = checkFELengths_ ? buffer->checkFEUnitLengths() : true;
241  if (!channelLengthsOK || !channelPacketCodesOK || !feLengthsOK) {
242  hasFatalErrors = true;
243  }
244  }
246  rateNonFatal = lFedErrors.fillNonFatalFEDErrors(buffer.get(), cabling_);
247  }
248  }
249 
250  if (hasFatalErrors) {
251  fillFatalError(fedId, true);
252  if (printDebug_) {
253  if (!buffer.get())
254  buffer.reset(new sistrip::FEDBuffer(fedData.data(), fedData.size(), true));
255  edm::LogInfo("SiStripFEDCheck") << "Fatal error with FED ID " << fedId << ". Check summary: " << std::endl
256  << buffer->checkSummary() << std::endl;
257  std::stringstream ss;
258  buffer->dump(ss);
259  edm::LogInfo("SiStripFEDCheck") << ss.str();
260  }
261  } else {
262  fillFatalError(fedId, false);
263  //fill non-fatal errors histogram if there were no fatal errors
264  fillNonFatalError(fedId, rateNonFatal);
265  if (printDebug_ && rateNonFatal > 0) {
266  if (!buffer.get())
267  buffer.reset(new sistrip::FEDBuffer(fedData.data(), fedData.size(), true));
268  edm::LogInfo("SiStripFEDCheck") << "Non-fatal error with FED ID " << fedId << " for " << rateNonFatal
269  << " of the channels. Check summary: " << std::endl
270  << buffer->checkSummary() << std::endl;
271  std::stringstream ss;
272  buffer->dump(ss);
273  edm::LogInfo("SiStripFEDCheck") << ss.str();
274  }
275  }
276  } //loop over FED IDs
277  if (verbose_)
278  std::cout << "nFEDin: " << nFEDin << " nFEDinWdata: " << nFEDinWdata << std::endl;
279  if (doPLOTnFEDinVsLS_)
280  nFEDinVsLS_->Fill(static_cast<double>(iEvent.id().luminosityBlock()), nFEDin);
282  nFEDinWdataVsLS_->Fill(static_cast<double>(iEvent.id().luminosityBlock()), nFEDinWdata);
283 
284  //update histograms if needed
286 }
MonitorElement * nFEDinWdataVsLS_
void fillFatalError(unsigned int fedId, bool fatalError)
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
const SiStripFedCabling * cabling_
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:39
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
void Fill(long long x)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
MonitorElement * nFEDinVsLS_
edm::EventID id() const
Definition: EventBase.h:59
T get() const
Definition: EventSetup.h:73
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
void updateCabling(const edm::EventSetup &eventSetup)
void fillNonFatalError(unsigned int fedId, float nonFatalError)
T const * product() const
Definition: ESHandle.h:86
void fillPresent(unsigned int fedId, bool present)
void SiStripFEDCheckPlugin::bookHistograms ( DQMStore::IBooker ,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 289 of file SiStripFEDDataCheck.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::bookProfile(), conf_, dirName_, doPLOTfedFatalErrors_, doPLOTfedNonFatalErrors_, doPLOTfedsPresent_, doPLOTnFEDinVsLS_, doPLOTnFEDinWdataVsLS_, fedFatalErrors_, fedNonFatalErrors_, fedsPresent_, edm::ParameterSet::getParameter(), siStripFEDCheck_cfi::LSBin, siStripFEDCheck_cfi::LSMax, siStripFEDCheck_cfi::LSMin, nFEDinVsLS_, nFEDinWdataVsLS_, dqm::impl::MonitorElement::setAxisTitle(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), siStripFedIdMax_, and siStripFedIdMin_.

291  {
292  size_t nFED = siStripFedIdMax_ - siStripFedIdMin_ + 1;
293  double xFEDmin = siStripFedIdMin_ - 0.5;
294  double xFEDmax = siStripFedIdMax_ + 0.5;
295 
296  //get DQM store
297  ibooker.setCurrentFolder(dirName_);
298  //book histograms
299  if (doPLOTfedsPresent_) {
300  fedsPresent_ =
301  ibooker.book1D("FEDEntries", "Number of times FED buffer is present in data", nFED, xFEDmin, xFEDmax);
302  fedsPresent_->setAxisTitle("FED-ID", 1);
303  }
304 
305  if (doPLOTfedFatalErrors_) {
306  fedFatalErrors_ = ibooker.book1D("FEDFatal", "Number of fatal errors in FED buffer", nFED, xFEDmin, xFEDmax);
307  fedFatalErrors_->setAxisTitle("FED-ID", 1);
308  }
309 
312  ibooker.book1D("FEDNonFatal", "Number of non fatal errors in FED buffer", nFED, xFEDmin, xFEDmax);
313  fedNonFatalErrors_->setAxisTitle("FED-ID", 1);
314  }
315 
316  int LSBin = conf_.getParameter<int>("LSBin");
317  double LSMin = conf_.getParameter<double>("LSMin");
318  double LSMax = conf_.getParameter<double>("LSMax");
319 
320  if (doPLOTnFEDinVsLS_) {
321  nFEDinVsLS_ =
322  ibooker.bookProfile("nFEDinVsLS", "number of FED in Vs LS", LSBin, LSMin, LSMax, nFED, xFEDmin, xFEDmax);
323  nFEDinVsLS_->setAxisTitle("LS", 1);
324  nFEDinVsLS_->setAxisTitle("FED-ID", 2);
325  }
326 
328  nFEDinWdataVsLS_ = ibooker.bookProfile(
329  "nFEDinWdataVsLS", "number of FED in (with data) Vs LS", LSBin, LSMin, LSMax, nFED, xFEDmin, xFEDmax);
330  nFEDinWdataVsLS_->setAxisTitle("LS", 1);
331  nFEDinWdataVsLS_->setAxisTitle("FED-ID", 2);
332  }
333 }
T getParameter(std::string const &) const
MonitorElement * nFEDinWdataVsLS_
MonitorElement * fedNonFatalErrors_
MonitorElement * nFEDinVsLS_
MonitorElement * fedFatalErrors_
MonitorElement * fedsPresent_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiStripFEDCheckPlugin::doUpdateIfNeeded ( )
private

Definition at line 380 of file SiStripFEDDataCheck.cc.

References eventCount_, updateFrequency_, and updateHistograms().

Referenced by analyze().

380  {
381  eventCount_++;
384  }
385 }
void SiStripFEDCheckPlugin::dqmEndRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivatevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 336 of file SiStripFEDDataCheck.cc.

References updateHistograms().

void SiStripFEDCheckPlugin::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 415 of file SiStripFEDDataCheck.cc.

References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::addDefault(), edm::ParameterSetDescription::addUntracked(), DEFINE_FWK_MODULE, HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

415  {
417 
418  // Directory to book histograms in
419  desc.addUntracked<std::string>("DirName", "SiStrip/FEDIntegrity/");
420  // Raw data collection
421  desc.add<edm::InputTag>("RawDataTag", edm::InputTag("source"));
422  // Number of events to cache info before updating histograms
423  // (set to zero to disable cache)
424  // HistogramUpdateFrequency = cms.untracked.uint32(0),
425  desc.addUntracked<unsigned int>("HistogramUpdateFrequency", 1000);
426  // Print info about errors buffer dumps to LogInfo(SiStripFEDCheck)
427  desc.addUntracked<bool>("PrintDebugMessages", false);
428  desc.add<bool>("doPLOTfedsPresent", true);
429  desc.add<bool>("doPLOTfedFatalErrors", true);
430  desc.add<bool>("doPLOTfedNonFatalErrors", true);
431  desc.add<bool>("doPLOTnFEDinVsLS", false);
432  desc.add<bool>("doPLOTnFEDinWdataVsLS", false);
433  // Write the DQM store to a file (DQMStore.root) at the end of the run
434  desc.addUntracked<bool>("WriteDQMStore", false);
435  // Use to disable all payload (non-fatal) checks
436  desc.addUntracked<bool>("DoPayloadChecks", true);
437  // Use to disable check on channel lengths
438  desc.addUntracked<bool>("CheckChannelLengths", true);
439  // Use to disable check on channel packet codes
440  desc.addUntracked<bool>("CheckChannelPacketCodes", true);
441  // Use to disable check on FE unit lengths in full debug header
442  desc.addUntracked<bool>("CheckFELengths", true);
443  // Use to disable check on channel status bits
444  desc.addUntracked<bool>("CheckChannelStatus", true);
445  desc.add<int>("LSBin", 5000);
446  desc.add<double>("LSMin", 0.5);
447  desc.add<double>("LSMax", 5000.5);
448 
449  descriptions.addDefault(desc);
450 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void addDefault(ParameterSetDescription const &psetDescription)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void SiStripFEDCheckPlugin::fillFatalError ( unsigned int  fedId,
bool  fatalError 
)
inlineprivate

Definition at line 357 of file SiStripFEDDataCheck.cc.

References doPLOTfedFatalErrors_, fedFatalErrorBinContents_, fedFatalErrors_, l1tstage2_dqm_sourceclient-live_cfg::fedId, dqm::impl::MonitorElement::Fill(), and updateFrequency_.

Referenced by analyze().

357  {
358  if (updateFrequency_) {
359  if (fatalError)
361  } else {
362  //fedFatalErrors_->Fill( fatalError ? 1 : 0 );
363  if (fatalError)
366  }
367 }
void Fill(long long x)
std::vector< unsigned int > fedFatalErrorBinContents_
MonitorElement * fedFatalErrors_
void SiStripFEDCheckPlugin::fillNonFatalError ( unsigned int  fedId,
float  nonFatalError 
)
inlineprivate

Definition at line 369 of file SiStripFEDDataCheck.cc.

References doPLOTfedNonFatalErrors_, l1tstage2_dqm_sourceclient-live_cfg::fedId, fedNonFatalErrorBinContents_, fedNonFatalErrors_, dqm::impl::MonitorElement::Fill(), and updateFrequency_.

Referenced by analyze().

369  {
370  if (updateFrequency_) {
371  if (nonFatalError > 0)
372  fedNonFatalErrorBinContents_[fedId]++; //nonFatalError;
373  } else {
374  if (nonFatalError > 0)
377  }
378 }
MonitorElement * fedNonFatalErrors_
void Fill(long long x)
std::vector< unsigned int > fedNonFatalErrorBinContents_
void SiStripFEDCheckPlugin::fillPresent ( unsigned int  fedId,
bool  present 
)
inlineprivate
bool SiStripFEDCheckPlugin::hasFatalError ( const FEDRawData fedData,
unsigned int  fedId 
) const
private
bool SiStripFEDCheckPlugin::hasNonFatalError ( const FEDRawData fedData,
unsigned int  fedId 
) const
private
void SiStripFEDCheckPlugin::updateCabling ( const edm::EventSetup eventSetup)
private

Definition at line 338 of file SiStripFEDDataCheck.cc.

References cabling_, cablingCacheId_, edm::EventSetup::get(), and edm::ESHandle< T >::product().

Referenced by analyze().

338  {
339  uint32_t currentCacheId = eventSetup.get<SiStripFedCablingRcd>().cacheIdentifier();
340  if (cablingCacheId_ != currentCacheId) {
341  edm::ESHandle<SiStripFedCabling> cablingHandle;
342  eventSetup.get<SiStripFedCablingRcd>().get(cablingHandle);
343  cabling_ = cablingHandle.product();
344  cablingCacheId_ = currentCacheId;
345  }
346 }
const SiStripFedCabling * cabling_
T get() const
Definition: EventSetup.h:73
T const * product() const
Definition: ESHandle.h:86
void SiStripFEDCheckPlugin::updateHistograms ( )
private

Definition at line 387 of file SiStripFEDDataCheck.cc.

References newFWLiteAna::bin, doPLOTfedFatalErrors_, doPLOTfedNonFatalErrors_, doPLOTfedsPresent_, fedFatalErrorBinContents_, fedFatalErrors_, l1tstage2_dqm_sourceclient-live_cfg::fedId, fedNonFatalErrorBinContents_, fedNonFatalErrors_, fedsPresent_, fedsPresentBinContents_, dqm::impl::MonitorElement::getTH1(), siStripFedIdMax_, siStripFedIdMin_, and updateFrequency_.

Referenced by doUpdateIfNeeded(), and dqmEndRun().

387  {
388  //if the cache is not being used then do nothing
389  if (!updateFrequency_)
390  return;
391  unsigned int entriesFedsPresent = 0;
392  unsigned int entriesFatalErrors = 0;
393  unsigned int entriesNonFatalErrors = 0;
394  for (unsigned int fedId = siStripFedIdMin_, bin = 1; fedId < siStripFedIdMax_ + 1; fedId++, bin++) {
395  unsigned int fedsPresentBin = fedsPresentBinContents_[fedId];
396  if (doPLOTfedsPresent_)
397  fedsPresent_->getTH1()->SetBinContent(bin, fedsPresentBin);
398  entriesFedsPresent += fedsPresentBin;
399  unsigned int fedFatalErrorsBin = fedFatalErrorBinContents_[fedId];
401  fedFatalErrors_->getTH1()->SetBinContent(bin, fedFatalErrorsBin);
402  entriesFatalErrors += fedFatalErrorsBin;
403  unsigned int fedNonFatalErrorsBin = fedNonFatalErrorBinContents_[fedId];
405  fedNonFatalErrors_->getTH1()->SetBinContent(bin, fedNonFatalErrorsBin);
406  entriesNonFatalErrors += fedNonFatalErrorsBin;
407  }
408  if (doPLOTfedsPresent_)
409  fedsPresent_->getTH1()->SetEntries(entriesFedsPresent);
411  fedFatalErrors_->getTH1()->SetEntries(entriesFatalErrors);
413  fedNonFatalErrors_->getTH1()->SetEntries(entriesNonFatalErrors);
414 }
MonitorElement * fedNonFatalErrors_
std::vector< unsigned int > fedFatalErrorBinContents_
std::vector< unsigned int > fedsPresentBinContents_
MonitorElement * fedFatalErrors_
MonitorElement * fedsPresent_
std::vector< unsigned int > fedNonFatalErrorBinContents_

Member Data Documentation

const SiStripFedCabling* SiStripFEDCheckPlugin::cabling_
private

Definition at line 105 of file SiStripFEDDataCheck.cc.

Referenced by analyze(), and updateCabling().

uint32_t SiStripFEDCheckPlugin::cablingCacheId_
private

Definition at line 104 of file SiStripFEDDataCheck.cc.

Referenced by updateCabling().

bool SiStripFEDCheckPlugin::checkChannelLengths_
private

Definition at line 101 of file SiStripFEDDataCheck.cc.

Referenced by analyze(), and SiStripFEDCheckPlugin().

bool SiStripFEDCheckPlugin::checkChannelStatusBits_
private

Definition at line 101 of file SiStripFEDDataCheck.cc.

Referenced by analyze(), and SiStripFEDCheckPlugin().

bool SiStripFEDCheckPlugin::checkFELengths_
private

Definition at line 101 of file SiStripFEDDataCheck.cc.

Referenced by analyze(), and SiStripFEDCheckPlugin().

bool SiStripFEDCheckPlugin::checkPacketCodes_
private

Definition at line 101 of file SiStripFEDDataCheck.cc.

Referenced by analyze(), and SiStripFEDCheckPlugin().

edm::ParameterSet SiStripFEDCheckPlugin::conf_
private

Definition at line 110 of file SiStripFEDDataCheck.cc.

Referenced by bookHistograms(), and SiStripFEDCheckPlugin().

std::string SiStripFEDCheckPlugin::dirName_
private

Definition at line 78 of file SiStripFEDDataCheck.cc.

Referenced by bookHistograms().

bool SiStripFEDCheckPlugin::doPayloadChecks_
private

Definition at line 101 of file SiStripFEDDataCheck.cc.

Referenced by analyze(), and SiStripFEDCheckPlugin().

bool SiStripFEDCheckPlugin::doPLOTfedFatalErrors_
private

Definition at line 82 of file SiStripFEDDataCheck.cc.

Referenced by bookHistograms(), fillFatalError(), and updateHistograms().

bool SiStripFEDCheckPlugin::doPLOTfedNonFatalErrors_
private

Definition at line 82 of file SiStripFEDDataCheck.cc.

Referenced by bookHistograms(), fillNonFatalError(), and updateHistograms().

bool SiStripFEDCheckPlugin::doPLOTfedsPresent_
private

Definition at line 82 of file SiStripFEDDataCheck.cc.

Referenced by bookHistograms(), fillPresent(), and updateHistograms().

bool SiStripFEDCheckPlugin::doPLOTnFEDinVsLS_
private

Definition at line 83 of file SiStripFEDDataCheck.cc.

Referenced by analyze(), and bookHistograms().

bool SiStripFEDCheckPlugin::doPLOTnFEDinWdataVsLS_
private

Definition at line 83 of file SiStripFEDDataCheck.cc.

Referenced by analyze(), and bookHistograms().

unsigned int SiStripFEDCheckPlugin::eventCount_
private

Definition at line 98 of file SiStripFEDDataCheck.cc.

Referenced by doUpdateIfNeeded().

std::vector<unsigned int> SiStripFEDCheckPlugin::fedFatalErrorBinContents_
private

Definition at line 96 of file SiStripFEDDataCheck.cc.

Referenced by fillFatalError(), and updateHistograms().

MonitorElement* SiStripFEDCheckPlugin::fedFatalErrors_
private

Definition at line 85 of file SiStripFEDDataCheck.cc.

Referenced by bookHistograms(), fillFatalError(), and updateHistograms().

std::vector<unsigned int> SiStripFEDCheckPlugin::fedNonFatalErrorBinContents_
private

Definition at line 97 of file SiStripFEDDataCheck.cc.

Referenced by fillNonFatalError(), and updateHistograms().

MonitorElement* SiStripFEDCheckPlugin::fedNonFatalErrors_
private

Definition at line 86 of file SiStripFEDDataCheck.cc.

Referenced by bookHistograms(), fillNonFatalError(), and updateHistograms().

MonitorElement* SiStripFEDCheckPlugin::fedsPresent_
private

Definition at line 84 of file SiStripFEDDataCheck.cc.

Referenced by bookHistograms(), fillPresent(), and updateHistograms().

std::vector<unsigned int> SiStripFEDCheckPlugin::fedsPresentBinContents_
private

Definition at line 95 of file SiStripFEDDataCheck.cc.

Referenced by fillPresent(), and updateHistograms().

MonitorElement* SiStripFEDCheckPlugin::nFEDinVsLS_
private

Definition at line 88 of file SiStripFEDDataCheck.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripFEDCheckPlugin::nFEDinWdataVsLS_
private

Definition at line 89 of file SiStripFEDDataCheck.cc.

Referenced by analyze(), and bookHistograms().

bool SiStripFEDCheckPlugin::printDebug_
private

Definition at line 79 of file SiStripFEDDataCheck.cc.

Referenced by analyze(), and SiStripFEDCheckPlugin().

edm::InputTag SiStripFEDCheckPlugin::rawDataTag_
private

Definition at line 76 of file SiStripFEDDataCheck.cc.

Referenced by SiStripFEDCheckPlugin().

edm::EDGetTokenT<FEDRawDataCollection> SiStripFEDCheckPlugin::rawDataToken_
private

Definition at line 77 of file SiStripFEDDataCheck.cc.

Referenced by analyze(), and SiStripFEDCheckPlugin().

unsigned int SiStripFEDCheckPlugin::siStripFedIdMax_
private
unsigned int SiStripFEDCheckPlugin::siStripFedIdMin_
private
unsigned int SiStripFEDCheckPlugin::updateFrequency_
private
bool SiStripFEDCheckPlugin::verbose_
private

Definition at line 101 of file SiStripFEDDataCheck.cc.

Referenced by analyze().