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::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources > 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 beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester ()
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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)
 

Protected Member Functions

void bookHistos (DQMStore::IBooker &, std::string histoType, int dduId)
 Book the MEs. More...
 
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::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)
 

Private Member Functions

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

Private Attributes

bool bookingdone
 
bool checkUros
 
int counter
 
std::map< std::string, std::map< int, MonitorElement * > > dduHistos
 
std::map< std::string, std::map< int, std::vector< MonitorElement * > > > dduVectorHistos
 
std::map< std::string, std::map< int, MonitorElement * > > fedHistos
 
std::map< std::string, std::map< int, std::vector< MonitorElement * > > > fedVectorHistos
 
MonitorElementglbSummaryHisto
 
edm::ESHandle< DTReadOutMappingmapping
 
int nevents
 
unsigned int nLumiSegs
 
int nupdates
 
int prescaleFactor
 
int run
 
MonitorElementsummaryHisto
 
MonitorElementsummaryTDCHisto
 

Additional Inherited Members

- 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
 
- 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
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 28 of file DTDataIntegrityTest.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 30 of file DTDataIntegrityTest.cc.

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

30  : nevents(0) {
31 
32  LogTrace ("DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest") << "[DTDataIntegrityTest]: Constructor";
33 
34  // prescale on the # of LS to update the test
35  prescaleFactor = ps.getUntrackedParameter<int>("diagnosticPrescale", 1);
36 
37  checkUros = ps.getUntrackedParameter<bool>("checkUros",false);
38 
39  bookingdone = false;
40 
41 }
T getUntrackedParameter(std::string const &, T const &) const
#define LogTrace(id)
DTDataIntegrityTest::~DTDataIntegrityTest ( )
override

Destructor.

Definition at line 44 of file DTDataIntegrityTest.cc.

References LogTrace, and nupdates.

44  {
45 
46  LogTrace ("DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest") << "DataIntegrityTest: analyzed " << nupdates << " updates";
47 
48 }
#define LogTrace(id)

Member Function Documentation

void DTDataIntegrityTest::bookHistos ( DQMStore::IBooker ,
std::string  histoType,
int  dduId 
)
protected

Book the MEs.

Definition at line 334 of file DTDataIntegrityTest.cc.

References DQMStore::IBooker::setCurrentFolder().

334  {
335  stringstream dduId_s; dduId_s << dduId;
336 
337  ibooker.setCurrentFolder("DT/00-DataIntegrity/FED" + dduId_s.str());
338  string histoName;
339 
340 }
void DTDataIntegrityTest::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 319 of file DTDataIntegrityTest.cc.

References LogTrace.

319  {
320 
321  LogTrace ("DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest") <<"[DTDataIntegrityTest] endjob called!";
322 }
#define LogTrace(id)
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 50 of file DTDataIntegrityTest.cc.

References DQMStore::IBooker::book2D(), bookingdone, checkUros, DOCESLOTS, edm::EventSetup::get(), DQMStore::IGetter::get(), MonitorElement::getBinContent(), getROS(), MonitorElement::getTH1F(), MonitorElement::getTH2F(), glbSummaryHisto, mps_fire::i, edm::LuminosityBlockBase::id(), LogTrace, edm::LuminosityBlockID::luminosityBlock(), mapping, SiStripPI::max, FEDNumbering::MAXDTFEDID, FEDNumbering::MAXDTUROSFEDID, FEDNumbering::MINDTFEDID, FEDNumbering::MINDTUROSFEDID, nLumiSegs, nupdates, prescaleFactor, readOutToGeometry(), mps_fire::result, run, MonitorElement::setAxisTitle(), MonitorElement::setBinContent(), DQMStore::IBooker::setCurrentFolder(), Validation_hcalonly_cfi::sign, summaryHisto, summaryTDCHisto, makeMuonMisalignmentScenario::wheel, and plotscripts::wheelNumber().

51  {
52 
53 
54  if (!bookingdone) {
55 
56  //nSTAEvents = 0;
57  nupdates = 0;
58  run=0;
59 
60  // book the summary histogram
61 
62  ibooker.setCurrentFolder("DT/00-DataIntegrity");
63 
64  summaryHisto = ibooker.book2D("DataIntegritySummary","Summary Data Integrity",12,1,13,5,-2,3);
65  summaryHisto->setAxisTitle("Sector",1);
66  summaryHisto->setAxisTitle("Wheel",2);
67 
68  ibooker.setCurrentFolder("DT/00-DataIntegrity");
69 
70  summaryTDCHisto = ibooker.book2D("DataIntegrityTDCSummary","TDC Summary Data Integrity",12,1,13,5,-2,3);
71  summaryTDCHisto->setAxisTitle("Sector",1);
72  summaryTDCHisto->setAxisTitle("Wheel",2);
73 
74  ibooker.setCurrentFolder("DT/00-DataIntegrity");
75 
76  glbSummaryHisto = ibooker.book2D("DataIntegrityGlbSummary","Summary Data Integrity",12,1,13,5,-2,3);
77  glbSummaryHisto->setAxisTitle("Sector",1);
78  glbSummaryHisto->setAxisTitle("Wheel",2);
79 
80  context.get<DTReadOutMappingRcd>().get(mapping);
81  } //booking
82  bookingdone = true;
83 
84 
85  // counts number of lumiSegs
86  nLumiSegs = lumiSeg.id().luminosityBlock();
87  string nLumiSegs_s = to_string(nLumiSegs);
88 
89  // prescale factor
90  if (nLumiSegs%prescaleFactor != 0) return;
91 
92  LogTrace ("DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest")
93  <<"[DTDataIntegrityTest]: End of LS " << nLumiSegs << ", performing client operations";
94 
95 
96  // counts number of updats
97  nupdates++;
98 
99 
100  //Counter for x bin in the timing histos
101  counter++;
102 
103  //Loop on FED id
104  //Monitoring only real used FEDs
105  int FEDIDmax=FEDNumbering::MAXDTFEDID;
106  int FEDIDmin=FEDNumbering::MINDTFEDID;
107  if (checkUros){
110  }
111 
112  for (int dduId=FEDIDmin; dduId<=FEDIDmax; ++dduId){
113  LogTrace ("DTDQM|DTRawToDigi|DTMonitorClient|DTDataIntegrityTest")
114  <<"[DTDataIntegrityTest]:FED Id: "<<dduId;
115 
116  //Each nTimeBin onUpdate remove timing histos and book a new bunch of them
117  string dduId_s = to_string(dduId);
118 
119  string histoType;
120 
121  //Check if the list of ROS is compatible with the channels enabled
122  string rosStatusName = "DT/00-DataIntegrity/FED" + dduId_s + "/FED" + dduId_s + "_ROSStatus";
123  if (checkUros) rosStatusName = "DT/00-DataIntegrity/FED" + dduId_s + "/FED" + dduId_s + "_uROSStatus";
124  MonitorElement * FED_ROSStatus = igetter.get(rosStatusName);
125 
126  // Get the error summary histo
127  string fedSummaryName = "DT/00-DataIntegrity/FED" + dduId_s + "_ROSSummary";
128  MonitorElement * FED_ROSSummary = nullptr;
129  MonitorElement * FED_ROSSummary1 = nullptr;
130  MonitorElement * FED_ROSSummary2 = nullptr;
131  string fedSummaryName1 = "";
132  string fedSummaryName2 = "";
133  string sign = "-";
134  if (checkUros) {
135  if(dduId==FEDIDmin || dduId==FEDIDmax){
136  if(dduId==FEDIDmax) sign="";
137  fedSummaryName2 = "DT/00-DataIntegrity/ROSSummary_W" + sign + "2";
138  fedSummaryName1 = "DT/00-DataIntegrity/ROSSummary_W" + sign + "1";
139  FED_ROSSummary1 = igetter.get(fedSummaryName1);
140  FED_ROSSummary2 = igetter.get(fedSummaryName2);
141  }
142  else { fedSummaryName = "DT/00-DataIntegrity/ROSSummary_W0";
143  FED_ROSSummary1 = igetter.get(fedSummaryName);
144  FED_ROSSummary2 = igetter.get(fedSummaryName); //for wheel compatibility...
145  }
146  }
147  else FED_ROSSummary = igetter.get(fedSummaryName); //legacy case
148 
149  // Get the event length plot (used to count # of processed evts)
150  string fedEvLenName = "DT/00-DataIntegrity/FED" + dduId_s + "/FED" + dduId_s + "_EventLength";
151  MonitorElement * FED_EvLength = igetter.get(fedEvLenName);
152 
153  // Get the histos for FED integrity
154  string fedIntegrityFolder = "DT/00-DataIntegrity/";
155  MonitorElement * hFEDEntry = igetter.get(fedIntegrityFolder+"FEDEntries");
156  MonitorElement * hFEDFatal = igetter.get(fedIntegrityFolder+"FEDFatal");
157  MonitorElement * hFEDNonFatal = igetter.get(fedIntegrityFolder+"FEDNonFatal");
158 
159  if (checkUros){
160 
161  if (hFEDEntry) {
162  int offsetFED=1368;
163  // Check that the FED is in the ReadOut using the FEDIntegrity histos
164  bool fedNotReadout = (hFEDEntry->getBinContent(dduId-offsetFED)) == 0;
165  int wheel = dduId-offsetFED-2;
166  if(FED_ROSSummary1 && FED_ROSSummary2 && FED_ROSStatus && FED_EvLength && !fedNotReadout ) {
167  TH2F * histoFEDSummary1 = FED_ROSSummary1->getTH2F();
168  TH2F * histoFEDSummary2 = FED_ROSSummary2->getTH2F(); // same for central FED...
169  TH2F * histoROSStatus = FED_ROSStatus->getTH2F();
170  TH1F * histoEvLength = FED_EvLength->getTH1F();
171 
172  int nFEDEvts = histoEvLength->Integral();
173  //if(dduId==FEDIDmin || dduId==FEDIDmax) nFEDEvts = nFEDEvts/2.; // split in 2 for external FEDs
174  if (!(nFEDEvts>0)) continue;
175  int extraFEDevents1 = 0;
176  int extraFEDevents2 = 0;
177 
178  for(int urosNumber = 1; urosNumber <= DOCESLOTS; ++urosNumber) { // loop on the uROS
179  string urosNumber_s = to_string(urosNumber);
180  // Get the event length plot for this uROS (used to count # of processed evts)
181  string fedUrosEvLenName = "DT/00-DataIntegrity/FED" + dduId_s + "/uROS" + urosNumber_s +
182  "/FED" + dduId_s + "_uROS" + urosNumber_s + "_EventLength";
183  MonitorElement * FED_uROS_EvLength = igetter.get(fedUrosEvLenName);
184  TH1F * histoUrosEvLength = FED_uROS_EvLength->getTH1F();
185  int nFEDEvtsUros = histoUrosEvLength->Integral();
186 
187  //station 4 sectors drievn by uROS 1 & 2
188  if (urosNumber==1) {extraFEDevents1=nFEDEvtsUros; continue;}
189  if (urosNumber==2) {extraFEDevents2=nFEDEvtsUros; continue;}
190 
191  if(nFEDEvtsUros>0) { //this uROS is active
192  nFEDEvtsUros = extraFEDevents1+extraFEDevents2+nFEDEvtsUros / 3.; // split in 3 ROS
193  float nGErrors = histoROSStatus->Integral(1,12,urosNumber,urosNumber);//Only Global Errors,
194  //not possible to distinguish which ROS, so coumting them in the 3/12 ROSes
195 
196  int ros = getROS(urosNumber,0);
197  for (int iros=ros; iros<(ros+3); ++iros){
198  // -1,0,+1 wheels
199  float nROBErrors1 = histoFEDSummary1->Integral(1,5,iros,iros); //Errors and Not OK Flag
200  float nErrors1 = nROBErrors1+nGErrors;
201  float result1 =0.;
202  if(nFEDEvtsUros!=0)
203  result1 = max((float)0., ((float)nFEDEvtsUros-nROBErrors1)/(float)nFEDEvtsUros);
204  summaryHisto->setBinContent(iros,wheel+3,result1);
205  double tdcResult1 = -2;
206  float nTDCErrors1 = histoFEDSummary1->Integral(6,6,iros,iros); //Only TDC fatal considered
207  if(nTDCErrors1 == 0) { // no errors
208  tdcResult1 = 0.5;
209  } else { // there are errors
210  tdcResult1 = 2.5;
211  }
212  summaryTDCHisto->setBinContent(iros,wheel+3,tdcResult1);
213 
214  // FIXME: different errors should have different weights
215  float sectPerc1 = 0.;
216  if(nFEDEvtsUros!=0)
217  sectPerc1 = max((float)0., ((float)nFEDEvtsUros-nErrors1)/(float)nFEDEvtsUros);
218  glbSummaryHisto->setBinContent(iros,wheel+3,sectPerc1);
219  if(dduId==(FEDIDmax-1)) continue; //wheel 0 case
220 
221  // -2,+2 wheels
222  float nROBErrors2 = histoFEDSummary2->Integral(1,5,iros,iros); //Errors and Not OK Flag
223  float nErrors2 = nROBErrors2+nGErrors;
224  float result2 =0.;
225  if(nFEDEvtsUros!=0)
226  result2 = max((float)0., ((float)nFEDEvtsUros-nROBErrors2)/(float)nFEDEvtsUros);
227  summaryHisto->setBinContent(iros,wheel*2+3,result2);
228 
229  double tdcResult2 = -2;
230  float nTDCErrors2 = histoFEDSummary2->Integral(6,6,iros,iros); //Only TDC fatal considered
231  if(nTDCErrors2 == 0) { // no errors
232  tdcResult2 = 0.5;
233  } else { // there are errors
234  tdcResult2 = 2.5;
235  }
236  summaryTDCHisto->setBinContent(iros,wheel*2+3,tdcResult2);
237 
238  // FIXME: different errors should have different weights
239  float sectPerc2 = 0.;
240  if(nFEDEvtsUros!=0)
241  sectPerc2 = max((float)0., ((float)nFEDEvtsUros-nErrors2)/(float)nFEDEvtsUros);
242  glbSummaryHisto->setBinContent(iros,wheel*2+3,sectPerc2);
243  } //loop in three ros
244  }// this uROS is active
245  } //loop on uros
246  } else { // no data in this FED: it is off, no ROS suummary/status or evLength and fedNotReadout
247  for(int i = 1; i <= DOCESLOTS; ++i) {
248  summaryHisto->setBinContent(i,wheel+3,0.5);
249  summaryTDCHisto->setBinContent(i,wheel+3,1.5);
250  glbSummaryHisto->setBinContent(i,wheel+3,0.5);
251  if (dduId==(FEDIDmax-1)) continue; //wheel 0 case
252  summaryHisto->setBinContent(i,wheel*2+3,0.5);
253  summaryTDCHisto->setBinContent(i,wheel*2+3,1.5);
254  glbSummaryHisto->setBinContent(i,wheel*2+3,0.5);
255  } //loop on uros
256  } // no data in this FED: it is off, no ROS suummary/status or evLength
257 
258  } //FEDentry
259  } else { //legacy case
260  if(hFEDEntry && hFEDFatal && hFEDNonFatal) {
261  if(FED_ROSSummary && FED_ROSStatus && FED_EvLength) {
262  TH2F * histoFEDSummary = FED_ROSSummary->getTH2F();
263  TH2F * histoROSStatus = FED_ROSStatus->getTH2F();
264  TH1F * histoEvLength = FED_EvLength->getTH1F();
265  // Check that the FED is in the ReadOut using the FEDIntegrity histos
266  bool fedNotReadout = (hFEDEntry->getBinContent(dduId-769) == 0 &&
267  hFEDFatal->getBinContent(dduId-769) == 0 &&
268  hFEDNonFatal->getBinContent(dduId-769) == 0);
269 
270  int nFEDEvts = histoEvLength->Integral();
271  for(int rosNumber = 1; rosNumber <= 12; ++rosNumber) { // loop on the ROS
272  int wheelNumber, sectorNumber;
273  if (!readOutToGeometry(dduId,rosNumber,wheelNumber,sectorNumber)) {
274  float nErrors = histoFEDSummary->Integral(1,14,rosNumber,rosNumber);
275  float nROBErrors = histoROSStatus->Integral(2,8,rosNumber,rosNumber);
276  nErrors += nROBErrors;
277  float result =0.;
278  if(nFEDEvts!=0)
279  result = max((float)0., ((float)nFEDEvts-nROBErrors)/(float)nFEDEvts);
280  summaryHisto->setBinContent(sectorNumber,wheelNumber+3,result);
281  int tdcResult = -2;
282  float nTDCErrors = histoFEDSummary->Integral(15,15,rosNumber,rosNumber);
283  if(nTDCErrors == 0) { // no errors
284  tdcResult = 0;
285  } else { // there are errors
286  tdcResult = 2;
287  }
288  summaryTDCHisto->setBinContent(sectorNumber,wheelNumber+3,tdcResult);
289  // FIXME: different errors should have different weights
290  float sectPerc = max((float)0., ((float)nFEDEvts-nErrors)/(float)nFEDEvts);
291  glbSummaryHisto->setBinContent(sectorNumber,wheelNumber+3,sectPerc);
292 
293  if(fedNotReadout) {
294  // no data in this FED: it is off
295  summaryHisto->setBinContent(sectorNumber,wheelNumber+3,0);
296  summaryTDCHisto->setBinContent(sectorNumber,wheelNumber+3,1);
297  glbSummaryHisto->setBinContent(sectorNumber,wheelNumber+3,0);
298  } //fedNotReadout
299  } //mapping
300  } //loop on ros
301  } else { // no data in this FED: it is off, no ROS suummary/status or evLength
302  for(int rosNumber = 1; rosNumber <= 12; ++rosNumber) {
303  int wheelNumber, sectorNumber;
304  if (!readOutToGeometry(dduId,rosNumber,wheelNumber,sectorNumber)) {
305  summaryHisto->setBinContent(sectorNumber,wheelNumber+3,0);
306  summaryTDCHisto->setBinContent(sectorNumber,wheelNumber+3,1);
307  glbSummaryHisto->setBinContent(sectorNumber,wheelNumber+3,0);
308  } //mapping
309  } //loop on ros
310  } // no data in this FED: it is off, no ROS suummary/status or evLength
311 
312  }// no FED entry, fatal, nonfatal
313 
314  } //legacy case
315 
316  } // loop on dduIds
317 }
void setBinContent(int binx, double content)
set content of bin (1-D)
TH1F * getTH1F() const
MonitorElement * summaryTDCHisto
MonitorElement * glbSummaryHisto
static const int DOCESLOTS
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
def wheelNumber(wheell)
Definition: plotscripts.py:47
MonitorElement * summaryHisto
#define LogTrace(id)
TH2F * getTH2F() const
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
int readOutToGeometry(int dduId, int rosNumber, int &wheel, int &sector)
edm::ESHandle< DTReadOutMapping > mapping
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
int getROS(int uROS, int link)
double getBinContent(int binx) const
get content of bin (1-D)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
string DTDataIntegrityTest::getMEName ( std::string  histoType,
int  FEDId 
)
protected

Get the ME name.

Definition at line 324 of file DTDataIntegrityTest.cc.

324  {
325  //Use the DDU name to find the ME
326  stringstream dduID_s; dduID_s << FEDId;
327 
328  string folderName = "DT/00-DataIntegrity/FED" + dduID_s.str();
329 
330  string histoName = folderName + "/FED" + dduID_s.str() + "_" + histoType;
331  return histoName;
332 }
int DTDataIntegrityTest::getROS ( int  uROS,
int  link 
)
private

Definition at line 350 of file DTDataIntegrityTest.cc.

Referenced by dqmEndLuminosityBlock().

350  {
351 
352  int slot = 0;
353  switch(uROS){
354  case 1:{
355  slot = 5;
356  break;
357  }
358  case 2:{
359  slot = 11;
360  break;
361  }
362  case 3:{
363  slot = 1;
364  break;
365  }
366  case 4:{
367  slot = 7;
368  break;
369  }
370  case 5:{
371  slot = 2;
372  break;
373  }
374  case 6:{
375  slot = 8;
376  break;
377  }
378  case 9:{
379  slot = 9;
380  break;
381  }
382  case 10:{
383  slot = 3;
384  break;
385  }
386  case 11:{
387  slot = 10;
388  break;
389  }
390  case 12:{
391  slot = 4;
392  break;
393  }
394  }
395 
396  if (slot%6 == 5) return link+1;
397 
398  int ros = (link/24) + 3*(slot%6) - 2;
399  return ros;
400 }
int DTDataIntegrityTest::readOutToGeometry ( int  dduId,
int  rosNumber,
int &  wheel,
int &  sector 
)
private

Definition at line 343 of file DTDataIntegrityTest.cc.

References mapping, and DTReadOutMapping::readOutToGeometry().

Referenced by dqmEndLuminosityBlock().

343  {
344 
345  int dummy;
346  return mapping->readOutToGeometry(dduId,ros,2,2,2,wheel,dummy,sector,dummy,dummy,dummy);
347 
348 }
int readOutToGeometry(int dduId, int rosId, int robId, int tdcId, int channelId, DTWireId &wireId) const
transform identifiers
edm::ESHandle< DTReadOutMapping > mapping

Member Data Documentation

bool DTDataIntegrityTest::bookingdone
private

Definition at line 72 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock(), and DTDataIntegrityTest().

bool DTDataIntegrityTest::checkUros
private

Definition at line 62 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock(), and DTDataIntegrityTest().

int DTDataIntegrityTest::counter
private

Definition at line 65 of file DTDataIntegrityTest.h.

Referenced by counter.Counters::__getitem__().

std::map<std::string, std::map<int, MonitorElement*> > DTDataIntegrityTest::dduHistos
private

Definition at line 77 of file DTDataIntegrityTest.h.

std::map<std::string, std::map<int, std::vector <MonitorElement*> > > DTDataIntegrityTest::dduVectorHistos
private

Definition at line 78 of file DTDataIntegrityTest.h.

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

Definition at line 80 of file DTDataIntegrityTest.h.

std::map<std::string, std::map<int, std::vector <MonitorElement*> > > DTDataIntegrityTest::fedVectorHistos
private

Definition at line 81 of file DTDataIntegrityTest.h.

MonitorElement* DTDataIntegrityTest::glbSummaryHisto
private

Definition at line 85 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock().

edm::ESHandle<DTReadOutMapping> DTDataIntegrityTest::mapping
private

Definition at line 74 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock(), and readOutToGeometry().

int DTDataIntegrityTest::nevents
private

Definition at line 67 of file DTDataIntegrityTest.h.

unsigned int DTDataIntegrityTest::nLumiSegs
private

Definition at line 68 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock().

int DTDataIntegrityTest::nupdates
private

Definition at line 56 of file DTDataIntegrityTest.h.

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

int DTDataIntegrityTest::prescaleFactor
private

Definition at line 59 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock(), and DTDataIntegrityTest().

int DTDataIntegrityTest::run
private
MonitorElement* DTDataIntegrityTest::summaryHisto
private

Definition at line 83 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock().

MonitorElement* DTDataIntegrityTest::summaryTDCHisto
private

Definition at line 84 of file DTDataIntegrityTest.h.

Referenced by dqmEndLuminosityBlock().