CMS 3D CMS Logo

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

#include <DTSummaryClients.h>

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

 DTSummaryClients (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTSummaryClients () 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 ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
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
 
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
 
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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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 dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
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)
 
template<Transition B>
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 (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Private Attributes

bool bookingdone
 
int nevents
 
MonitorElementsummaryReport
 
MonitorElementsummaryReportMap
 
std::vector< MonitorElement * > theSummaryContents
 

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
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 33 of file DTSummaryClients.h.

Constructor & Destructor Documentation

◆ DTSummaryClients()

DTSummaryClients::DTSummaryClients ( const edm::ParameterSet ps)

Constructor.

Definition at line 25 of file DTSummaryClients.cc.

25  : nevents(0) {
26  LogVerbatim("DTDQM|DTMonitorClient|DTSummaryClients") << "[DTSummaryClients]: Constructor";
27 
28  bookingdone = false;
29 }

References bookingdone.

◆ ~DTSummaryClients()

DTSummaryClients::~DTSummaryClients ( )
override

Destructor.

Definition at line 31 of file DTSummaryClients.cc.

31  {
32  LogVerbatim("DTDQM|DTMonitorClient|DTSummaryClients") << "DTSummaryClients: analyzed " << nevents << " events";
33 }

References nevents.

Member Function Documentation

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 35 of file DTSummaryClients.cc.

35  {
36  LogVerbatim("DTDQM|DTMonitorClient|DTSummaryClients") << "[DTSummaryClients]: endJob";
37 }

◆ dqmEndLuminosityBlock()

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

Reimplemented from DQMEDHarvester.

Definition at line 39 of file DTSummaryClients.cc.

42  {
43  if (!bookingdone) {
44  // book the summary histos
45 
46  ibooker.setCurrentFolder("DT/EventInfo");
47 
48  summaryReport = ibooker.bookFloat("reportSummary");
49  // Initialize to 1 so that no alarms are thrown at the beginning of the run
50  summaryReport->Fill(1.);
51 
52  summaryReportMap = ibooker.book2D("reportSummaryMap", "DT Report Summary Map", 12, 1, 13, 5, -2, 3);
53  summaryReportMap->setAxisTitle("sector", 1);
54  summaryReportMap->setAxisTitle("wheel", 2);
55 
56  ibooker.setCurrentFolder("DT/EventInfo/reportSummaryContents");
57 
58  for (int wheel = -2; wheel != 3; ++wheel) {
59  stringstream streams;
60  streams << "DT_Wheel" << wheel;
61  string meName = streams.str();
62 
63  theSummaryContents.push_back(ibooker.bookFloat(meName));
64  // Initialize to 1 so that no alarms are thrown at the beginning of the run
65  theSummaryContents[wheel + 2]->Fill(1.);
66  }
67  }
68  bookingdone = true;
69 
70  LogVerbatim("DTDQM|DTMonitorClient|DTSummaryClients")
71  << "[DTSummaryClients]: End of LS transition, performing the DQM client operation" << endl;
72 
73  // reset the monitor elements
76  for (int ii = 0; ii != 5; ++ii) {
77  theSummaryContents[ii]->Reset();
78  }
79 
80  bool noDTData = false;
81 
82  // Check if DT data in each ROS have been read out and set the SummaryContents and the ErrorSummary
83  // accordignly
84  MonitorElement* dataIntegritySummary = igetter.get("DT/00-DataIntegrity/DataIntegritySummary");
85  if (dataIntegritySummary != nullptr) {
86  int nDisabledFED = 0;
87  for (int wheel = 1; wheel != 6; ++wheel) { // loop over the wheels
88  int nDisablesROS = 0;
89  for (int sect = 1; sect != 13; ++sect) { // loop over sectors
90  if (dataIntegritySummary->getBinContent(sect, wheel) == 0) {
91  nDisablesROS++;
92  }
93  }
94  if (nDisablesROS == 12) {
95  nDisabledFED++;
96  theSummaryContents[wheel - 1]->Fill(0);
97  }
98  }
99 
100  if (nDisabledFED == 5) {
101  noDTData = true;
102  summaryReport->Fill(-1);
103  }
104 
105  } else {
106  LogVerbatim("DTDQM|DTMonitorClient|DTSummaryClients")
107  << "Data Integrity Summary not found with name: DT/00-DataIntegrity/DataIntegritySummary" << endl;
108  }
109 
110  double totalStatus = 0;
111  // protection
112  bool occupancyFound = true;
113 
114  // Fill the map using, at the moment, only the information from DT occupancy
115  // problems at a granularity smaller than the chamber are ignored
116  for (int wheel = -2; wheel <= 2; wheel++) { // loop over wheels
117  // retrieve the occupancy summary
118  stringstream str;
119  str << "DT/01-Digi/OccupancySummary_W" << wheel;
120  MonitorElement* wheelOccupancySummary = igetter.get(str.str());
121  if (wheelOccupancySummary != nullptr) {
122  int nFailingChambers = 0;
123  for (int sector = 1; sector <= 12; sector++) { // loop over sectors
124  for (int station = 1; station != 5; ++station) { // loop over stations
125  double chamberStatus = wheelOccupancySummary->getBinContent(sector, station);
126  LogTrace("DTDQM|DTMonitorClient|DTSummaryClients")
127  << "Wheel: " << wheel << " Stat: " << station << " Sect: " << sector << " status: " << chamberStatus
128  << endl;
129  if (chamberStatus != 4) {
130  summaryReportMap->Fill(sector, wheel, 0.25);
131  } else {
132  nFailingChambers++;
133  }
134  LogTrace("DTDQM|DTMonitorClient|DTSummaryClients")
135  << " sector (" << sector
136  << ") status on the map is: " << summaryReportMap->getBinContent(sector, wheel + 3) << endl;
137  }
138  }
139  theSummaryContents[wheel + 2]->Fill((48. - nFailingChambers) / 48.);
140  totalStatus += (48. - nFailingChambers) / 48.;
141  } else {
142  occupancyFound = false;
143  LogVerbatim("DTDQM|DTMonitorClient|DTSummaryClients")
144  << " Wheel Occupancy Summary not found with name: " << str.str() << endl;
145  }
146  }
147 
148  if (occupancyFound && !noDTData)
149  summaryReport->Fill(totalStatus / 5.);
150 }

References dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), bookingdone, dqm::impl::MonitorElement::Fill(), dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getBinContent(), cuy::ii, LogTrace, dqm::impl::MonitorElement::Reset(), dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), relativeConstraints::station, str, HLT_Fake1_cff::streams, summaryReport, summaryReportMap, theSummaryContents, and makeMuonMisalignmentScenario::wheel.

Member Data Documentation

◆ bookingdone

bool DTSummaryClients::bookingdone
private

Definition at line 56 of file DTSummaryClients.h.

Referenced by dqmEndLuminosityBlock(), and DTSummaryClients().

◆ nevents

int DTSummaryClients::nevents
private

Definition at line 50 of file DTSummaryClients.h.

Referenced by ~DTSummaryClients().

◆ summaryReport

MonitorElement* DTSummaryClients::summaryReport
private

Definition at line 52 of file DTSummaryClients.h.

Referenced by dqmEndLuminosityBlock().

◆ summaryReportMap

MonitorElement* DTSummaryClients::summaryReportMap
private

Definition at line 53 of file DTSummaryClients.h.

Referenced by dqmEndLuminosityBlock().

◆ theSummaryContents

std::vector<MonitorElement *> DTSummaryClients::theSummaryContents
private

Definition at line 54 of file DTSummaryClients.h.

Referenced by dqmEndLuminosityBlock().

DTSummaryClients::summaryReportMap
MonitorElement * summaryReportMap
Definition: DTSummaryClients.h:53
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
DTSummaryClients::nevents
int nevents
Definition: DTSummaryClients.h:50
relativeConstraints.station
station
Definition: relativeConstraints.py:67
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
DTSummaryClients::theSummaryContents
std::vector< MonitorElement * > theSummaryContents
Definition: DTSummaryClients.h:54
DTSummaryClients::summaryReport
MonitorElement * summaryReport
Definition: DTSummaryClients.h:52
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::impl::MonitorElement::Reset
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
Definition: MonitorElement.cc:354
str
#define str(s)
Definition: TestProcessor.cc:51
HLT_Fake1_cff.streams
streams
Definition: HLT_Fake1_cff.py:13
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
DTSummaryClients::bookingdone
bool bookingdone
Definition: DTSummaryClients.h:56
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
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
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:651
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
cuy.ii
ii
Definition: cuy.py:590