CMS 3D CMS Logo

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

#include <DTBlockedROChannelsTest.h>

Inheritance diagram for DTBlockedROChannelsTest:
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

Classes

class  DTLinkBinsMap
 
class  DTRobBinsMap
 

Public Member Functions

 DTBlockedROChannelsTest (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTBlockedROChannelsTest () 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
 
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)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &) override
 BeginRun. More...
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 DQM Client Diagnostic in online mode. More...
 
void fillChamberMap (DQMStore::IGetter &igetter, const edm::EventSetup &c)
 
void performClientDiagnostic (DQMStore::IGetter &igetter)
 DQM Client operations. 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 ESProduct , Transition Tr = Transition::Event>
auto esConsumes (eventsetup::EventSetupRecordKey const &, 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 readOutToGeometry (int dduId, int rosNumber, int robNumber, int &wheel, int &station, int &sector)
 
int theDDU (int crate, int slot, int link, bool tenDDU)
 
int theROB (int slot, int link)
 
int theROS (int slot, int link)
 

Private Attributes

std::map< DTChamberId, DTRobBinsMapchamberMap
 
std::map< DTChamberId, DTLinkBinsMapchamberMapUros
 
bool checkUros
 
DTTimeEvolutionHistohSystFractionVsLS
 
edm::ESHandle< DTReadOutMappingmapping
 
int nevents
 
int neventsPrev
 
unsigned int nLumiSegs
 
int nupdates
 
bool offlineMode
 
int prescaleFactor
 
unsigned int prevNLumiSegs
 
double prevTotalPerc
 
std::map< int, double > resultsPerLumi
 
int run
 
MonitorElementsummaryHisto
 
std::map< int, MonitorElement * > wheelHistos
 

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 25 of file DTBlockedROChannelsTest.h.

Constructor & Destructor Documentation

DTBlockedROChannelsTest::DTBlockedROChannelsTest ( const edm::ParameterSet ps)

Constructor.

Definition at line 27 of file DTBlockedROChannelsTest.cc.

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

27  : nevents(0),
28  neventsPrev(0),
29  prevNLumiSegs(0),
30  prevTotalPerc(0),
31  hSystFractionVsLS(nullptr)
32 {
33  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
34  << "[DTBlockedROChannelsTest]: Constructor";
35 
36  // prescale on the # of LS to update the test
37  prescaleFactor = ps.getUntrackedParameter<int>("diagnosticPrescale", 1);
38 
39  offlineMode = ps.getUntrackedParameter<bool>("offlineMode", true);
40 
41  checkUros = ps.getUntrackedParameter<bool>("checkUros", true);
42 
43 }
T getUntrackedParameter(std::string const &, T const &) const
DTTimeEvolutionHisto * hSystFractionVsLS
#define LogTrace(id)
DTBlockedROChannelsTest::~DTBlockedROChannelsTest ( )
override

Destructor.

Definition at line 47 of file DTBlockedROChannelsTest.cc.

References LogTrace, and nupdates.

47  {
48  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
49  << "DataIntegrityTest: analyzed " << nupdates << " updates";
50 }
#define LogTrace(id)

Member Function Documentation

void DTBlockedROChannelsTest::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
overrideprotected

BeginRun.

Definition at line 53 of file DTBlockedROChannelsTest.cc.

References nupdates.

54 {
55 
56  nupdates = 0;
57  return;
58 }
void DTBlockedROChannelsTest::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 200 of file DTBlockedROChannelsTest.cc.

References LogTrace, offlineMode, and performClientDiagnostic().

200  {
201 
202  if (offlineMode) {
203  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
204  <<"[DTBlockedROChannelsTest] endRun called. Client called in offline mode, performing operations.";
205  performClientDiagnostic(igetter);
206  }
207 }
void performClientDiagnostic(DQMStore::IGetter &igetter)
DQM Client operations.
#define LogTrace(id)
void DTBlockedROChannelsTest::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
overrideprotectedvirtual

DQM Client Diagnostic in online mode.

Reimplemented from DQMEDHarvester.

Definition at line 139 of file DTBlockedROChannelsTest.cc.

References DQMStore::IBooker::book2D(), chamberMap, chamberMapUros, checkUros, fillChamberMap(), hSystFractionVsLS, edm::LuminosityBlockBase::id(), LogTrace, edm::LuminosityBlockID::luminosityBlock(), nLumiSegs, nupdates, offlineMode, performClientDiagnostic(), prescaleFactor, edm::LuminosityBlockBase::run(), run, MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), summaryHisto, makeMuonMisalignmentScenario::wheel, and wheelHistos.

140  {
141 
142  //FR moved the following from beginJob!
143 
144  // book the summary histogram
145 
146  if (wheelHistos.empty()) { // this is an attempt to make these bookings only once!
147 
148  ibooker.setCurrentFolder("DT/00-ROChannels");
149  summaryHisto = ibooker.book2D("ROChannelSummary","Summary Blocked RO Channels",12,1,13,5,-2,3);
150  summaryHisto->setAxisTitle("Sector",1);
151  summaryHisto->setAxisTitle("Wheel",2);
152 
153  for(int wheel = -2; wheel != 3; ++wheel) {
154  stringstream namestream; namestream << "ROChannelSummary_W" << wheel;
155  stringstream titlestream; titlestream << "Blocked RO Channels (Wh " << wheel << ")";
156  wheelHistos[wheel] = ibooker.book2D(namestream.str().c_str(),titlestream.str().c_str(),12,1,13,4,1,5);
157  wheelHistos[wheel]->setAxisTitle("Sector",1);
158  wheelHistos[wheel]->setBinLabel(1,"MB1",2);
159  wheelHistos[wheel]->setBinLabel(2,"MB2",2);
160  wheelHistos[wheel]->setBinLabel(3,"MB3",2);
161  wheelHistos[wheel]->setBinLabel(4,"MB4",2);
162  }
163 
164  if(!offlineMode) {
165  hSystFractionVsLS = new DTTimeEvolutionHisto(ibooker, "EnabledROChannelsVsLS", "% RO channels",
166  500, 5, true, 3);
167  }
168  } // end attempt to make these bookings only once!
169 
170 
171  //FR moved here from beginRun
172 
173  if(checkUros){
174  if (chamberMapUros.empty()) fillChamberMap(igetter, context);
175  }
176  else{
177  if (chamberMap.empty()) fillChamberMap(igetter, context);
178  }
179 
180  //FR moved here from beginLuminosityBlock
181  run = lumiSeg.run();
182 
183  //FR moved here from endLuminosityBlock
184  // counts number of lumiSegs
185  nLumiSegs = lumiSeg.id().luminosityBlock();
186 
187  // prescale factor
188  if (nLumiSegs%prescaleFactor != 0 || offlineMode) return;
189 
190  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
191  <<"[DTBlockedROChannelsTest]: End of LS " << nLumiSegs << ". Client called in online mode, performing client operations";
192 
193  performClientDiagnostic(igetter);
194 
195  // counts number of updats
196  nupdates++;
197 
198 }
DTTimeEvolutionHisto * hSystFractionVsLS
std::map< DTChamberId, DTLinkBinsMap > chamberMapUros
std::map< int, MonitorElement * > wheelHistos
void performClientDiagnostic(DQMStore::IGetter &igetter)
DQM Client operations.
std::map< DTChamberId, DTRobBinsMap > chamberMap
void fillChamberMap(DQMStore::IGetter &igetter, const edm::EventSetup &c)
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
#define LogTrace(id)
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void DTBlockedROChannelsTest::fillChamberMap ( DQMStore::IGetter igetter,
const edm::EventSetup c 
)
protected

Definition at line 61 of file DTBlockedROChannelsTest.cc.

References chamberMap, chamberMapUros, checkUros, edm::EventSetup::get(), LogTrace, mapping, FEDNumbering::MAXDTFEDID, FEDNumbering::MAXDTUROSFEDID, FEDNumbering::MINDTFEDID, FEDNumbering::MINDTUROSFEDID, readOutToGeometry(), DTReadOutMapping::readOutToGeometry(), relativeConstraints::station, theDDU(), theROB(), theROS(), and makeMuonMisalignmentScenario::wheel.

Referenced by dqmEndLuminosityBlock().

61  {
62  // get the RO mapping
63  context.get<DTReadOutMappingRcd>().get(mapping);
64  int dummy = 0;
65  bool tenDDU = !mapping->readOutToGeometry(779, 7, 1, 1, 1,
66  dummy, dummy, dummy,
67  dummy, dummy, dummy);
68 
69  if (checkUros){
70  for(int crate = FEDNumbering::MINDTUROSFEDID; crate<=FEDNumbering::MAXDTUROSFEDID; ++crate) { //loop over FEDs
71  for (int mapSlot=1; mapSlot!=13; ++mapSlot){ //loop over mapSlot
72  for (int link=0; link!=72; ++link){ //loop over links
73  //skip non existing links
74  if (mapSlot==6) continue;
75  if (crate==1370 && mapSlot>5) continue;
76  if ((mapSlot==5 || mapSlot==11) && link>11) continue;
77 
78  int wheel = 0;
79  int station = 0;
80  int sector = 0;
81 
82  int dduId = theDDU(crate, mapSlot, link, tenDDU) ;
83  int ros = theROS(mapSlot, link);
84  int rob = theROB(mapSlot, link);
85 
86 // mapping->readOutToGeometry(dduId,ros,rob,2,2,wheel,station,sector,dummy,dummy,dummy);
87  readOutToGeometry(dduId,ros,rob,wheel,station,sector);
88  if (station>0) {
89  //std::cout<<" FED "<<crate<<" mapSlot "<< mapSlot<<" Link "<<link<<" Wh "<<wheel<<" station "<<station<<" sector "<<sector <<endl;
90  DTChamberId chId(wheel, station, sector);
91  if(chamberMapUros.find(chId) == chamberMapUros.end()) {
92  chamberMapUros[chId] = DTLinkBinsMap(igetter, dduId, ros);
93  chamberMapUros[chId].addLinkBin(link%24);
94  }
95  chamberMapUros[chId].addLinkBin(link%24);
96  } else {
97  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
98  << "[DTLinkBinsMap] FED: " << crate << "mapSlot: " << mapSlot << " Link: " << link
99  << " not in the mapping!" << endl;
100  }
101  } //loop on links
102  } //loop on mapSlots
103  } //loop on crates
104  } //checkUros
105  else{
106  // fill the map of the robs per chamber
107  // //FIXME: monitoring only real used FEDs
108  for(int dduId = FEDNumbering::MINDTFEDID; dduId<=FEDNumbering::MAXDTFEDID; ++dduId) { //loop over DDUs
109  for(int ros = 1; ros != 13; ++ros) { // loop over ROSs
110  for(int rob = 1; rob != 26; ++rob) { // loop over ROBs
111  int wheel = 0;
112  int station = 0;
113  int sector = 0;
114  if(!mapping->readOutToGeometry(dduId,ros,rob-1,0,2,wheel,station,sector,dummy,dummy,dummy) ||
115  !mapping->readOutToGeometry(dduId,ros,rob-1,0,16,wheel,station,sector,dummy,dummy,dummy)) {
116  DTChamberId chId(wheel, station, sector);
117  if(chamberMap.find(chId) == chamberMap.end()) {
118  chamberMap[chId] = DTRobBinsMap(igetter, dduId, ros);
119  chamberMap[chId].addRobBin(rob);
120  }
121  chamberMap[chId].addRobBin(rob);
122  } else {
123  LogTrace("DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest")
124  << "[DTRobBinsMap] FED: " << dduId << " ROS " << ros << " ROB: " << rob-1
125  << " not in the mapping!" << endl;
126  }
127  }
128  }
129  }
130  // loop over all chambers and remove the init flag
131  for(map<DTChamberId, DTRobBinsMap>::iterator chAndRobs = chamberMap.begin();
132  chAndRobs != chamberMap.end(); ++chAndRobs) {
133  chAndRobs->second.init(false);
134  }
135  } //Legacy
136 }
int theROB(int slot, int link)
std::map< DTChamberId, DTLinkBinsMap > chamberMapUros
int readOutToGeometry(int dduId, int rosId, int robId, int tdcId, int channelId, DTWireId &wireId) const
transform identifiers
std::map< DTChamberId, DTRobBinsMap > chamberMap
int theROS(int slot, int link)
edm::ESHandle< DTReadOutMapping > mapping
#define LogTrace(id)
int theDDU(int crate, int slot, int link, bool tenDDU)
int readOutToGeometry(int dduId, int rosNumber, int robNumber, int &wheel, int &station, int &sector)
void DTBlockedROChannelsTest::performClientDiagnostic ( DQMStore::IGetter igetter)
protected

DQM Client operations.

Definition at line 209 of file DTBlockedROChannelsTest.cc.

References DTTimeEvolutionHisto::accumulateValueTimeSlot(), chamberMap, chamberMapUros, checkUros, MonitorElement::Fill(), DQMStore::IGetter::get(), MonitorElement::getIntValue(), hSystFractionVsLS, nevents, neventsPrev, nLumiSegs, offlineMode, prevTotalPerc, MonitorElement::Reset(), Scenarios_cff::scale, DTChamberId::sector(), DTChamberId::station(), summaryHisto, DTTimeEvolutionHisto::updateTimeSlot(), DTChamberId::wheel(), makeMuonMisalignmentScenario::wheel, and wheelHistos.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

209  {
210 
211  //FR: I've commented the if below. Either in online mode or in offline mode, when the diagnostic is called
212  // compute first the number of events. It will be: event/lumisection in the online case, it will be: total number
213  // of events (neventsPrev=0) in the offline case, when the diagnostic is called only once from the dqmEndJob
214 
215  //if(nevents == 0) { // hack to work also in offline DQM
216  MonitorElement *procEvt = igetter.get("DT/EventInfo/processedEvents");
217  if(procEvt != nullptr) {
218  int procEvents = procEvt->getIntValue();
219  nevents = procEvents - neventsPrev;
220  neventsPrev = procEvents;
221  }
222  //}
223 
224  double totalPerc = prevTotalPerc;
225  // check again!
226  if(nevents != 0) { // skip the computation if no events in the last LS
227 
228  // reset the histos
229  summaryHisto->Reset();
230  for(int wheel = -2; wheel != 3; ++wheel) {
231  wheelHistos[wheel]->Reset();
232  }
233 
234  totalPerc = 0.;
235 
236  if (checkUros){
237  // loop over all chambers and fill the wheel plots
238  for(map<DTChamberId, DTLinkBinsMap>::iterator chAndLinks = chamberMapUros.begin();
239  chAndLinks != chamberMapUros.end(); ++chAndLinks) {
240  DTChamberId chId = (*chAndLinks).first;
241  double scale = 1.;
242  int sectorForPlot = chId.sector();
243  if(sectorForPlot == 13 || (sectorForPlot == 4 && chId.station() ==4)) {
244  sectorForPlot = 4;
245  scale = 0.5;
246  } else if(sectorForPlot == 14 || (sectorForPlot == 10 && chId.station() ==4)) {
247  sectorForPlot = 10;
248  scale = 0.5;
249  }
250 
251  // NOTE: can be called only ONCE per event per each chamber
252  double chPercent = (*chAndLinks).second.getChamberPercentage(igetter);
253  wheelHistos[chId.wheel()]->Fill(sectorForPlot, chId.station(),
254  scale*chPercent);
255  totalPerc += chPercent*scale*1./240.; // CB has to be 240 as double stations are taken into account by scale factor
256 
257  // Fill the summary
258  summaryHisto->Fill(sectorForPlot, chId.wheel(), 0.25*scale*chPercent);
259  }
260  }//Uros case
261  else{ //Legacy case
262  // loop over all chambers and fill the wheel plots
263  for(map<DTChamberId, DTRobBinsMap>::iterator chAndRobs = chamberMap.begin();
264  chAndRobs != chamberMap.end(); ++chAndRobs) {
265  DTChamberId chId = (*chAndRobs).first;
266  double scale = 1.;
267  int sectorForPlot = chId.sector();
268  if(sectorForPlot == 13 || (sectorForPlot == 4 && chId.station() ==4)) {
269  sectorForPlot = 4;
270  scale = 0.5;
271  } else if(sectorForPlot == 14 || (sectorForPlot == 10 && chId.station() ==4)) {
272  sectorForPlot = 10;
273  scale = 0.5;
274  }
275 
276  // NOTE: can be called only ONCE per event per each chamber
277  double chPercent = (*chAndRobs).second.getChamberPercentage(igetter);
278  wheelHistos[chId.wheel()]->Fill(sectorForPlot, chId.station(),
279  scale*chPercent);
280  totalPerc += chPercent*scale*1./240.; // CB has to be 240 as double stations are taken into account by scale factor
281 
282  // Fill the summary
283  summaryHisto->Fill(sectorForPlot, chId.wheel(), 0.25*scale*chPercent);
284  }
285  } //Legacy case
286  } //nevents != 0
287 
288  if(!offlineMode) { // fill trend histo only in online
291  prevTotalPerc = totalPerc;
292  }
293 
294 }
int64_t getIntValue() const
DTTimeEvolutionHisto * hSystFractionVsLS
void accumulateValueTimeSlot(float value)
std::map< DTChamberId, DTLinkBinsMap > chamberMapUros
std::map< int, MonitorElement * > wheelHistos
std::map< DTChamberId, DTRobBinsMap > chamberMap
void Fill(long long x)
void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
void updateTimeSlot(int ls, int nEventsInLS)
int sector() const
Definition: DTChamberId.h:61
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
int DTBlockedROChannelsTest::readOutToGeometry ( int  dduId,
int  rosNumber,
int  robNumber,
int &  wheel,
int &  station,
int &  sector 
)
private

Definition at line 296 of file DTBlockedROChannelsTest.cc.

References mapping, and DTReadOutMapping::readOutToGeometry().

Referenced by fillChamberMap().

296  {
297 
298  int dummy=0;
299  return mapping->readOutToGeometry(dduId,ros,rob,2,2,wheel,station,sector,dummy,dummy,dummy);
300 
301 }
int readOutToGeometry(int dduId, int rosId, int robId, int tdcId, int channelId, DTWireId &wireId) const
transform identifiers
edm::ESHandle< DTReadOutMapping > mapping
int DTBlockedROChannelsTest::theDDU ( int  crate,
int  slot,
int  link,
bool  tenDDU 
)
private

Definition at line 483 of file DTBlockedROChannelsTest.cc.

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

Referenced by fillChamberMap().

483  {
484 
485  int ros = theROS(slot,link);
486 
487  int ddu = 772;
488  //if (crate == 1368) { ddu = 775; }
489  //Needed just in case this FED should be used due to fibers lenght
490 
491  if (crate == FEDNumbering::MINDTUROSFEDID) {
492  if (slot < 7)
493  ddu = 770;
494  else
495  ddu = 771;
496  }
497 
498  if (crate == (FEDNumbering::MINDTUROSFEDID+1)) { ddu = 772; }
499 
500  if (crate == FEDNumbering::MAXDTUROSFEDID) {
501  if (slot < 7)
502  ddu = 773;
503  else
504  ddu = 774;
505  }
506 
507  if (ros > 6 && tenDDU && ddu < 775)
508  ddu += 5;
509 
510  return ddu;
511 }
int theROS(int slot, int link)
int DTBlockedROChannelsTest::theROB ( int  slot,
int  link 
)
private

Definition at line 522 of file DTBlockedROChannelsTest.cc.

References DEFINE_FWK_MODULE.

Referenced by fillChamberMap().

522  {
523 
524  if (slot%6 == 5) return 23;
525 
526  int rob = link%24;
527  if (rob < 15) return rob;
528  if (rob == 15) return 24;
529  return rob-1;
530 }
int DTBlockedROChannelsTest::theROS ( int  slot,
int  link 
)
private

Definition at line 513 of file DTBlockedROChannelsTest.cc.

Referenced by fillChamberMap(), and theDDU().

513  {
514 
515  if (slot%6 == 5) return link+1;
516 
517  int ros = (link/24) + 3*(slot%6) - 2;
518  return ros;
519 }

Member Data Documentation

std::map<DTChamberId, DTRobBinsMap> DTBlockedROChannelsTest::chamberMap
private
std::map<DTChamberId, DTLinkBinsMap> DTBlockedROChannelsTest::chamberMapUros
private
bool DTBlockedROChannelsTest::checkUros
private
DTTimeEvolutionHisto* DTBlockedROChannelsTest::hSystFractionVsLS
private

Definition at line 80 of file DTBlockedROChannelsTest.h.

Referenced by dqmEndLuminosityBlock(), and performClientDiagnostic().

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

Definition at line 72 of file DTBlockedROChannelsTest.h.

Referenced by fillChamberMap(), and readOutToGeometry().

int DTBlockedROChannelsTest::nevents
private

Definition at line 64 of file DTBlockedROChannelsTest.h.

Referenced by performClientDiagnostic().

int DTBlockedROChannelsTest::neventsPrev
private

Definition at line 65 of file DTBlockedROChannelsTest.h.

Referenced by performClientDiagnostic().

unsigned int DTBlockedROChannelsTest::nLumiSegs
private

Definition at line 66 of file DTBlockedROChannelsTest.h.

Referenced by dqmEndLuminosityBlock(), and performClientDiagnostic().

int DTBlockedROChannelsTest::nupdates
private
bool DTBlockedROChannelsTest::offlineMode
private
int DTBlockedROChannelsTest::prescaleFactor
private

Definition at line 61 of file DTBlockedROChannelsTest.h.

Referenced by dqmEndLuminosityBlock(), and DTBlockedROChannelsTest().

unsigned int DTBlockedROChannelsTest::prevNLumiSegs
private

Definition at line 67 of file DTBlockedROChannelsTest.h.

double DTBlockedROChannelsTest::prevTotalPerc
private

Definition at line 68 of file DTBlockedROChannelsTest.h.

Referenced by performClientDiagnostic().

std::map<int, double> DTBlockedROChannelsTest::resultsPerLumi
private

Definition at line 79 of file DTBlockedROChannelsTest.h.

int DTBlockedROChannelsTest::run
private
MonitorElement* DTBlockedROChannelsTest::summaryHisto
private

Definition at line 77 of file DTBlockedROChannelsTest.h.

Referenced by dqmEndLuminosityBlock(), and performClientDiagnostic().

std::map<int, MonitorElement*> DTBlockedROChannelsTest::wheelHistos
private

Definition at line 76 of file DTBlockedROChannelsTest.h.

Referenced by dqmEndLuminosityBlock(), and performClientDiagnostic().