Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DQM] DT Fixing FEDFatal #36448

Merged
merged 11 commits into from Dec 14, 2021
6 changes: 4 additions & 2 deletions DQM/DTMonitorClient/src/DTDataIntegrityTest.cc
Expand Up @@ -132,11 +132,13 @@ void DTDataIntegrityTest::dqmEndLuminosityBlock(DQMStore::IBooker& ibooker,
// Get the histos for FED integrity
string fedIntegrityFolder = "DT/00-DataIntegrity/";
MonitorElement* hFEDEntry = igetter.get(fedIntegrityFolder + "FEDEntries");
MonitorElement* hFEDFatal = igetter.get(fedIntegrityFolder + "FEDFatal");

if (hFEDEntry) {
if (hFEDEntry && hFEDFatal) {
int offsetFED = 1368;
// Check that the FED is in the ReadOut using the FEDIntegrity histos
bool fedNotReadout = (hFEDEntry->getBinContent(dduId - offsetFED)) == 0;
bool fedNotReadout =
(hFEDEntry->getBinContent(dduId - offsetFED) == 0 && hFEDFatal->getBinContent(dduId - offsetFED) == 0);
int wheel = dduId - offsetFED - 2;
if (FED_ROSSummary1 && FED_ROSSummary2 && FED_ROSStatus && FED_EvLength && !fedNotReadout) {
TH2F* histoFEDSummary1 = FED_ROSSummary1->getTH2F();
Expand Down
2 changes: 0 additions & 2 deletions DQM/DTMonitorClient/src/DTSegmentAnalysisTest.cc
Expand Up @@ -24,8 +24,6 @@
#include "DQMServices/Core/interface/DQMStore.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

#include "DQM/DTMonitorModule/interface/DTTimeEvolutionHisto.h"

#include <iostream>
#include <cstdio>
#include <string>
Expand Down
24 changes: 17 additions & 7 deletions DQM/DTMonitorModule/interface/DTDataIntegrityTask.h
Expand Up @@ -15,6 +15,7 @@
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/EDGetToken.h"
#include "FWCore/Framework/interface/LuminosityBlock.h"

#include "DQMServices/Core/interface/DQMStore.h"
Expand All @@ -28,11 +29,15 @@
#include <vector>
#include <list>

namespace dtdi {
struct Void {};
} // namespace dtdi

class DTuROSROSData;
class DTuROSFEDData;
class DTTimeEvolutionHisto;

class DTDataIntegrityTask : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {
class DTDataIntegrityTask : public DQMOneEDAnalyzer<edm::LuminosityBlockCache<dtdi::Void>> {
public:
DTDataIntegrityTask(const edm::ParameterSet& ps);

Expand All @@ -43,8 +48,9 @@ class DTDataIntegrityTask : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlo
void processuROS(DTuROSROSData& data, int fed, int uRos);
void processFED(DTuROSFEDData& data, int fed);

void beginLuminosityBlock(const edm::LuminosityBlock& ls, const edm::EventSetup& es) override;
void endLuminosityBlock(const edm::LuminosityBlock& ls, const edm::EventSetup& es) override;
std::shared_ptr<dtdi::Void> globalBeginLuminosityBlock(const edm::LuminosityBlock& ls,
const edm::EventSetup& es) const override;
void globalEndLuminosityBlock(const edm::LuminosityBlock& ls, const edm::EventSetup& es) override;

void analyze(const edm::Event& e, const edm::EventSetup& c) override;

Expand All @@ -71,9 +77,9 @@ class DTDataIntegrityTask : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlo
// Monitor Elements
MonitorElement* nEventMonitor;
// <histoType, <index , histo> >
std::map<std::string, std::map<int, MonitorElement*> > fedHistos;
std::map<std::string, std::map<int, MonitorElement*>> fedHistos;
// <histoType, histo> >
std::map<std::string, std::map<int, MonitorElement*> > summaryHistos;
std::map<std::string, std::map<int, MonitorElement*>> summaryHistos;
// <key , histo> >
std::map<unsigned int, MonitorElement*> urosHistos;

Expand All @@ -83,21 +89,25 @@ class DTDataIntegrityTask : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlo

// standard ME for monitoring of FED integrity
MonitorElement* hFEDEntry;
MonitorElement* hFEDFatal;

//time histos for FEDs/uROS
std::map<std::string, std::map<int, DTTimeEvolutionHisto*> > fedTimeHistos;
std::map<std::string, std::map<int, DTTimeEvolutionHisto*>> fedTimeHistos;
// <key, histo> >
std::map<unsigned int, DTTimeEvolutionHisto*> urosTimeHistos;
//key = (fed-minFED)#*100 + (uROS-minuROS)#

int nEventsLS;
mutable int nEventsLS;

int neventsFED;
int neventsuROS;

int FEDIDmin;
int FEDIDmax;

int errorX[6][12][5] = {{{0}}}; //5th is notOK flag and 6th is TDC Fatal; Second index is ROS. Last index is wheel
int nLinksForFatal; //Minumum number of Links/wheel with notOKFlag or TDC fatal errors to consider a FEDfatal event

// Number of uROS per FED
const int NuROS = 12;

Expand Down
99 changes: 0 additions & 99 deletions DQM/DTMonitorModule/interface/DTDataIntegrityUrosOffline.h

This file was deleted.

3 changes: 0 additions & 3 deletions DQM/DTMonitorModule/plugins/plugins.cc
Expand Up @@ -54,9 +54,6 @@ DEFINE_FWK_MODULE(DTDCSByLumiTask);
#include "DQM/DTMonitorModule/interface/DTDataIntegrityTask.h"
DEFINE_FWK_MODULE(DTDataIntegrityTask);

#include "DQM/DTMonitorModule/interface/DTDataIntegrityUrosOffline.h"
DEFINE_FWK_MODULE(DTDataIntegrityUrosOffline);

#include "DQM/DTMonitorModule/interface/DTDataIntegrityROSOffline.h"
DEFINE_FWK_MODULE(DTDataIntegrityROSOffline);

Expand Down
5 changes: 4 additions & 1 deletion DQM/DTMonitorModule/python/dtDataIntegrityTask_cfi.py
Expand Up @@ -3,6 +3,7 @@
from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
dtDataIntegrityTask = DQMEDAnalyzer('DTDataIntegrityTask',
fedIntegrityFolder = cms.untracked.string('DT/FEDIntegrity'),
nLinksForFatal = cms.untracked.int32(15),
processingMode = cms.untracked.string('Online'),
dtFEDlabel = cms.InputTag('dtDataIntegrityUnpacker')
)
Expand All @@ -14,8 +15,10 @@
dtROS25Label = cms.InputTag('dtDataIntegrityUnpacker'),
)

dtDataIntegrityUrosOffline = DQMEDAnalyzer('DTDataIntegrityUrosOffline',
dtDataIntegrityUrosOffline = DQMEDAnalyzer('DTDataIntegrityTask',
fedIntegrityFolder = cms.untracked.string('DT/FEDIntegrity'),
nLinksForFatal = cms.untracked.int32(15),
processingMode = cms.untracked.string('Offline'),
dtFEDlabel = cms.InputTag('dtDataIntegrityUnpacker')
)

Expand Down