CMS 3D CMS Logo

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

#include <L1TTestsSummary.h>

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

 L1TTestsSummary (const edm::ParameterSet &ps)
 
 ~L1TTestsSummary () override
 
- 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

virtual void book (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 
void dqmEndJob (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
- 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 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

void updateL1TOccupancyMonitor (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 
void updateL1TRateMonitor (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 
void updateL1TSummary (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 
void updateL1TSyncMonitor (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 

Private Attributes

int binYOccpancy
 
int binYRate
 
int binYSync
 
MonitorElementmL1TOccupancyMonitor
 
std::string mL1TOccupancyPath
 
MonitorElementmL1TRateMonitor
 
std::string mL1TRatePath
 
MonitorElementmL1TSummary
 
MonitorElementmL1TSyncMonitor
 
std::string mL1TSyncPath
 
bool mMonitorL1TOccupancy
 
bool mMonitorL1TRate
 
bool mMonitorL1TSync
 
edm::ParameterSet mParameters
 
std::vector< int > mProcessedLS
 
bool mVerbose
 

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

Constructor & Destructor Documentation

◆ L1TTestsSummary()

L1TTestsSummary::L1TTestsSummary ( const edm::ParameterSet ps)

Definition at line 28 of file L1TTestsSummary.cc.

References gather_cfg::cout, and edm::ParameterSet::getUntrackedParameter().

28  {
29  if (mVerbose) {
30  cout << "[L1TTestsSummary:] Called constructor" << endl;
31  }
32 
33  // Get parameters
34  mParameters = ps;
35  mVerbose = ps.getUntrackedParameter<bool>("verbose", true);
36  mMonitorL1TRate = ps.getUntrackedParameter<bool>("MonitorL1TRate", true);
37  mMonitorL1TSync = ps.getUntrackedParameter<bool>("MonitorL1TSync", true);
38  mMonitorL1TOccupancy = ps.getUntrackedParameter<bool>("MonitorL1TOccupancy", true);
39 
40  mL1TRatePath = ps.getUntrackedParameter<string>("L1TRatePath", "L1T/L1TRate/Certification/");
41  mL1TSyncPath = ps.getUntrackedParameter<string>("L1TSyncPath", "L1T/L1TSync/Certification/");
42  mL1TOccupancyPath = ps.getUntrackedParameter<string>("L1TOccupancyPath", "L1T/L1TOccupancy/Certification/");
43 }
T getUntrackedParameter(std::string const &, T const &) const
std::string mL1TRatePath
std::string mL1TSyncPath
std::string mL1TOccupancyPath
edm::ParameterSet mParameters

◆ ~L1TTestsSummary()

L1TTestsSummary::~L1TTestsSummary ( )
override

Definition at line 49 of file L1TTestsSummary.cc.

References gather_cfg::cout.

49  {
50  if (mVerbose) {
51  cout << "[L1TTestsSummary:] Called destructor" << endl;
52  }
53 }

Member Function Documentation

◆ book()

void L1TTestsSummary::book ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
protectedvirtual

Definition at line 62 of file L1TTestsSummary.cc.

References dqm::implementation::IBooker::book2D(), gather_cfg::cout, dqm::implementation::IGetter::get(), dqm::implementation::IGetter::getMEs(), dqm::legacy::MonitorElement::getTH1(), mps_fire::i, Skims_PA_cff::name, dqm::impl::MonitorElement::setAxisTitle(), and dqm::implementation::NavigatorBase::setCurrentFolder().

62  {
63  if (mVerbose) {
64  cout << "[L1TTestsSummary:] Called beginRun" << endl;
65  }
66 
67  int maxLS = 2500;
68 
69  if (mMonitorL1TRate) {
70  if (mVerbose) {
71  cout << "[L1TTestsSummary:] Initializing L1TRate Module Monitoring" << endl;
72  }
73 
75  vector<string> histToMonitor = igetter.getMEs();
76  int histLines = histToMonitor.size() + 1;
77 
78  ibooker.setCurrentFolder("L1T/L1TTestsSummary/");
79  mL1TRateMonitor = ibooker.book2D(
80  "RateQualitySummary", "L1T Rates Monitor Summary", maxLS, +0.5, double(maxLS) + 0.5, histLines, 0, histLines);
81  mL1TRateMonitor->setAxisTitle("Lumi Section", 1);
82 
83  mL1TRateMonitor->setBinLabel(1, "Summary", 2);
84  for (unsigned int i = 0; i < histToMonitor.size(); i++) {
85  string name = igetter.get(mL1TRatePath + histToMonitor[i])->getTH1()->GetName();
87  }
88  }
89  if (mMonitorL1TSync) {
90  if (mVerbose) {
91  cout << "[L1TTestsSummary:] Initializing L1TSync Module Monitoring" << endl;
92  }
93 
95  vector<string> histToMonitor = igetter.getMEs();
96  int histLines = histToMonitor.size() + 1;
97 
98  ibooker.setCurrentFolder("L1T/L1TTestsSummary/");
99  mL1TSyncMonitor = ibooker.book2D("SyncQualitySummary",
100  "L1T Synchronization Monitor Summary",
101  maxLS,
102  0.5,
103  double(maxLS) + 0.5,
104  histLines,
105  0,
106  histLines);
107  mL1TSyncMonitor->setAxisTitle("Lumi Section", 1);
108 
109  mL1TSyncMonitor->setBinLabel(1, "Summary", 2);
110  for (unsigned int i = 0; i < histToMonitor.size(); i++) {
111  string name = igetter.get(mL1TSyncPath + histToMonitor[i])->getTH1()->GetName();
112  mL1TSyncMonitor->setBinLabel(i + 2, name, 2);
113  }
114  }
115  if (mMonitorL1TOccupancy) {
116  if (mVerbose) {
117  cout << "[L1TTestsSummary:] Initializing L1TOccupancy Module Monitoring" << endl;
118  }
119 
121  vector<string> histToMonitor = igetter.getMEs();
122  int histLines = histToMonitor.size() + 1;
123 
124  ibooker.setCurrentFolder("L1T/L1TTestsSummary/");
125  mL1TOccupancyMonitor = ibooker.book2D(
126  "OccupancySummary", "L1T Occupancy Monitor Summary", maxLS, +0.5, double(maxLS) + 0.5, histLines, 0, histLines);
127  mL1TOccupancyMonitor->setAxisTitle("Lumi Section", 1);
128 
129  mL1TOccupancyMonitor->setBinLabel(1, "Summary", 2);
130  for (unsigned int i = 0; i < histToMonitor.size(); i++) {
131  string name = igetter.get(mL1TOccupancyPath + histToMonitor[i])->getTH1()->GetName();
133  }
134  }
135 
136  //-> Making the summary of summaries
137  int testsToMonitor = 1;
138  if (mMonitorL1TRate) {
139  testsToMonitor++;
140  }
141  if (mMonitorL1TSync) {
142  testsToMonitor++;
143  }
144  if (mMonitorL1TOccupancy) {
145  testsToMonitor++;
146  }
147 
148  // Creating
149  ibooker.setCurrentFolder("L1T/L1TTestsSummary/");
150  mL1TSummary = ibooker.book2D(
151  "L1TQualitySummary", "L1 Tests Summary", maxLS, +0.5, double(maxLS) + 0.5, testsToMonitor, 0, testsToMonitor);
152  mL1TSummary->setAxisTitle("Lumi Section", 1);
153  mL1TSummary->setBinLabel(1, "L1T Summary", 2);
154 
155  int it = 2;
156  if (mMonitorL1TRate) {
157  mL1TSummary->setBinLabel(it, "Rates", 2);
158  binYRate = it;
159  it++;
160  }
161  if (mMonitorL1TSync) {
162  mL1TSummary->setBinLabel(it, "Synchronization", 2);
163  binYSync = it;
164  it++;
165  }
166  if (mMonitorL1TOccupancy) {
167  mL1TSummary->setBinLabel(it, "Occupancy", 2);
168  binYOccpancy = it;
169  }
170 }
MonitorElement * mL1TOccupancyMonitor
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
virtual std::vector< std::string > getMEs() const
Definition: DQMStore.cc:759
MonitorElement * mL1TSummary
MonitorElement * mL1TSyncMonitor
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * mL1TRateMonitor
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:712
std::string mL1TRatePath
std::string mL1TSyncPath
virtual TH1 * getTH1() const
std::string mL1TOccupancyPath
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 179 of file L1TTestsSummary.cc.

References gather_cfg::cout.

179  {
180  book(ibooker, igetter);
181 
182  if (mVerbose) {
183  cout << "[L1TTestsSummary:] Called endRun()" << endl;
184  }
185 
186  if (mMonitorL1TRate) {
187  updateL1TRateMonitor(ibooker, igetter);
188  }
189  if (mMonitorL1TSync) {
190  updateL1TSyncMonitor(ibooker, igetter);
191  }
192  if (mMonitorL1TOccupancy) {
193  updateL1TOccupancyMonitor(ibooker, igetter);
194  }
195  updateL1TSummary(ibooker, igetter);
196 }
void updateL1TRateMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void updateL1TSummary(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
virtual void book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void updateL1TOccupancyMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void updateL1TSyncMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)

◆ dqmEndLuminosityBlock()

void L1TTestsSummary::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 205 of file L1TTestsSummary.cc.

References gather_cfg::cout, edm::LuminosityBlockBase::id(), and edm::LuminosityBlockID::luminosityBlock().

208  {
209  int eventLS = lumiSeg.id().luminosityBlock();
210 
211  book(ibooker, igetter);
212 
213  mProcessedLS.push_back(eventLS);
214 
215  if (mVerbose) {
216  cout << "[L1TTestsSummary:] Called endLuminosityBlock()" << endl;
217  cout << "[L1TTestsSummary:] Lumisection: " << eventLS << endl;
218  }
219 
220  if (mMonitorL1TRate) {
221  updateL1TRateMonitor(ibooker, igetter);
222  }
223  if (mMonitorL1TSync) {
224  updateL1TSyncMonitor(ibooker, igetter);
225  }
226  if (mMonitorL1TOccupancy) {
227  updateL1TOccupancyMonitor(ibooker, igetter);
228  }
229  updateL1TSummary(ibooker, igetter);
230 }
void updateL1TRateMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
LuminosityBlockNumber_t luminosityBlock() const
void updateL1TSummary(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
virtual void book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void updateL1TOccupancyMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
std::vector< int > mProcessedLS
void updateL1TSyncMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
LuminosityBlockID id() const

◆ updateL1TOccupancyMonitor()

void L1TTestsSummary::updateL1TOccupancyMonitor ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 370 of file L1TTestsSummary.cc.

References a, b, gather_cfg::cout, RemoveAddSevLevel::flag, dqm::implementation::IGetter::get(), MonitorElementData::QReport::getBadChannels(), getBin(), dqm::implementation::IGetter::getMEs(), MonitorElementData::QReport::getMessage(), MonitorElementData::QReport::getQTresult(), MonitorElementData::QReport::getStatus(), mps_fire::i, hlt_dqm_clientPB-live_cfg::me, anotherprimaryvertexanalyzer_cfi::nBinX, anotherprimaryvertexanalyzer_cfi::nBinY, and dqm::implementation::NavigatorBase::setCurrentFolder().

370  {
372  vector<string> histToMonitor = igetter.getMEs();
373 
374  for (unsigned int i = 0; i < histToMonitor.size(); i++) {
375  MonitorElement *me = igetter.get(mL1TOccupancyPath + histToMonitor[i]);
376  if (mVerbose) {
377  cout << "[L1TTestsSummary:] Found ME: " << me->getTH1()->GetName() << endl;
378  }
379 
380  const QReport *myQReport = me->getQReport("L1TOccupancyTest"); //get QReport associated to your ME
381  if (myQReport) {
382  float qtresult = myQReport->getQTresult(); // get QT result value
383  int qtstatus = myQReport->getStatus(); // get QT status value (see table below)
384  const string &qtmessage = myQReport->getMessage(); // get the whole QT result message
385  vector<DQMChannel> qtBadChannels = myQReport->getBadChannels();
386 
387  if (mVerbose) {
388  cout << "[L1TTestsSummary:] Found QReport for ME: " << me->getTH1()->GetName() << endl;
389  cout << "[L1TTestsSummary:] Result=" << qtresult << " status=" << qtstatus << " message=" << qtmessage << endl;
390  cout << "[L1TTestsSummary:] Bad Channels size=" << qtBadChannels.size() << endl;
391  }
392 
393  for (unsigned int i = 0; i < mProcessedLS.size(); i++) {
394  int binx = mL1TOccupancyMonitor->getTH2F()->GetXaxis()->FindBin(mProcessedLS[i]);
395  int biny = mL1TOccupancyMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
396  mL1TOccupancyMonitor->setBinContent(binx, biny, 100);
397  }
398 
399  for (unsigned int a = 0; a < qtBadChannels.size(); a++) {
400  for (unsigned int b = 0; b < mProcessedLS.size(); b++) {
401  // Converting bin to value
402  double valueBinBad = me->getTH1()->GetBinCenter(qtBadChannels[a].getBin());
403 
404  if (valueBinBad == mProcessedLS[b]) {
405  int binx = mL1TOccupancyMonitor->getTH2F()->GetXaxis()->FindBin(valueBinBad);
406  int biny = mL1TOccupancyMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
407  mL1TOccupancyMonitor->setBinContent(binx, biny, 300);
408  }
409  }
410  }
411  }
412  }
413 
414  //-> Filling the summaries
415  int nBinX = mL1TOccupancyMonitor->getTH2F()->GetXaxis()->GetNbins();
416  int nBinY = mL1TOccupancyMonitor->getTH2F()->GetYaxis()->GetNbins();
417  for (int binx = 1; binx <= nBinX; binx++) {
418  int GlobalStatus = 0;
419  for (int biny = 2; biny <= nBinY; biny++) {
420  double flag = mL1TOccupancyMonitor->getBinContent(binx, biny);
421  if (GlobalStatus < flag) {
422  GlobalStatus = flag;
423  }
424  }
425 
426  // NOTE: Assumes mL1TSummary has same size then mL1TOccupancyMonitor
427  mL1TOccupancyMonitor->setBinContent(binx, 1, GlobalStatus);
428  mL1TSummary->setBinContent(binx, binYOccpancy, GlobalStatus);
429  }
430 }
MonitorElement * mL1TOccupancyMonitor
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
float getQTresult() const
get test result i.e. prob value
virtual std::vector< std::string > getMEs() const
Definition: DQMStore.cc:759
const std::vector< DQMChannel > & getBadChannels() const
std::vector< int > mProcessedLS
MonitorElement * mL1TSummary
virtual TH2F * getTH2F() const
int getBin(double x, std::vector< double > boundaries)
Definition: Utilities.h:456
const std::string & getMessage() const
get message attached to test
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
double b
Definition: hdecay.h:120
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
std::string mL1TOccupancyPath
double a
Definition: hdecay.h:121
int getStatus() const
get test status
virtual double getBinContent(int binx) const
get content of bin (1-D)

◆ updateL1TRateMonitor()

void L1TTestsSummary::updateL1TRateMonitor ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 236 of file L1TTestsSummary.cc.

References a, b, gather_cfg::cout, RemoveAddSevLevel::flag, dqm::implementation::IGetter::get(), MonitorElementData::QReport::getBadChannels(), getBin(), dqm::implementation::IGetter::getMEs(), MonitorElementData::QReport::getMessage(), MonitorElementData::QReport::getQTresult(), MonitorElementData::QReport::getStatus(), mps_fire::i, hlt_dqm_clientPB-live_cfg::me, anotherprimaryvertexanalyzer_cfi::nBinX, anotherprimaryvertexanalyzer_cfi::nBinY, and dqm::implementation::NavigatorBase::setCurrentFolder().

236  {
238  vector<string> histToMonitor = igetter.getMEs();
239 
240  for (unsigned int i = 0; i < histToMonitor.size(); i++) {
241  MonitorElement *me = igetter.get(mL1TRatePath + histToMonitor[i]);
242  if (mVerbose) {
243  cout << "[L1TTestsSummary:] Found ME: " << me->getTH1()->GetName() << endl;
244  }
245 
246  const QReport *myQReport = me->getQReport("L1TRateTest"); //get QReport associated to your ME
247  if (myQReport) {
248  float qtresult = myQReport->getQTresult(); // get QT result value
249  int qtstatus = myQReport->getStatus(); // get QT status value (see table below)
250  const string &qtmessage = myQReport->getMessage(); // get the whole QT result message
251  vector<DQMChannel> qtBadChannels = myQReport->getBadChannels();
252 
253  if (mVerbose) {
254  cout << "[L1TTestsSummary:] Found QReport for ME: " << me->getTH1()->GetName() << endl;
255  cout << "[L1TTestsSummary:] Result=" << qtresult << " status=" << qtstatus << " message=" << qtmessage << endl;
256  cout << "[L1TTestsSummary:] Bad Channels size=" << qtBadChannels.size() << endl;
257  }
258 
259  for (unsigned int i = 0; i < mProcessedLS.size() - 1; i++) {
260  int binx = mL1TRateMonitor->getTH2F()->GetXaxis()->FindBin(mProcessedLS[i]);
261  int biny = mL1TRateMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
262  mL1TRateMonitor->setBinContent(binx, biny, 100);
263  }
264 
265  for (unsigned int a = 0; a < qtBadChannels.size(); a++) {
266  for (unsigned int b = 0; b < mProcessedLS.size() - 1; b++) {
267  // Converting bin to value
268  double valueBinBad = me->getTH1()->GetBinCenter(qtBadChannels[a].getBin());
269 
270  if (valueBinBad == (mProcessedLS[b])) {
271  int binx = mL1TRateMonitor->getTH2F()->GetXaxis()->FindBin(valueBinBad);
272  int biny = mL1TRateMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
273  mL1TRateMonitor->setBinContent(binx, biny, 300);
274  }
275  }
276  }
277  }
278  }
279 
280  //-> Filling the summaries
281  int nBinX = mL1TRateMonitor->getTH2F()->GetXaxis()->GetNbins();
282  int nBinY = mL1TRateMonitor->getTH2F()->GetYaxis()->GetNbins();
283  for (int binx = 1; binx <= nBinX; binx++) {
284  int GlobalStatus = 0;
285  for (int biny = 2; biny <= nBinY; biny++) {
286  double flag = mL1TRateMonitor->getBinContent(binx, biny);
287  if (GlobalStatus < flag) {
288  GlobalStatus = flag;
289  }
290  }
291 
292  // NOTE: Assumes mL1TSummary has same size then mL1TRateMonitor
293  mL1TRateMonitor->setBinContent(binx, 1, GlobalStatus);
294  mL1TSummary->setBinContent(binx, binYRate, GlobalStatus);
295  }
296 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
float getQTresult() const
get test result i.e. prob value
virtual std::vector< std::string > getMEs() const
Definition: DQMStore.cc:759
const std::vector< DQMChannel > & getBadChannels() const
std::vector< int > mProcessedLS
MonitorElement * mL1TSummary
virtual TH2F * getTH2F() const
int getBin(double x, std::vector< double > boundaries)
Definition: Utilities.h:456
const std::string & getMessage() const
get message attached to test
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * mL1TRateMonitor
double b
Definition: hdecay.h:120
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
std::string mL1TRatePath
double a
Definition: hdecay.h:121
int getStatus() const
get test status
virtual double getBinContent(int binx) const
get content of bin (1-D)

◆ updateL1TSummary()

void L1TTestsSummary::updateL1TSummary ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 436 of file L1TTestsSummary.cc.

References anotherprimaryvertexanalyzer_cfi::nBinX.

436  {
437  int nBinX = mL1TSummary->getTH2F()->GetXaxis()->GetNbins();
438  for (int binx = 1; binx <= nBinX; binx++) {
439  int GlobalStatus = 0;
440  if (mMonitorL1TRate) {
441  if (mL1TSummary->getBinContent(binx, binYRate) > GlobalStatus) {
442  GlobalStatus = mL1TSummary->getBinContent(binx, binYRate);
443  }
444  }
445  if (mMonitorL1TSync) {
446  if (mL1TSummary->getBinContent(binx, binYSync) > GlobalStatus) {
447  GlobalStatus = mL1TSummary->getBinContent(binx, binYSync);
448  }
449  }
450  if (mMonitorL1TOccupancy) {
451  if (mL1TSummary->getBinContent(binx, binYOccpancy) > GlobalStatus) {
452  GlobalStatus = mL1TSummary->getBinContent(binx, binYOccpancy);
453  }
454  }
455  mL1TSummary->setBinContent(binx, 1, GlobalStatus);
456  }
457 }
MonitorElement * mL1TSummary
virtual TH2F * getTH2F() const
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
virtual double getBinContent(int binx) const
get content of bin (1-D)

◆ updateL1TSyncMonitor()

void L1TTestsSummary::updateL1TSyncMonitor ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 304 of file L1TTestsSummary.cc.

References a, b, gather_cfg::cout, RemoveAddSevLevel::flag, dqm::implementation::IGetter::get(), MonitorElementData::QReport::getBadChannels(), getBin(), dqm::implementation::IGetter::getMEs(), MonitorElementData::QReport::getMessage(), MonitorElementData::QReport::getQTresult(), MonitorElementData::QReport::getStatus(), mps_fire::i, hlt_dqm_clientPB-live_cfg::me, anotherprimaryvertexanalyzer_cfi::nBinX, anotherprimaryvertexanalyzer_cfi::nBinY, and dqm::implementation::NavigatorBase::setCurrentFolder().

304  {
306  vector<string> histToMonitor = igetter.getMEs();
307 
308  for (unsigned int i = 0; i < histToMonitor.size(); i++) {
309  MonitorElement *me = igetter.get(mL1TSyncPath + histToMonitor[i]);
310  if (mVerbose) {
311  cout << "[L1TTestsSummary:] Found ME: " << me->getTH1()->GetName() << endl;
312  }
313 
314  const QReport *myQReport = me->getQReport("L1TSyncTest"); //get QReport associated to your ME
315  if (myQReport) {
316  float qtresult = myQReport->getQTresult(); // get QT result value
317  int qtstatus = myQReport->getStatus(); // get QT status value (see table below)
318  const string &qtmessage = myQReport->getMessage(); // get the whole QT result message
319  vector<DQMChannel> qtBadChannels = myQReport->getBadChannels();
320 
321  if (mVerbose) {
322  cout << "[L1TTestsSummary:] Found QReport for ME: " << me->getTH1()->GetName() << endl;
323  cout << "[L1TTestsSummary:] Result=" << qtresult << " status=" << qtstatus << " message=" << qtmessage << endl;
324  cout << "[L1TTestsSummary:] Bad Channels size=" << qtBadChannels.size() << endl;
325  }
326 
327  for (unsigned int i = 0; i < mProcessedLS.size(); i++) {
328  int binx = mL1TSyncMonitor->getTH2F()->GetXaxis()->FindBin(mProcessedLS[i]);
329  int biny = mL1TSyncMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
330  mL1TSyncMonitor->setBinContent(binx, biny, 100);
331  }
332 
333  for (unsigned int a = 0; a < qtBadChannels.size(); a++) {
334  for (unsigned int b = 0; b < mProcessedLS.size(); b++) {
335  // Converting bin to value
336  double valueBinBad = me->getTH1()->GetBinCenter(qtBadChannels[a].getBin());
337 
338  if (valueBinBad == mProcessedLS[b]) {
339  int binx = mL1TSyncMonitor->getTH2F()->GetXaxis()->FindBin(valueBinBad);
340  int biny = mL1TSyncMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
341  mL1TSyncMonitor->setBinContent(binx, biny, 300);
342  }
343  }
344  }
345  }
346  }
347 
348  //-> Filling the summaries
349  int nBinX = mL1TSyncMonitor->getTH2F()->GetXaxis()->GetNbins();
350  int nBinY = mL1TSyncMonitor->getTH2F()->GetYaxis()->GetNbins();
351  for (int binx = 1; binx <= nBinX; binx++) {
352  int GlobalStatus = 0;
353  for (int biny = 2; biny <= nBinY; biny++) {
354  double flag = mL1TSyncMonitor->getBinContent(binx, biny);
355  if (GlobalStatus < flag) {
356  GlobalStatus = flag;
357  }
358  }
359 
360  // NOTE: Assumes mL1TSummary has same size then mL1TSyncMonitor
361  mL1TSyncMonitor->setBinContent(binx, 1, GlobalStatus);
362  mL1TSummary->setBinContent(binx, binYSync, GlobalStatus);
363  }
364 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
float getQTresult() const
get test result i.e. prob value
virtual std::vector< std::string > getMEs() const
Definition: DQMStore.cc:759
const std::vector< DQMChannel > & getBadChannels() const
std::vector< int > mProcessedLS
MonitorElement * mL1TSummary
virtual TH2F * getTH2F() const
MonitorElement * mL1TSyncMonitor
int getBin(double x, std::vector< double > boundaries)
Definition: Utilities.h:456
const std::string & getMessage() const
get message attached to test
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
double b
Definition: hdecay.h:120
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
std::string mL1TSyncPath
double a
Definition: hdecay.h:121
int getStatus() const
get test status
virtual double getBinContent(int binx) const
get content of bin (1-D)

Member Data Documentation

◆ binYOccpancy

int L1TTestsSummary::binYOccpancy
private

Definition at line 52 of file L1TTestsSummary.h.

◆ binYRate

int L1TTestsSummary::binYRate
private

Definition at line 52 of file L1TTestsSummary.h.

◆ binYSync

int L1TTestsSummary::binYSync
private

Definition at line 52 of file L1TTestsSummary.h.

◆ mL1TOccupancyMonitor

MonitorElement* L1TTestsSummary::mL1TOccupancyMonitor
private

Definition at line 65 of file L1TTestsSummary.h.

◆ mL1TOccupancyPath

std::string L1TTestsSummary::mL1TOccupancyPath
private

Definition at line 57 of file L1TTestsSummary.h.

◆ mL1TRateMonitor

MonitorElement* L1TTestsSummary::mL1TRateMonitor
private

Definition at line 63 of file L1TTestsSummary.h.

◆ mL1TRatePath

std::string L1TTestsSummary::mL1TRatePath
private

Definition at line 55 of file L1TTestsSummary.h.

◆ mL1TSummary

MonitorElement* L1TTestsSummary::mL1TSummary
private

Definition at line 66 of file L1TTestsSummary.h.

◆ mL1TSyncMonitor

MonitorElement* L1TTestsSummary::mL1TSyncMonitor
private

Definition at line 64 of file L1TTestsSummary.h.

◆ mL1TSyncPath

std::string L1TTestsSummary::mL1TSyncPath
private

Definition at line 56 of file L1TTestsSummary.h.

◆ mMonitorL1TOccupancy

bool L1TTestsSummary::mMonitorL1TOccupancy
private

Definition at line 49 of file L1TTestsSummary.h.

◆ mMonitorL1TRate

bool L1TTestsSummary::mMonitorL1TRate
private

Definition at line 47 of file L1TTestsSummary.h.

◆ mMonitorL1TSync

bool L1TTestsSummary::mMonitorL1TSync
private

Definition at line 48 of file L1TTestsSummary.h.

◆ mParameters

edm::ParameterSet L1TTestsSummary::mParameters
private

Definition at line 43 of file L1TTestsSummary.h.

◆ mProcessedLS

std::vector<int> L1TTestsSummary::mProcessedLS
private

Definition at line 60 of file L1TTestsSummary.h.

◆ mVerbose

bool L1TTestsSummary::mVerbose
private

Definition at line 46 of file L1TTestsSummary.h.