CMS 3D CMS Logo

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

#include <DTOfflineSummaryClients.h>

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

void beginRun (const edm::Run &r, const edm::EventSetup &c) override
 BeginRun. More...
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 EndJob. More...
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 EndLumi. More...
 
 DTOfflineSummaryClients (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTOfflineSummaryClients () 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)
 

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 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)
 
- 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 20 of file DTOfflineSummaryClients.h.

Constructor & Destructor Documentation

◆ DTOfflineSummaryClients()

DTOfflineSummaryClients::DTOfflineSummaryClients ( const edm::ParameterSet ps)

Constructor.

Definition at line 27 of file DTOfflineSummaryClients.cc.

References bookingdone.

27  : nevents(0) {
28  LogVerbatim("DTDQM|DTMonitorClient|DTOfflineSummaryClients") << "[DTOfflineSummaryClients]: Constructor";
29 
30  bookingdone = false;
31 }
Log< level::Info, true > LogVerbatim

◆ ~DTOfflineSummaryClients()

DTOfflineSummaryClients::~DTOfflineSummaryClients ( )
override

Destructor.

Definition at line 33 of file DTOfflineSummaryClients.cc.

References nevents.

33  {
34  LogVerbatim("DTDQM|DTMonitorClient|DTOfflineSummaryClients")
35  << "DTOfflineSummaryClients: analyzed " << nevents << " events";
36 }
Log< level::Info, true > LogVerbatim

Member Function Documentation

◆ beginRun()

void DTOfflineSummaryClients::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
override

BeginRun.

Definition at line 38 of file DTOfflineSummaryClients.cc.

38 {};

◆ dqmEndJob()

void DTOfflineSummaryClients::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overridevirtual

EndJob.

Implements DQMEDHarvester.

Definition at line 48 of file DTOfflineSummaryClients.cc.

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

48  {
49  LogVerbatim("DTDQM|DTMonitorClient|DTOfflineSummaryClients")
50  << "[DTOfflineSummaryClients]: end job. Performin client operation";
51 
52  // book the summary histos
53 
54  ibooker.setCurrentFolder("DT/EventInfo");
55  summaryReport = ibooker.bookFloat("reportSummary");
56  // Initialize to 1 so that no alarms are thrown at the beginning of the run
57  summaryReport->Fill(1.);
58 
59  summaryReportMap = ibooker.book2D("reportSummaryMap", "DT Report Summary Map", 12, 1, 13, 5, -2, 3);
60  summaryReportMap->setAxisTitle("sector", 1);
61  summaryReportMap->setAxisTitle("wheel", 2);
62 
63  ibooker.setCurrentFolder("DT/EventInfo/reportSummaryContents");
64 
65  for (int wheel = -2; wheel != 3; ++wheel) {
66  stringstream streams;
67  streams << "DT_Wheel" << wheel;
68  string meName = streams.str();
69 
70  theSummaryContents.push_back(ibooker.bookFloat(meName));
71  // Initialize to 1 so that no alarms are thrown at the beginning of the run
72  theSummaryContents[wheel + 2]->Fill(1.);
73  }
74 
75  // reset the monitor elements
77  summaryReport->Fill(0.);
78  for (int ii = 0; ii != 5; ++ii) {
79  theSummaryContents[ii]->Fill(0.);
80  }
81 
82  // Fill the map using, at the moment, only the information from DT chamber efficiency
83  // problems at a granularity smaller than the chamber are ignored
84  for (int wheel = -2; wheel <= 2; wheel++) { // loop over wheels
85  // retrieve the chamber efficiency summary
86  stringstream str;
87  str << "DT/05-ChamberEff/EfficiencyMap_All_W" << wheel;
88  MonitorElement* segmentWheelSummary = igetter.get(str.str());
89  if (segmentWheelSummary != nullptr) {
90  float nFailingChambers = 0.;
91 
92  for (int sector = 1; sector <= 12; sector++) { // loop over sectors
93 
94  double meaneff = 0.;
95  double errorsum = 0.;
96 
97  for (int station = 1; station != 5; ++station) { // loop over stations
98 
99  const double tmpefficiency = segmentWheelSummary->getBinContent(sector, station);
100  const double tmpvariance = pow(segmentWheelSummary->getBinError(sector, station), 2);
101 
102  if (tmpefficiency == 0 || tmpvariance == 0) {
103  nFailingChambers++;
104  continue;
105  }
106 
107  meaneff += tmpefficiency / tmpvariance;
108  errorsum += 1. / tmpvariance;
109 
110  if (tmpefficiency < 0.2)
111  nFailingChambers++;
112 
113  LogTrace("DTDQM|DTMonitorClient|DTOfflineSummaryClients")
114  << "Wheel: " << wheel << " Stat: " << station << " Sect: " << sector << " status: " << meaneff / errorsum
115  << endl;
116  }
117 
118  const double eff_result = meaneff / errorsum;
119 
120  if (eff_result > 0.7)
121  summaryReportMap->Fill(sector, wheel, 1.);
122  else if (eff_result < 0.7 && eff_result > 0.5)
123  summaryReportMap->Fill(sector, wheel, 0.6);
124  else if (eff_result < 0.5 && eff_result > 0.3)
125  summaryReportMap->Fill(sector, wheel, 0.4);
126  else if (eff_result < 0.3 && eff_result > 0.)
127  summaryReportMap->Fill(sector, wheel, 0.15);
128  }
129  theSummaryContents[wheel + 2]->Fill((48. - nFailingChambers) / 48.);
130  summaryReport->Fill(summaryReport->getFloatValue() + theSummaryContents[wheel + 2]->getFloatValue() / 5.);
131  } else {
132  LogWarning("DTDQM|DTMonitorClient|DTOfflineSummaryClients")
133  << " [DTOfflineSummaryClients] Segment Summary not found with name: " << str.str() << endl;
134  }
135  }
136 }
Log< level::Info, true > LogVerbatim
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::vector< MonitorElement * > theSummaryContents
#define LogTrace(id)
void Fill(long long x)
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
virtual double getFloatValue() const
ii
Definition: cuy.py:589
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
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
Log< level::Warning, false > LogWarning
#define str(s)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
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)

◆ dqmEndLuminosityBlock()

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

EndLumi.

Reimplemented from DQMEDHarvester.

Definition at line 40 of file DTOfflineSummaryClients.cc.

43  {
44  LogVerbatim("DTDQM|DTMonitorClient|DTOfflineSummaryClients")
45  << "[DTOfflineSummaryClients]: End of LS transition" << endl;
46 }
Log< level::Info, true > LogVerbatim

Member Data Documentation

◆ bookingdone

bool DTOfflineSummaryClients::bookingdone
private

Definition at line 44 of file DTOfflineSummaryClients.h.

Referenced by DTOfflineSummaryClients().

◆ nevents

int DTOfflineSummaryClients::nevents
private

Definition at line 42 of file DTOfflineSummaryClients.h.

Referenced by ~DTOfflineSummaryClients().

◆ summaryReport

MonitorElement* DTOfflineSummaryClients::summaryReport
private

Definition at line 46 of file DTOfflineSummaryClients.h.

Referenced by dqmEndJob().

◆ summaryReportMap

MonitorElement* DTOfflineSummaryClients::summaryReportMap
private

Definition at line 47 of file DTOfflineSummaryClients.h.

Referenced by dqmEndJob().

◆ theSummaryContents

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

Definition at line 48 of file DTOfflineSummaryClients.h.

Referenced by dqmEndJob().