CMS 3D CMS Logo

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

#include <DTDataIntegrityTest.h>

Inheritance diagram for DTDataIntegrityTest:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DTDataIntegrityTest (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTDataIntegrityTest () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~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
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 DQM Client Diagnostic. More...
 
std::string getMEName (std::string histoType, int FEDId)
 Get the ME name. More...
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Member Functions

int getROS (int uROS, int link)
 
int readOutToGeometry (int dduId, int rosNumber, int &wheel, int &sector)
 

Private Attributes

bool bookingdone
 
int counter
 
MonitorElementglbSummaryHisto
 
const DTReadOutMappingmapping
 
edm::ESGetToken< DTReadOutMapping, DTReadOutMappingRcdmappingToken_
 
int nevents
 
unsigned int nLumiSegs
 
int nupdates
 
int prescaleFactor
 
int run
 
MonitorElementsummaryHisto
 
MonitorElementsummaryTDCHisto
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 27 of file DTDataIntegrityTest.h.

Constructor & Destructor Documentation

◆ DTDataIntegrityTest()

DTDataIntegrityTest::DTDataIntegrityTest ( const edm::ParameterSet ps)

Constructor.

Definition at line 26 of file DTDataIntegrityTest.cc.

References bookingdone, edm::EndLuminosityBlock, edm::ParameterSet::getUntrackedParameter(), LogTrace, and prescaleFactor.

27  : nevents(0), mappingToken_(esConsumes<edm::Transition::EndLuminosityBlock>()) {
28  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest") << "[DTDataIntegrityTest]: Constructor";
29 
30  // prescale on the # of LS to update the test
31  prescaleFactor = ps.getUntrackedParameter<int>("diagnosticPrescale", 1);
32 
33  bookingdone = false;
34 }
edm::ESGetToken< DTReadOutMapping, DTReadOutMappingRcd > mappingToken_
#define LogTrace(id)
T getUntrackedParameter(std::string const &, T const &) const

◆ ~DTDataIntegrityTest()

DTDataIntegrityTest::~DTDataIntegrityTest ( )
override

Destructor.

Definition at line 36 of file DTDataIntegrityTest.cc.

References LogTrace, and nupdates.

36  {
37  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest")
38  << "DataIntegrityTest: analyzed " << nupdates << " updates";
39 }
#define LogTrace(id)

Member Function Documentation

◆ dqmEndJob()

void DTDataIntegrityTest::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 249 of file DTDataIntegrityTest.cc.

References LogTrace.

249  {
250  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest") << "[DTDataIntegrityTest] endjob called!";
251 }
#define LogTrace(id)

◆ dqmEndLuminosityBlock()

void DTDataIntegrityTest::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
overrideprotectedvirtual

DQM Client Diagnostic.

Reimplemented from DQMEDHarvester.

Definition at line 41 of file DTDataIntegrityTest.cc.

References dqm::implementation::IBooker::book2D(), bookingdone, visDQMUpload::context, DOCESLOTS, dtDataIntegrityTask_cfi::fedIntegrityFolder, dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getBinContent(), getROS(), dqm::legacy::MonitorElement::getTH1F(), dqm::legacy::MonitorElement::getTH2F(), glbSummaryHisto, mps_fire::i, edm::LuminosityBlockBase::id(), LogTrace, edm::LuminosityBlockID::luminosityBlock(), mapping, mappingToken_, SiStripPI::max, FEDNumbering::MAXDTUROSFEDID, FEDNumbering::MINDTUROSFEDID, nLumiSegs, nupdates, prescaleFactor, run, dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinContent(), dqm::implementation::NavigatorBase::setCurrentFolder(), Validation_hcalonly_cfi::sign, summaryHisto, summaryTDCHisto, cond::impl::to_string(), and makeMuonMisalignmentScenario::wheel.

44  {
45  if (!bookingdone) {
46  //nSTAEvents = 0;
47  nupdates = 0;
48  run = 0;
49 
50  // book the summary histogram
51 
52  ibooker.setCurrentFolder("DT/00-DataIntegrity");
53 
54  summaryHisto = ibooker.book2D("DataIntegritySummary", "Summary Data Integrity", 12, 1, 13, 5, -2, 3);
55  summaryHisto->setAxisTitle("Sector", 1);
56  summaryHisto->setAxisTitle("Wheel", 2);
57 
58  ibooker.setCurrentFolder("DT/00-DataIntegrity");
59 
60  summaryTDCHisto = ibooker.book2D("DataIntegrityTDCSummary", "TDC Summary Data Integrity", 12, 1, 13, 5, -2, 3);
61  summaryTDCHisto->setAxisTitle("Sector", 1);
62  summaryTDCHisto->setAxisTitle("Wheel", 2);
63 
64  ibooker.setCurrentFolder("DT/00-DataIntegrity");
65 
66  glbSummaryHisto = ibooker.book2D("DataIntegrityGlbSummary", "Summary Data Integrity", 12, 1, 13, 5, -2, 3);
67  glbSummaryHisto->setAxisTitle("Sector", 1);
68  glbSummaryHisto->setAxisTitle("Wheel", 2);
69 
70  mapping = &context.getData(mappingToken_);
71  } //booking
72  bookingdone = true;
73 
74  // counts number of lumiSegs
75  nLumiSegs = lumiSeg.id().luminosityBlock();
76  string nLumiSegs_s = to_string(nLumiSegs);
77 
78  // prescale factor
79  if (nLumiSegs % prescaleFactor != 0)
80  return;
81 
82  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest")
83  << "[DTDataIntegrityTest]: End of LS " << nLumiSegs << ", performing client operations";
84 
85  // counts number of updats
86  nupdates++;
87 
88  //Counter for x bin in the timing histos
89  counter++;
90 
91  //Loop on FED id
92  //Monitoring only real used FEDs
93  int FEDIDmin = FEDNumbering::MINDTUROSFEDID;
94  int FEDIDmax = FEDNumbering::MAXDTUROSFEDID;
95 
96  for (int dduId = FEDIDmin; dduId <= FEDIDmax; ++dduId) {
97  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest") << "[DTDataIntegrityTest]:FED Id: " << dduId;
98 
99  //Each nTimeBin onUpdate remove timing histos and book a new bunch of them
100  string dduId_s = to_string(dduId);
101 
102  string histoType;
103 
104  //Check if the list of ROS is compatible with the channels enabled
105  string rosStatusName = "DT/00-DataIntegrity/FED" + dduId_s + "/FED" + dduId_s + "_uROSStatus";
106  MonitorElement* FED_ROSStatus = igetter.get(rosStatusName);
107 
108  // Get the error summary histo
109  string fedSummaryName = "DT/00-DataIntegrity/FED" + dduId_s + "_ROSSummary";
110  MonitorElement* FED_ROSSummary1 = nullptr;
111  MonitorElement* FED_ROSSummary2 = nullptr;
112  string fedSummaryName1 = "";
113  string fedSummaryName2 = "";
114  string sign = "-";
115  if (dduId == FEDIDmin || dduId == FEDIDmax) {
116  if (dduId == FEDIDmax)
117  sign = "";
118  fedSummaryName2 = "DT/00-DataIntegrity/ROSSummary_W" + sign + "2";
119  fedSummaryName1 = "DT/00-DataIntegrity/ROSSummary_W" + sign + "1";
120  FED_ROSSummary1 = igetter.get(fedSummaryName1);
121  FED_ROSSummary2 = igetter.get(fedSummaryName2);
122  } else {
123  fedSummaryName = "DT/00-DataIntegrity/ROSSummary_W0";
124  FED_ROSSummary1 = igetter.get(fedSummaryName);
125  FED_ROSSummary2 = igetter.get(fedSummaryName); //for wheel compatibility...
126  }
127 
128  // Get the event length plot (used to count # of processed evts)
129  string fedEvLenName = "DT/00-DataIntegrity/FED" + dduId_s + "/FED" + dduId_s + "_EventLength";
130  MonitorElement* FED_EvLength = igetter.get(fedEvLenName);
131 
132  // Get the histos for FED integrity
133  string fedIntegrityFolder = "DT/00-DataIntegrity/";
134  MonitorElement* hFEDEntry = igetter.get(fedIntegrityFolder + "FEDEntries");
135  MonitorElement* hFEDFatal = igetter.get(fedIntegrityFolder + "FEDFatal");
136 
137  if (hFEDEntry && hFEDFatal) {
138  int offsetFED = 1368;
139  // Check that the FED is in the ReadOut using the FEDIntegrity histos
140  bool fedNotReadout =
141  (hFEDEntry->getBinContent(dduId - offsetFED) == 0 && hFEDFatal->getBinContent(dduId - offsetFED) == 0);
142  int wheel = dduId - offsetFED - 2;
143  if (FED_ROSSummary1 && FED_ROSSummary2 && FED_ROSStatus && FED_EvLength && !fedNotReadout) {
144  TH2F* histoFEDSummary1 = FED_ROSSummary1->getTH2F();
145  TH2F* histoFEDSummary2 = FED_ROSSummary2->getTH2F(); // same for central FED...
146  TH2F* histoROSStatus = FED_ROSStatus->getTH2F();
147  TH1F* histoEvLength = FED_EvLength->getTH1F();
148 
149  int nFEDEvts = histoEvLength->Integral();
150  //if(dduId==FEDIDmin || dduId==FEDIDmax) nFEDEvts = nFEDEvts/2.; // split in 2 for external FEDs
151  if (!(nFEDEvts > 0))
152  continue;
153  int extraFEDevents1 = 0;
154  int extraFEDevents2 = 0;
155 
156  for (int urosNumber = 1; urosNumber <= DOCESLOTS; ++urosNumber) { // loop on the uROS
157  string urosNumber_s = to_string(urosNumber);
158  // Get the event length plot for this uROS (used to count # of processed evts)
159  string fedUrosEvLenName = "DT/00-DataIntegrity/FED" + dduId_s + "/uROS" + urosNumber_s + "/FED" + dduId_s +
160  "_uROS" + urosNumber_s + "_EventLength";
161  MonitorElement* FED_uROS_EvLength = igetter.get(fedUrosEvLenName);
162  TH1F* histoUrosEvLength = FED_uROS_EvLength->getTH1F();
163  int nFEDEvtsUros = histoUrosEvLength->Integral();
164 
165  //station 4 sectors drievn by uROS 1 & 2
166  if (urosNumber == 1) {
167  extraFEDevents1 = nFEDEvtsUros;
168  continue;
169  }
170  if (urosNumber == 2) {
171  extraFEDevents2 = nFEDEvtsUros;
172  continue;
173  }
174 
175  if (nFEDEvtsUros > 0) { //this uROS is active
176  nFEDEvtsUros = extraFEDevents1 + extraFEDevents2 + nFEDEvtsUros / 3.; // split in 3 ROS
177  float nGErrors = histoROSStatus->Integral(1, 12, urosNumber, urosNumber); //Only Global Errors,
178  //not possible to distinguish which ROS, so coumting them in the 3/12 ROSes
179 
180  int ros = getROS(urosNumber, 0);
181  for (int iros = ros; iros < (ros + 3); ++iros) {
182  // -1,0,+1 wheels
183  float nROBErrors1 = histoFEDSummary1->Integral(1, 5, iros, iros); //Errors and Not OK Flag
184  float nErrors1 = nROBErrors1 + nGErrors;
185  float result1 = 0.;
186  if (nFEDEvtsUros != 0)
187  result1 = max((float)0., ((float)nFEDEvtsUros - nROBErrors1) / (float)nFEDEvtsUros);
188  summaryHisto->setBinContent(iros, wheel + 3, result1);
189  double tdcResult1 = -2;
190  float nTDCErrors1 = histoFEDSummary1->Integral(6, 6, iros, iros); //Only TDC fatal considered
191  if (nTDCErrors1 == 0) { // no errors
192  tdcResult1 = 0.5;
193  } else { // there are errors
194  tdcResult1 = 2.5;
195  }
196  summaryTDCHisto->setBinContent(iros, wheel + 3, tdcResult1);
197 
198  // FIXME: different errors should have different weights
199  float sectPerc1 = 0.;
200  if (nFEDEvtsUros != 0)
201  sectPerc1 = max((float)0., ((float)nFEDEvtsUros - nErrors1) / (float)nFEDEvtsUros);
202  glbSummaryHisto->setBinContent(iros, wheel + 3, sectPerc1);
203  if (dduId == (FEDIDmax - 1))
204  continue; //wheel 0 case
205 
206  // -2,+2 wheels
207  float nROBErrors2 = histoFEDSummary2->Integral(1, 5, iros, iros); //Errors and Not OK Flag
208  float nErrors2 = nROBErrors2 + nGErrors;
209  float result2 = 0.;
210  if (nFEDEvtsUros != 0)
211  result2 = max((float)0., ((float)nFEDEvtsUros - nROBErrors2) / (float)nFEDEvtsUros);
212  summaryHisto->setBinContent(iros, wheel * 2 + 3, result2);
213 
214  double tdcResult2 = -2;
215  float nTDCErrors2 = histoFEDSummary2->Integral(6, 6, iros, iros); //Only TDC fatal considered
216  if (nTDCErrors2 == 0) { // no errors
217  tdcResult2 = 0.5;
218  } else { // there are errors
219  tdcResult2 = 2.5;
220  }
221  summaryTDCHisto->setBinContent(iros, wheel * 2 + 3, tdcResult2);
222 
223  // FIXME: different errors should have different weights
224  float sectPerc2 = 0.;
225  if (nFEDEvtsUros != 0)
226  sectPerc2 = max((float)0., ((float)nFEDEvtsUros - nErrors2) / (float)nFEDEvtsUros);
227  glbSummaryHisto->setBinContent(iros, wheel * 2 + 3, sectPerc2);
228  } //loop in three ros
229  } // this uROS is active
230  } //loop on uros
231  } else { // no data in this FED: it is off, no ROS suummary/status or evLength and fedNotReadout
232  for (int i = 1; i <= DOCESLOTS; ++i) {
233  summaryHisto->setBinContent(i, wheel + 3, 0.5);
234  summaryTDCHisto->setBinContent(i, wheel + 3, 1.5);
235  glbSummaryHisto->setBinContent(i, wheel + 3, 0.5);
236  if (dduId == (FEDIDmax - 1))
237  continue; //wheel 0 case
238  summaryHisto->setBinContent(i, wheel * 2 + 3, 0.5);
239  summaryTDCHisto->setBinContent(i, wheel * 2 + 3, 1.5);
240  glbSummaryHisto->setBinContent(i, wheel * 2 + 3, 0.5);
241  } //loop on uros
242  } // no data in this FED: it is off, no ROS suummary/status or evLength
243 
244  } //FEDentry
245 
246  } // loop on dduIds
247 }
edm::ESGetToken< DTReadOutMapping, DTReadOutMappingRcd > mappingToken_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
const DTReadOutMapping * mapping
std::string to_string(const V &value)
Definition: OMSAccess.h:77
MonitorElement * summaryTDCHisto
MonitorElement * glbSummaryHisto
#define LogTrace(id)
static const int DOCESLOTS
virtual TH2F * getTH2F() const
MonitorElement * summaryHisto
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
virtual TH1F * getTH1F() const
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:212
int getROS(int uROS, int link)
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ getMEName()

string DTDataIntegrityTest::getMEName ( std::string  histoType,
int  FEDId 
)
protected

Get the ME name.

Definition at line 253 of file DTDataIntegrityTest.cc.

References ctppsRandomDQMSource_cfi::folderName, and HltBtagPostValidation_cff::histoName.

253  {
254  //Use the DDU name to find the ME
255  stringstream dduID_s;
256  dduID_s << FEDId;
257 
258  string folderName = "DT/00-DataIntegrity/FED" + dduID_s.str();
259 
260  string histoName = folderName + "/FED" + dduID_s.str() + "_" + histoType;
261  return histoName;
262 }

◆ getROS()

int DTDataIntegrityTest::getROS ( int  uROS,
int  link 
)
private

Definition at line 269 of file DTDataIntegrityTest.cc.

Referenced by dqmEndLuminosityBlock().

269  {
270  int slot = 0;
271  switch (uROS) {
272  case 1: {
273  slot = 5;
274  break;
275  }
276  case 2: {
277  slot = 11;
278  break;
279  }
280  case 3: {
281  slot = 1;
282  break;
283  }
284  case 4: {
285  slot = 7;
286  break;
287  }
288  case 5: {
289  slot = 2;
290  break;
291  }
292  case 6: {
293  slot = 8;
294  break;
295  }
296  case 9: {
297  slot = 9;
298  break;
299  }
300  case 10: {
301  slot = 3;
302  break;
303  }
304  case 11: {
305  slot = 10;
306  break;
307  }
308  case 12: {
309  slot = 4;
310  break;
311  }
312  }
313 
314  if (slot % 6 == 5)
315  return link + 1;
316 
317  int ros = (link / 24) + 3 * (slot % 6) - 2;
318  return ros;
319 }

◆ readOutToGeometry()

int DTDataIntegrityTest::readOutToGeometry ( int  dduId,
int  rosNumber,
int &  wheel,
int &  sector 
)
private

Definition at line 264 of file DTDataIntegrityTest.cc.

References mapping, DTReadOutMapping::readOutToGeometry(), hgcalTBTopologyTester_cfi::sector, and makeMuonMisalignmentScenario::wheel.

264  {
265  int dummy;
266  return mapping->readOutToGeometry(dduId, ros, 2, 2, 2, wheel, dummy, sector, dummy, dummy, dummy);
267 }
int readOutToGeometry(int dduId, int rosId, int robId, int tdcId, int channelId, DTWireId &wireId) const
transform identifiers
const DTReadOutMapping * mapping

Member Data Documentation

◆ bookingdone

bool DTDataIntegrityTest::bookingdone
private

Definition at line 65 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock(), and DTDataIntegrityTest().

◆ counter

int DTDataIntegrityTest::counter
private

Definition at line 58 of file DTDataIntegrityTest.h.

Referenced by counter.Counters::__getitem__().

◆ glbSummaryHisto

MonitorElement* DTDataIntegrityTest::glbSummaryHisto
private

Definition at line 73 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock().

◆ mapping

const DTReadOutMapping* DTDataIntegrityTest::mapping
private

◆ mappingToken_

edm::ESGetToken<DTReadOutMapping, DTReadOutMappingRcd> DTDataIntegrityTest::mappingToken_
private

Definition at line 67 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock().

◆ nevents

int DTDataIntegrityTest::nevents
private

Definition at line 60 of file DTDataIntegrityTest.h.

◆ nLumiSegs

unsigned int DTDataIntegrityTest::nLumiSegs
private

Definition at line 61 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock().

◆ nupdates

int DTDataIntegrityTest::nupdates
private

Definition at line 52 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock(), and ~DTDataIntegrityTest().

◆ prescaleFactor

int DTDataIntegrityTest::prescaleFactor
private

Definition at line 55 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock(), and DTDataIntegrityTest().

◆ run

int DTDataIntegrityTest::run
private

◆ summaryHisto

MonitorElement* DTDataIntegrityTest::summaryHisto
private

Definition at line 71 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock().

◆ summaryTDCHisto

MonitorElement* DTDataIntegrityTest::summaryTDCHisto
private

Definition at line 72 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock().