CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
DTDataIntegrityUrosOffline Class Reference

#include <DTDataIntegrityUrosOffline.h>

Inheritance diagram for DTDataIntegrityUrosOffline:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
 DTDataIntegrityUrosOffline (const edm::ParameterSet &ps)
 
void processFED (DTuROSFEDData &data, int fed)
 
void processuROS (DTuROSROSData &data, int fed, int uRos)
 
 ~DTDataIntegrityUrosOffline () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Protected Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Types

enum  histoTypes { uROSEventLength = 0, uROSError = 1, TDCError = 4, TTSValues = 7 }
 

Private Member Functions

void bookHistos (DQMStore::IBooker &, const int fedMin, const int fedMax)
 
void bookHistos (DQMStore::IBooker &, std::string folder, const int fed)
 
void bookHistosROS (DQMStore::IBooker &, const int wheel, const int ros)
 
void bookHistosuROS (DQMStore::IBooker &, const int fed, const int uRos)
 
int theDDU (int crate, int slot, int link, bool tenDDU)
 
int theROS (int slot, int link)
 
std::string topFolder (bool isFEDIntegrity) const
 

Private Attributes

std::map< std::string, std::map< int, MonitorElement * > > fedHistos
 
int FEDIDmax
 
int FEDIDmin
 
std::string fedIntegrityFolder
 
edm::EDGetTokenT< DTuROSFEDDataCollectionfedToken
 
MonitorElementhFEDEntry
 
MonitorElementnEventMonitor
 
int nevents
 
int neventsFED
 
int nEventsLS
 
int neventsuROS
 
const int NuROS = 12
 
std::map< std::string, std::map< int, MonitorElement * > > summaryHistos
 
std::map< unsigned int, MonitorElement * > urosHistos
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Class for DT Data Integrity Offline expected to monitor uROS to follow DTDataIntegrityTask which contains also MEs vs Time/LS

Author
Javier Fernandez (Uni. Oviedo)

Definition at line 33 of file DTDataIntegrityUrosOffline.h.

Member Enumeration Documentation

◆ histoTypes

Enumerator
uROSEventLength 
uROSError 
TDCError 
TTSValues 

Definition at line 72 of file DTDataIntegrityUrosOffline.h.

72 { uROSEventLength = 0, uROSError = 1, TDCError = 4, TTSValues = 7 };

Constructor & Destructor Documentation

◆ DTDataIntegrityUrosOffline()

DTDataIntegrityUrosOffline::DTDataIntegrityUrosOffline ( const edm::ParameterSet ps)

Definition at line 27 of file DTDataIntegrityUrosOffline.cc.

27  : nevents(0) {
28  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
29  << "[DTDataIntegrityUrosOffline]: Constructor" << endl;
30 
31  fedToken = consumes<DTuROSFEDDataCollection>(ps.getParameter<InputTag>("dtFEDlabel"));
34 
35  neventsFED = 0;
36  neventsuROS = 0;
37 
38  fedIntegrityFolder = ps.getUntrackedParameter<string>("fedIntegrityFolder", "DT/FEDIntegrity");
39 }

References FEDIDmax, FEDIDmin, fedIntegrityFolder, fedToken, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), LogTrace, FEDNumbering::MAXDTUROSFEDID, FEDNumbering::MINDTUROSFEDID, neventsFED, and neventsuROS.

◆ ~DTDataIntegrityUrosOffline()

DTDataIntegrityUrosOffline::~DTDataIntegrityUrosOffline ( )
override

Definition at line 41 of file DTDataIntegrityUrosOffline.cc.

41  {
42  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
43  << "[DTDataIntegrityUrosOffline]: Destructor. Analyzed " << neventsFED << " events" << endl;
44  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
45  << "[DTDataIntegrityUrosOffline]: postEndJob called!" << endl;
46 }

References LogTrace, and neventsFED.

Member Function Documentation

◆ analyze()

void DTDataIntegrityUrosOffline::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 488 of file DTDataIntegrityUrosOffline.cc.

488  {
489  nevents++;
491 
492  LogTrace("DTRawToDigi|TDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
493  << "[DTDataIntegrityUrosOffline]: preProcessEvent" << endl;
494 
495  // Digi collection
497  e.getByToken(fedToken, fedCol);
498  DTuROSFEDData fedData;
499  DTuROSROSData urosData;
500 
501  if (fedCol.isValid()) {
502  for (unsigned int j = 0; j < fedCol->size(); ++j) {
503  fedData = fedCol->at(j);
504  int fed = fedData.getfed(); //argument should be void
505  if (fed > FEDIDmax || fed < FEDIDmin) {
506  LogError("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
507  << "[DTDataIntegrityUrosOffline]: analyze, FED ID " << fed << " not expected." << endl;
508  continue;
509  }
510  processFED(fedData, fed);
511 
512  for (int slot = 1; slot <= DOCESLOTS; ++slot) {
513  urosData = fedData.getuROS(slot);
514  if (fedData.getslotsize(slot) == 0 || urosData.getslot() == -1)
515  continue;
516  processuROS(urosData, fed, slot);
517  }
518  }
519  }
520 }

References DOCESLOTS, MillePedeFileConverter_cfg::e, FEDIDmax, FEDIDmin, fedToken, dqm::impl::MonitorElement::Fill(), DTuROSFEDData::getfed(), DTuROSROSData::getslot(), DTuROSFEDData::getslotsize(), DTuROSFEDData::getuROS(), edm::HandleBase::isValid(), dqmiolumiharvest::j, LogTrace, nEventMonitor, nevents, processFED(), and processuROS().

◆ bookHistograms()

void DTDataIntegrityUrosOffline::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 57 of file DTDataIntegrityUrosOffline.cc.

59  {
60  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
61  << "[DTDataIntegrityUrosOffline]: postBeginJob" << endl;
62 
63  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
64  << "[DTDataIntegrityUrosOffline] Get DQMStore service" << endl;
65 
66  // Loop over the DT FEDs
67 
68  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
69  << " FEDS: " << FEDIDmin << " to " << FEDIDmax << " in the RO" << endl;
70 
71  // book FED integrity histos
72  bookHistos(ibooker, FEDIDmin, FEDIDmax);
73 
74  // static booking of the histograms
75 
76  for (int fed = FEDIDmin; fed <= FEDIDmax; ++fed) { // loop over the FEDs in the readout
77 
78  bookHistos(ibooker, string("FED"), fed);
79 
80  bookHistos(ibooker, string("CRATE"), fed);
81 
82  for (int uRos = 1; uRos <= NuROS; ++uRos) { // loop over all ROS
83  bookHistosuROS(ibooker, fed, uRos);
84  }
85  }
86 
87  for (int wheel = -2; wheel < 3; ++wheel) {
88  for (int ros = 1; ros <= NuROS; ++ros) { // loop over all ROS
89  bookHistosROS(ibooker, wheel, ros);
90  }
91  }
92 }

References bookHistos(), bookHistosROS(), bookHistosuROS(), FEDIDmax, FEDIDmin, LogTrace, NuROS, and makeMuonMisalignmentScenario::wheel.

◆ bookHistos() [1/2]

void DTDataIntegrityUrosOffline::bookHistos ( DQMStore::IBooker ibooker,
const int  fedMin,
const int  fedMax 
)
private

Definition at line 94 of file DTDataIntegrityUrosOffline.cc.

94  {
95  ibooker.setCurrentFolder("DT/EventInfo/Counters");
96  nEventMonitor = ibooker.bookFloat("nProcessedEventsDataIntegrity");
97 
98  // Standard FED integrity histos
99  ibooker.setCurrentFolder(topFolder(true));
100 
101  int nFED = (fedMax - fedMin) + 1;
102 
103  hFEDEntry = ibooker.book1D("FEDEntries", "# entries per DT FED", nFED, fedMin, fedMax + 1);
104 
105  string histoType = "ROSSummary";
106  for (int wheel = -2; wheel < 3; ++wheel) {
107  string wheel_s = to_string(wheel);
108  string histoName = "ROSSummary_W" + wheel_s;
109  string fed_s = to_string(FEDIDmin + 1); //3 FEDs from 2018 onwards
110  if (wheel < 0)
111  fed_s = to_string(FEDIDmin);
112  else if (wheel > 0)
113  fed_s = to_string(FEDIDmax);
114  string histoTitle = "Summary Wheel" + wheel_s + " (FED " + fed_s + ")";
115 
116  ((summaryHistos[histoType])[wheel]) = ibooker.book2D(histoName, histoTitle, 11, 0, 11, 12, 1, 13);
117  MonitorElement* histo = ((summaryHistos[histoType])[wheel]);
118  histo->setBinLabel(1, "Error 1", 1);
119  histo->setBinLabel(2, "Error 2", 1);
120  histo->setBinLabel(3, "Error 3", 1);
121  histo->setBinLabel(4, "Error 4", 1);
122  histo->setBinLabel(5, "Not OKflag", 1);
123  // TDC error bins
124  histo->setBinLabel(6, "TDC Fatal", 1);
125  histo->setBinLabel(7, "TDC RO FIFO ov.", 1);
126  histo->setBinLabel(8, "TDC L1 buf. ov.", 1);
127  histo->setBinLabel(9, "TDC L1A FIFO ov.", 1);
128  histo->setBinLabel(10, "TDC hit err.", 1);
129  histo->setBinLabel(11, "TDC hit rej.", 1);
130 
131  histo->setBinLabel(1, "ROS1", 2);
132  histo->setBinLabel(2, "ROS2", 2);
133  histo->setBinLabel(3, "ROS3", 2);
134  histo->setBinLabel(4, "ROS4", 2);
135  histo->setBinLabel(5, "ROS5", 2);
136  histo->setBinLabel(6, "ROS6", 2);
137  histo->setBinLabel(7, "ROS7", 2);
138  histo->setBinLabel(8, "ROS8", 2);
139  histo->setBinLabel(9, "ROS9", 2);
140  histo->setBinLabel(10, "ROS10", 2);
141  histo->setBinLabel(11, "ROS11", 2);
142  histo->setBinLabel(12, "ROS12", 2);
143  }
144 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), FEDIDmax, FEDIDmin, hFEDEntry, timingPdfMaker::histo, HltBtagPostValidation_cff::histoName, nEventMonitor, dqm::implementation::NavigatorBase::setCurrentFolder(), summaryHistos, topFolder(), and makeMuonMisalignmentScenario::wheel.

Referenced by bookHistograms().

◆ bookHistos() [2/2]

void DTDataIntegrityUrosOffline::bookHistos ( DQMStore::IBooker ,
std::string  folder,
const int  fed 
)
private

◆ bookHistosROS()

void DTDataIntegrityUrosOffline::bookHistosROS ( DQMStore::IBooker ibooker,
const int  wheel,
const int  ros 
)
private

Definition at line 242 of file DTDataIntegrityUrosOffline.cc.

242  {
243  string wheel_s = to_string(wheel);
244  string ros_s = to_string(ros);
245  ibooker.setCurrentFolder(topFolder(false) + "Wheel" + wheel_s + "/ROS" + ros_s);
246 
247  string histoType = "ROSError";
248  int linkDown = 0;
249  string linkDown_s = to_string(linkDown);
250  int linkUp = linkDown + 24;
251  string linkUp_s = to_string(linkUp);
252  string histoName = "W" + wheel_s + "_" + "ROS" + ros_s + "_" + histoType;
253  string histoTitle = histoName + " (Link " + linkDown_s + "-" + linkUp_s + " error summary)";
254  unsigned int keyHisto = (uROSError)*1000 + (wheel + 2) * 100 + (ros - 1);
255  urosHistos[keyHisto] = ibooker.book2D(histoName, histoTitle, 5, 0, 5, 25, 0, 25);
256 
258  // uROS error bins
259  // Placeholders for the moment
260  histo->setBinLabel(1, "Error 1", 1);
261  histo->setBinLabel(2, "Error 2", 1);
262  histo->setBinLabel(3, "Error 3", 1);
263  histo->setBinLabel(4, "Error 4", 1);
264  histo->setBinLabel(5, "Not OKFlag", 1);
265  for (int link = linkDown; link < (linkUp + 1); ++link) {
266  string link_s = to_string(link);
267  histo->setBinLabel(link + 1, "Link" + link_s, 2);
268  }
269 
270 } //bookHistosROS

References dqm::implementation::IBooker::book2D(), timingPdfMaker::histo, HltBtagPostValidation_cff::histoName, plotFactory::keyHisto, MainPageGenerator::link, dqm::implementation::NavigatorBase::setCurrentFolder(), topFolder(), uROSError, urosHistos, and makeMuonMisalignmentScenario::wheel.

Referenced by bookHistograms().

◆ bookHistosuROS()

void DTDataIntegrityUrosOffline::bookHistosuROS ( DQMStore::IBooker ibooker,
const int  fed,
const int  uRos 
)
private

Definition at line 272 of file DTDataIntegrityUrosOffline.cc.

272  {
273  string fed_s = to_string(fed);
274  string uRos_s = to_string(uRos);
275  ibooker.setCurrentFolder(topFolder(false) + "FED" + fed_s + "/uROS" + uRos_s);
276 }

References dqm::implementation::NavigatorBase::setCurrentFolder(), and topFolder().

Referenced by bookHistograms().

◆ processFED()

void DTDataIntegrityUrosOffline::processFED ( DTuROSFEDData data,
int  fed 
)

Definition at line 465 of file DTDataIntegrityUrosOffline.cc.

465  {
466  neventsFED++;
467  if (neventsFED % 1000 == 0)
468  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
469  << "[DTDataIntegrityUrosOffline]: " << neventsFED << " events analyzed by processFED" << endl;
470 
471  if (fed < FEDIDmin || fed > FEDIDmax)
472  return;
473 
474  hFEDEntry->Fill(fed);
475 
476  //1D HISTOS: EVENT LENGHT from trailer
477  int fedEvtLength = data.getevtlgth() * 8; //1 word = 8 bytes
478  // if(fedEvtLength > 16000) fedEvtLength = 16000; // overflow bin
479  fedHistos["EventLength"][fed]->Fill(fedEvtLength);
480 }

References data, fedHistos, FEDIDmax, dqm::impl::MonitorElement::Fill(), hFEDEntry, LogTrace, and neventsFED.

Referenced by analyze().

◆ processuROS()

void DTDataIntegrityUrosOffline::processuROS ( DTuROSROSData data,
int  fed,
int  uRos 
)

Definition at line 278 of file DTDataIntegrityUrosOffline.cc.

278  {
279  neventsuROS++;
280 
281  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
282  << "[DTDataIntegrityUrosOffline]: " << neventsuROS << " events analyzed by processuROS" << endl;
283 
284  MonitorElement* uROSSummary = nullptr;
285  uROSSummary = summaryHistos["uROSSummary"][fed];
286 
287  MonitorElement* uROSStatus = nullptr;
288  uROSStatus = fedHistos["uROSStatus"][fed];
289 
290  if (!uROSSummary) {
291  LogError("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
292  << "Trying to access non existing ME at FED " << fed << std::endl;
293  return;
294  }
295 
296  unsigned int slotMap = (data.getboardId()) & 0xF;
297  if (slotMap == 0)
298  return; //prevention for Simulation empty uROS data
299  int ros = theROS(slotMap, 0); //first sector correspondign to link 0
300  int ddu = theDDU(fed, slotMap, 0, false);
301  int wheel = (ddu - 770) % 5 - 2;
302  MonitorElement* ROSSummary = nullptr;
303  ROSSummary = summaryHistos["ROSSummary"][wheel];
304 
305  // Summary of all Link errors
306  MonitorElement* uROSError0 = nullptr;
307  MonitorElement* uROSError1 = nullptr;
308  MonitorElement* uROSError2 = nullptr;
309 
310  int errorX[5][12] = {{0}}; //5th is notOK flag
311 
312  if (uRos > 2) { //sectors 1-12
313 
314  uROSError0 = urosHistos[(uROSError)*1000 + (wheel + 2) * 100 + (ros - 1)]; //links 0-23
315  uROSError1 = urosHistos[(uROSError)*1000 + (wheel + 2) * 100 + (ros)]; //links 24-47
316  uROSError2 = urosHistos[(uROSError)*1000 + (wheel + 2) * 100 + (ros + 1)]; //links 48-71
317 
318  if ((!uROSError2) || (!uROSError1) || (!uROSError0)) {
319  LogError("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
320  << "Trying to access non existing ME at uROS " << uRos << std::endl;
321  return;
322  }
323 
324  // uROS errors
325  for (unsigned int link = 0; link < 72; ++link) {
326  for (unsigned int flag = 0; flag < 5; ++flag) {
327  if ((data.getokxflag(link) >> flag) & 0x1) { // Undefined Flag 1-4 64bits word for each MTP (12 channels)
328  int value = flag;
329  if (flag == 0)
330  value = 5; //move it to the 5th bin
331 
332  if (value > 0) {
333  if (link < 24) {
334  errorX[value - 1][ros - 1] += 1;
335  uROSError0->Fill(value - 1, link); //bins start at 0 despite labelin
336  } else if (link < 48) {
337  errorX[value - 1][ros] += 1;
338  uROSError1->Fill(value - 1, link - 23);
339  } else if (link < 72) {
340  errorX[value - 1][ros + 1] += 1;
341  uROSError2->Fill(value - 1, link - 47);
342  }
343  } //value>0
344  } //flag value
345  } //loop on flags
346  } //loop on links
347  } //uROS>2
348 
349  else { //uRos<3
350 
351  for (unsigned int link = 0; link < 12; ++link) {
352  for (unsigned int flag = 0; flag < 5; ++flag) {
353  if ((data.getokxflag(link) >> flag) & 0x1) { // Undefined Flag 1-4 64bits word for each MTP (12 channels)
354  int value = flag;
355  int sc = 24;
356  if (flag == 0)
357  value = 5; //move it to the 5th bin
358 
359  if (value > 0) {
360  unsigned int keyHisto = (uROSError)*1000 + (wheel + 2) * 100 + link; //ros -1 = link in this case
361  uROSError0 = urosHistos[keyHisto];
362  if (!uROSError0) {
363  LogError("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
364  << "Trying to access non existing ME at uROS " << uRos << std::endl;
365  return;
366  }
367  errorX[value - 1][link] += 1; // ros-1=link in this case
368  uROSError0->Fill(value - 1, sc); //bins start at 0 despite labeling, this is the old SC
369  }
370  } //flag values
371  } //loop on flags
372  } //loop on links
373  } //else uRos<3
374 
375  // Fill the ROSSummary (1 per wheel) histo
376  for (unsigned int iros = 0; iros < 12; ++iros) {
377  for (unsigned int bin = 0; bin < 5; ++bin) {
378  if (errorX[bin][iros] != 0)
379  ROSSummary->Fill(bin, iros + 1); //bins start at 1
380  }
381  }
382 
383  // Global Errors for uROS
384  for (unsigned int flag = 4; flag < 16; ++flag) {
385  if ((data.getuserWord() >> flag) & 0x1) {
386  uROSSummary->Fill(flag - 4, uRos);
387  uROSStatus->Fill(flag - 4, uRos); //duplicated info?
388  }
389  }
390 
391  // ROS error
392  for (unsigned int icounter = 0; icounter < data.geterrors().size(); ++icounter) {
393  int link = data.geterrorROBID(icounter);
394  int error = data.geterror(icounter);
395  int tdcError_ROSSummary = 0;
396  int tdcError_ROSError = 0;
397 
398  if (error & 0x4000) {
399  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
400  << " ROS " << uRos << " ROB " << link << " Internal fatal Error 4000 in TDC " << error << endl;
401 
402  tdcError_ROSSummary = 5;
403  tdcError_ROSError = 5;
404 
405  } else if (error & 0x0249) {
406  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
407  << " ROS " << uRos << " ROB " << link << " TDC FIFO overflow in TDC " << error << endl;
408 
409  tdcError_ROSSummary = 6;
410  tdcError_ROSError = 6;
411 
412  } else if (error & 0x0492) {
413  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
414  << " ROS " << uRos << " ROB " << link << " TDC L1 buffer overflow in TDC " << error << endl;
415 
416  tdcError_ROSSummary = 7;
417  tdcError_ROSError = 7;
418 
419  } else if (error & 0x2000) {
420  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
421  << " ROS " << uRos << " ROB " << link << " TDC L1A FIFO overflow in TDC " << error << endl;
422 
423  tdcError_ROSSummary = 8;
424  tdcError_ROSError = 8;
425 
426  } else if (error & 0x0924) {
427  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
428  << " uROS " << uRos << " ROB " << link << " TDC hit error in TDC " << error << endl;
429 
430  tdcError_ROSSummary = 9;
431  tdcError_ROSError = 9;
432 
433  } else if (error & 0x1000) {
434  LogTrace("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
435  << " uROS " << uRos << " ROB " << link << " TDC hit rejected in TDC " << error << endl;
436 
437  tdcError_ROSSummary = 10;
438  tdcError_ROSError = 10;
439 
440  } else {
441  LogWarning("DTRawToDigi|DTDQM|DTMonitorModule|DTDataIntegrityUrosOffline")
442  << " TDC error code not known " << error << endl;
443  }
444 
445  if (uRos < 3) {
446  ROSSummary->Fill(tdcError_ROSSummary, link + 1); //link 0 = ROS 1
447  int sc = 24;
448  urosHistos[(uROSError)*1000 + (wheel + 2) * 100 + (link)]->Fill(tdcError_ROSError, sc);
449  } //uRos<3
450  else { //uRos>2
451  if (link < 24) {
452  ROSSummary->Fill(tdcError_ROSSummary, ros);
453  uROSError0->Fill(tdcError_ROSError, link);
454  } else if (link < 48) {
455  ROSSummary->Fill(tdcError_ROSSummary, ros + 1);
456  uROSError1->Fill(tdcError_ROSError, link - 23);
457  } else if (link < 72) {
458  ROSSummary->Fill(tdcError_ROSSummary, ros + 2);
459  uROSError2->Fill(tdcError_ROSError, link - 47);
460  }
461  } //uROS>2
462  } //loop on errors
463 }

References newFWLiteAna::bin, data, relativeConstraints::error, fedHistos, dqm::impl::MonitorElement::Fill(), HcalObjRepresent::Fill(), RemoveAddSevLevel::flag, plotFactory::keyHisto, MainPageGenerator::link, LogTrace, neventsuROS, summaryHistos, theDDU(), theROS(), uROSError, urosHistos, makeMuonMisalignmentScenario::wheel, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by analyze().

◆ theDDU()

int DTDataIntegrityUrosOffline::theDDU ( int  crate,
int  slot,
int  link,
bool  tenDDU 
)
private

Definition at line 523 of file DTDataIntegrityUrosOffline.cc.

523  {
524  int ros = theROS(slot, link);
525 
526  int ddu = 772;
527  //if (crate == 1368) { ddu = 775; }
528  //Needed just in case this FED should be used due to fibers length
529 
530  if (crate == FEDNumbering::MINDTUROSFEDID) {
531  if (slot < 7)
532  ddu = 770;
533  else
534  ddu = 771;
535  }
536 
537  if (crate == (FEDNumbering::MINDTUROSFEDID + 1)) {
538  ddu = 772;
539  }
540 
541  if (crate == FEDNumbering::MAXDTUROSFEDID) {
542  if (slot < 7)
543  ddu = 773;
544  else
545  ddu = 774;
546  }
547 
548  if (ros > 6 && tenDDU && ddu < 775)
549  ddu += 5;
550 
551  return ddu;
552 }

References MainPageGenerator::link, FEDNumbering::MAXDTUROSFEDID, FEDNumbering::MINDTUROSFEDID, and theROS().

Referenced by processuROS().

◆ theROS()

int DTDataIntegrityUrosOffline::theROS ( int  slot,
int  link 
)
private

Definition at line 554 of file DTDataIntegrityUrosOffline.cc.

554  {
555  if (slot % 6 == 5)
556  return link + 1;
557 
558  int ros = (link / 24) + 3 * (slot % 6) - 2;
559  return ros;
560 }

References MainPageGenerator::link.

Referenced by processuROS(), and theDDU().

◆ topFolder()

std::string DTDataIntegrityUrosOffline::topFolder ( bool  isFEDIntegrity) const
private

Definition at line 482 of file DTDataIntegrityUrosOffline.cc.

482  {
483  string folder = "DT/00-DataIntegrity/";
484 
485  return folder;
486 }

References printsummarytable::folder.

Referenced by bookHistos(), bookHistosROS(), and bookHistosuROS().

Member Data Documentation

◆ fedHistos

std::map<std::string, std::map<int, MonitorElement*> > DTDataIntegrityUrosOffline::fedHistos
private

Definition at line 64 of file DTDataIntegrityUrosOffline.h.

Referenced by processFED(), and processuROS().

◆ FEDIDmax

int DTDataIntegrityUrosOffline::FEDIDmax
private

◆ FEDIDmin

int DTDataIntegrityUrosOffline::FEDIDmin
private

◆ fedIntegrityFolder

std::string DTDataIntegrityUrosOffline::fedIntegrityFolder
private

Definition at line 88 of file DTDataIntegrityUrosOffline.h.

Referenced by DTDataIntegrityUrosOffline().

◆ fedToken

edm::EDGetTokenT<DTuROSFEDDataCollection> DTDataIntegrityUrosOffline::fedToken
private

Definition at line 91 of file DTDataIntegrityUrosOffline.h.

Referenced by analyze(), and DTDataIntegrityUrosOffline().

◆ hFEDEntry

MonitorElement* DTDataIntegrityUrosOffline::hFEDEntry
private

Definition at line 75 of file DTDataIntegrityUrosOffline.h.

Referenced by bookHistos(), and processFED().

◆ nEventMonitor

MonitorElement* DTDataIntegrityUrosOffline::nEventMonitor
private

Definition at line 62 of file DTDataIntegrityUrosOffline.h.

Referenced by analyze(), and bookHistos().

◆ nevents

int DTDataIntegrityUrosOffline::nevents
private

Definition at line 59 of file DTDataIntegrityUrosOffline.h.

Referenced by analyze().

◆ neventsFED

int DTDataIntegrityUrosOffline::neventsFED
private

◆ nEventsLS

int DTDataIntegrityUrosOffline::nEventsLS
private

Definition at line 77 of file DTDataIntegrityUrosOffline.h.

◆ neventsuROS

int DTDataIntegrityUrosOffline::neventsuROS
private

Definition at line 80 of file DTDataIntegrityUrosOffline.h.

Referenced by DTDataIntegrityUrosOffline(), and processuROS().

◆ NuROS

const int DTDataIntegrityUrosOffline::NuROS = 12
private

Definition at line 86 of file DTDataIntegrityUrosOffline.h.

Referenced by bookHistograms().

◆ summaryHistos

std::map<std::string, std::map<int, MonitorElement*> > DTDataIntegrityUrosOffline::summaryHistos
private

Definition at line 66 of file DTDataIntegrityUrosOffline.h.

Referenced by bookHistos(), and processuROS().

◆ urosHistos

std::map<unsigned int, MonitorElement*> DTDataIntegrityUrosOffline::urosHistos
private

Definition at line 68 of file DTDataIntegrityUrosOffline.h.

Referenced by bookHistosROS(), and processuROS().

DTuROSFEDData::getslotsize
int getslotsize(int slot) const
Definition: DTuROSControlData.h:142
DTDataIntegrityUrosOffline::FEDIDmax
int FEDIDmax
Definition: DTDataIntegrityUrosOffline.h:83
DTDataIntegrityUrosOffline::bookHistos
void bookHistos(DQMStore::IBooker &, const int fedMin, const int fedMax)
Definition: DTDataIntegrityUrosOffline.cc:94
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
DTuROSROSData::getslot
int getslot() const
Definition: DTuROSControlData.h:51
MainPageGenerator.link
link
Definition: MainPageGenerator.py:271
DTDataIntegrityUrosOffline::TTSValues
Definition: DTDataIntegrityUrosOffline.h:72
printsummarytable.folder
folder
Definition: printsummarytable.py:7
DTDataIntegrityUrosOffline::topFolder
std::string topFolder(bool isFEDIntegrity) const
Definition: DTDataIntegrityUrosOffline.cc:482
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle
Definition: AssociativeIterator.h:50
relativeConstraints.error
error
Definition: relativeConstraints.py:53
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
FEDNumbering::MINDTUROSFEDID
Definition: FEDNumbering.h:111
DTDataIntegrityUrosOffline::processFED
void processFED(DTuROSFEDData &data, int fed)
Definition: DTDataIntegrityUrosOffline.cc:465
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
DTuROSFEDData::getfed
int getfed() const
Definition: DTuROSControlData.h:130
DTDataIntegrityUrosOffline::bookHistosROS
void bookHistosROS(DQMStore::IBooker &, const int wheel, const int ros)
Definition: DTDataIntegrityUrosOffline.cc:242
DTDataIntegrityUrosOffline::nevents
int nevents
Definition: DTDataIntegrityUrosOffline.h:59
DTDataIntegrityUrosOffline::TDCError
Definition: DTDataIntegrityUrosOffline.h:72
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
DTDataIntegrityUrosOffline::fedHistos
std::map< std::string, std::map< int, MonitorElement * > > fedHistos
Definition: DTDataIntegrityUrosOffline.h:64
DTuROSFEDData::getuROS
DTuROSROSData getuROS(int slot) const
Definition: DTuROSControlData.h:148
DTDataIntegrityUrosOffline::theROS
int theROS(int slot, int link)
Definition: DTDataIntegrityUrosOffline.cc:554
DTDataIntegrityUrosOffline::processuROS
void processuROS(DTuROSROSData &data, int fed, int uRos)
Definition: DTDataIntegrityUrosOffline.cc:278
DTDataIntegrityUrosOffline::nEventMonitor
MonitorElement * nEventMonitor
Definition: DTDataIntegrityUrosOffline.h:62
DTDataIntegrityUrosOffline::NuROS
const int NuROS
Definition: DTDataIntegrityUrosOffline.h:86
DTDataIntegrityUrosOffline::urosHistos
std::map< unsigned int, MonitorElement * > urosHistos
Definition: DTDataIntegrityUrosOffline.h:68
plotFactory.keyHisto
keyHisto
Definition: plotFactory.py:80
DOCESLOTS
static const int DOCESLOTS
Definition: DTuROSControlData.h:19
DTDataIntegrityUrosOffline::neventsFED
int neventsFED
Definition: DTDataIntegrityUrosOffline.h:79
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
DTuROSROSData
Definition: DTuROSControlData.h:22
DTDataIntegrityUrosOffline::FEDIDmin
int FEDIDmin
Definition: DTDataIntegrityUrosOffline.h:82
DTuROSFEDData
Definition: DTuROSControlData.h:103
value
Definition: value.py:1
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DTDataIntegrityUrosOffline::hFEDEntry
MonitorElement * hFEDEntry
Definition: DTDataIntegrityUrosOffline.h:75
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
DTDataIntegrityUrosOffline::uROSError
Definition: DTDataIntegrityUrosOffline.h:72
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
DTDataIntegrityUrosOffline::summaryHistos
std::map< std::string, std::map< int, MonitorElement * > > summaryHistos
Definition: DTDataIntegrityUrosOffline.h:66
DTDataIntegrityUrosOffline::neventsuROS
int neventsuROS
Definition: DTDataIntegrityUrosOffline.h:80
DTDataIntegrityUrosOffline::fedToken
edm::EDGetTokenT< DTuROSFEDDataCollection > fedToken
Definition: DTDataIntegrityUrosOffline.h:91
DTDataIntegrityUrosOffline::fedIntegrityFolder
std::string fedIntegrityFolder
Definition: DTDataIntegrityUrosOffline.h:88
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
HltBtagPostValidation_cff.histoName
histoName
Definition: HltBtagPostValidation_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
DTDataIntegrityUrosOffline::uROSEventLength
Definition: DTDataIntegrityUrosOffline.h:72
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
DTDataIntegrityUrosOffline::theDDU
int theDDU(int crate, int slot, int link, bool tenDDU)
Definition: DTDataIntegrityUrosOffline.cc:523
FEDNumbering::MAXDTUROSFEDID
Definition: FEDNumbering.h:112
edm::InputTag
Definition: InputTag.h:15
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
DTDataIntegrityUrosOffline::bookHistosuROS
void bookHistosuROS(DQMStore::IBooker &, const int fed, const int uRos)
Definition: DTDataIntegrityUrosOffline.cc:272