CMS 3D CMS Logo

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

#include <L1ScalersClient.h>

Inheritance diagram for L1ScalersClient:
edm::one::EDAnalyzer< edm::one::SharedResources, edm::one::WatchRuns, edm::one::WatchLuminosityBlocks > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void beginJob (void) override
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
void beginRun (const edm::Run &run, const edm::EventSetup &c) override
 BeginRun. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
void endRun (const edm::Run &run, const edm::EventSetup &c) override
 EndRun. More...
 
 L1ScalersClient (const edm::ParameterSet &ps)
 Constructors. More...
 
 ~L1ScalersClient () override
 Destructor. More...
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources, edm::one::WatchRuns, edm::one::WatchLuminosityBlocks >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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

std::vector< int > algoSelected_
 
MonitorElementbxSelected_
 
int currentLumiBlockNumber_
 
int currentRun_
 
DQMStoredbe_
 
bool first_algo
 
bool first_tt
 
std::string folderName_
 
MonitorElementl1AlgoCurrentRate_
 
MonitorElementl1AlgoCurrentRatePerAlgo_ [140]
 
MonitorElementl1AlgoRateHistories_ [140]
 
unsigned long int l1AlgoScalerCounters_ [140]
 
MonitorElementl1TechTrigCurrentRate_
 
MonitorElementl1TechTrigCurrentRatePerAlgo_ [80]
 
MonitorElementl1TechTrigRateHistories_ [80]
 
unsigned long int l1TechTrigScalerCounters_ [80]
 
int nev_
 
int nLumi_
 
int numSelected_
 
MonitorElementselected_
 
std::vector< int > techSelected_
 
MonitorElementtotalAlgoRate_
 
float totAlgoPrevCount
 
MonitorElementtotalTtRate_
 
float totTtPrevCount
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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)
 

Detailed Description

Definition at line 22 of file L1ScalersClient.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 26 of file L1ScalersClient.h.

◆ MonitorElement

Definition at line 25 of file L1ScalersClient.h.

Constructor & Destructor Documentation

◆ L1ScalersClient()

L1ScalersClient::L1ScalersClient ( const edm::ParameterSet ps)

Constructors.

Definition at line 22 of file L1ScalersClient.cc.

References algoSelected_, cms::cuda::assert(), dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), bxSelected_, dbe_, folderName_, mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, kNumAlgoHistos, kNumTTHistos, kPerHisto, l1AlgoCurrentRate_, l1AlgoCurrentRatePerAlgo_, l1AlgoRateHistories_, l1AlgoScalerCounters_, l1TechTrigCurrentRate_, l1TechTrigCurrentRatePerAlgo_, l1TechTrigRateHistories_, l1TechTrigScalerCounters_, LogDebug, MAX_ALGOS, MAX_LUMI_SEG, MAX_TT, Skims_PA_cff::name, numSelected_, Utilities::operator, submitPVValidationJobs::params, selected_, dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, techSelected_, runGCPTkAlMap::title, totalAlgoRate_, totAlgoPrevCount, totalTtRate_, and totTtPrevCount.

23  : dbe_(nullptr),
24  nLumi_(0),
25  l1AlgoCurrentRate_(nullptr),
26  l1TechTrigCurrentRate_(nullptr),
27  selected_(nullptr),
28  bxSelected_(nullptr),
29  algoSelected_(ps.getUntrackedParameter<std::vector<int>>("algoMonitorBits", std::vector<int>())),
30  techSelected_(ps.getUntrackedParameter<std::vector<int>>("techMonitorBits", std::vector<int>())),
31  folderName_(ps.getUntrackedParameter<std::string>("dqmFolder", "L1T/L1Scalers_EvF")),
33  first_algo(true),
34  first_tt(true) {
35  LogDebug("Status") << "constructor";
36  // get back-end interface
37  usesResource("DQMStore");
39  assert(dbe_ != nullptr); // blammo!
41 
43  dbe_->book1D("algo_cur_rate", "current lumi section rate per Algo Bits", MAX_ALGOS, -0.5, MAX_ALGOS - 0.5);
44 
46  dbe_->book1D("tt_cur_rate", "current lumi section rate per Tech. Trig.s", MAX_TT, -0.5, MAX_TT - 0.5);
47  // ----------------------
48  numSelected_ = algoSelected_.size() + techSelected_.size();
49  selected_ = dbe_->book1D("l1BitsSel",
50  "Selected L1 Algorithm"
51  " and tech Bits",
53  -0.5,
54  numSelected_ - 0.5);
56  "l1BitsBxSel", "Selected L1 Algorithm Bits vs Bx", 3600, -0.5, 3599.5, numSelected_, -0.5, numSelected_ - 0.5);
57  int j = 1;
58  for (unsigned int i = 0; i < algoSelected_.size(); ++i) {
59  char title[256];
60  snprintf(title, 256, "Algo %d", algoSelected_[i]);
63  ++j;
64  }
65  for (unsigned int i = 0; i < techSelected_.size(); ++i) {
66  char title[256];
67  snprintf(title, 256, "Tech %d", techSelected_[i]);
70  ++j;
71  }
72 
73  // book individual bit rates vs lumi for algo bits.
74  totalAlgoRate_ = dbe_->book1D("totAlgoRate", "Total Algo Rate", MAX_LUMI_SEG, -0.5, MAX_LUMI_SEG - 0.5);
75  totalTtRate_ = dbe_->book1D("totTtRate", "Total Tech Rate", MAX_LUMI_SEG, -0.5, MAX_LUMI_SEG - 0.5);
76 
77  totAlgoPrevCount = 0UL;
78  totTtPrevCount = 0UL;
79 
80  std::string algodir = "/AlgoRates";
81  dbe_->setCurrentFolder(folderName_ + algodir);
82 
83  for (int i = 0; i < MAX_ALGOS; ++i) {
84  l1AlgoScalerCounters_[i] = 0UL;
85  l1AlgoRateHistories_[i] = nullptr; // not really needed but ...
86  char name[256];
87  snprintf(name, 256, "rate_algobit%03d", i);
88  LogDebug("Parameter") << "name " << i << " is " << name;
90  }
91 
92  // book individual bit rates vs lumi for technical trigger bits.
93 
94  std::string techdir = "/TechRates";
95  dbe_->setCurrentFolder(folderName_ + techdir);
96 
97  for (int i = 0; i < MAX_TT; ++i) {
99  l1TechTrigRateHistories_[i] = nullptr; // not really needed but ...
100  char name[256];
101  snprintf(name, 256, "rate_ttbit%03d", i);
102  LogDebug("Parameter") << "name " << i << " is " << name;
104  }
105 
106  // split l1 scalers up into groups of 20, assuming total of 140 bits
107  std::string algodir2 = "/AlgoBits";
108  dbe_->setCurrentFolder(folderName_ + algodir2);
109 
110  char metitle1[64]; // histo name
111  char mename1[64]; // ME name
112  for (int k = 0; k < kNumAlgoHistos; k++) {
113  int npath_low = kPerHisto * k;
114  int npath_high = kPerHisto * (k + 1) - 1;
115  snprintf(mename1, 64, "L1AlgoBits_%0d", k);
116  snprintf(metitle1, 64, "L1 rates - Algo Bits %d to %d", npath_low, npath_high);
117  l1AlgoCurrentRatePerAlgo_[k] = dbe_->book1D(mename1, metitle1, kPerHisto, -0.5 + npath_low, npath_high + 0.5);
118  }
119 
120  // split l1 scalers up into groups of 20, assuming total of 80 technical bits
121 
122  std::string techdir2 = "/TechBits";
123  dbe_->setCurrentFolder(folderName_ + techdir2);
124 
125  char metitle2[64]; // histo name
126  char mename2[64]; // ME name
127  for (int k = 0; k < kNumTTHistos; k++) {
128  int npath_low = kPerHisto * k;
129  int npath_high = kPerHisto * (k + 1) - 1;
130  snprintf(mename2, 64, "L1TechBits_%0d", k);
131  snprintf(metitle2, 64, "L1 rates - Tech. Trig. Bits %d to %d", npath_low, npath_high);
132  l1TechTrigCurrentRatePerAlgo_[k] = dbe_->book1D(mename2, metitle2, kPerHisto, -0.5 + npath_low, npath_high + 0.5);
133  }
134 
135  std::ostringstream params;
136  params << "Algo: ";
137  for (unsigned int i = 0; i < algoSelected_.size(); ++i) {
138  params << algoSelected_[i] << " ";
139  }
140  params << ", Tech: ";
141  for (unsigned int i = 0; i < techSelected_.size(); ++i) {
142  params << techSelected_[i] << " ";
143  }
144  LogDebug("Parameter") << "L1 bits to monitor are " << params.str();
145 }
unsigned long int l1AlgoScalerCounters_[140]
const int kPerHisto
std::vector< int > algoSelected_
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:646
MonitorElement * l1TechTrigCurrentRatePerAlgo_[80]
const int kNumAlgoHistos
assert(be >=bs)
const int kNumTTHistos
T getUntrackedParameter(std::string const &, T const &) const
#define MAX_LUMI_SEG
Definition: L1Scalers.h:13
std::string folderName_
MonitorElement * l1AlgoCurrentRatePerAlgo_[140]
MonitorElement * l1AlgoCurrentRate_
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)
unsigned long int l1TechTrigScalerCounters_[80]
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
std::vector< int > techSelected_
MonitorElement * totalTtRate_
#define MAX_ALGOS
MonitorElement * totalAlgoRate_
MonitorElement * l1TechTrigRateHistories_[80]
MonitorElement * bxSelected_
MonitorElement * l1AlgoRateHistories_[140]
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
#define MAX_TT
MonitorElement * selected_
MonitorElement * l1TechTrigCurrentRate_
#define LogDebug(id)

◆ ~L1ScalersClient()

L1ScalersClient::~L1ScalersClient ( )
inlineoverride

Destructor.

Definition at line 32 of file L1ScalersClient.h.

32 {};

Member Function Documentation

◆ analyze()

void L1ScalersClient::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 309 of file L1ScalersClient.cc.

309 {}

◆ beginJob()

void L1ScalersClient::beginJob ( void  )
overridevirtual

BeginJob.

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 148 of file L1ScalersClient.cc.

References dbe_, folderName_, LogDebug, and dqm::implementation::DQMStore::setCurrentFolder().

148  {
149  LogDebug("Status") << "beingJob";
150  if (dbe_) {
152  }
153 }
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:646
std::string folderName_
#define LogDebug(id)

◆ beginLuminosityBlock()

void L1ScalersClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
inlineoverride

End LumiBlock DQM Client Diagnostic should be performed here

Definition at line 48 of file L1ScalersClient.h.

48 {}

◆ beginRun()

void L1ScalersClient::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
override

BeginRun.

Definition at line 156 of file L1ScalersClient.cc.

156 {}

◆ endLuminosityBlock()

void L1ScalersClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
override

End LumiBlock DQM Client Diagnostic should be performed here

Definition at line 163 of file L1ScalersClient.cc.

References algoSelected_, triggerObjects_cff::bit, bxSelected_, currentLumiBlockNumber_, dbe_, spr::find(), first_algo, first_tt, folderName_, dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getIntValue(), dqm::impl::MonitorElement::getNbinsX(), mps_fire::i, edm::LuminosityBlockBase::id(), dqmiolumiharvest::j, kPerHisto, l1AlgoCurrentRate_, l1AlgoCurrentRatePerAlgo_, l1AlgoRateHistories_, l1AlgoScalerCounters_, l1TechTrigCurrentRate_, l1TechTrigCurrentRatePerAlgo_, l1TechTrigRateHistories_, l1TechTrigScalerCounters_, LogDebug, edm::LuminosityBlockID::luminosityBlock(), MAX_ALGOS, MAX_LUMI_SEG, MAX_TT, nLumi_, unpackData-CaloStage2::pname, RPCpg::rate(), SECS_PER_LUMI_SECTION, selected_, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinLabel(), dqm::impl::MonitorElement::setTitle(), AlCaHLTBitMon_QueryRunRegistry::string, techSelected_, totalAlgoRate_, totAlgoPrevCount, totalTtRate_, and totTtPrevCount.

163  {
164  nLumi_ = lumiSeg.id().luminosityBlock();
165 
166  // get EvF data
167 
168  MonitorElement *algoScalers = dbe_->get(folderName_ + std::string("/l1AlgoBits"));
169  MonitorElement *ttScalers = dbe_->get(folderName_ + std::string("/l1TechBits"));
170 
171  if (algoScalers == nullptr || ttScalers == nullptr) {
172  LogInfo("Status") << "cannot get l1 scalers histogram, bailing out.";
173  return;
174  }
175 
176  int nalgobits = algoScalers->getNbinsX();
177  int nttbits = ttScalers->getNbinsX();
178 
179  if (nalgobits > MAX_ALGOS)
180  nalgobits = MAX_ALGOS; // HARD CODE FOR NOW
181  if (nttbits > MAX_TT)
182  nttbits = MAX_TT; // HARD CODE FOR NOW
183 
184  LogDebug("Status") << "I see " << nalgobits << " algo paths. ";
185  LogDebug("Status") << "I see " << nttbits << " tt paths. ";
186 
187  // set the bin labels on the first go-through
188  if (first_algo) {
189  for (int i = 0; i < nalgobits; ++i) {
190  int whichHisto = i / kPerHisto;
191  int whichBin = i % kPerHisto + 1;
192  char pname[256];
193  snprintf(pname, 256, "AlgoBit%03d", i);
194  l1AlgoCurrentRatePerAlgo_[whichHisto]->setBinLabel(whichBin, pname);
195  snprintf(pname, 256, "Rate - Algorithm Bit %03d", i);
197  }
198  first_algo = false;
199  }
200 
201  // set the bin labels on the first go-through
202  if (first_tt) {
203  for (int i = 0; i < nttbits; ++i) {
204  int whichHisto = i / kPerHisto;
205  int whichBin = i % kPerHisto + 1;
206  char pname[256];
207  snprintf(pname, 256, "TechBit%03d", i);
208  l1TechTrigCurrentRatePerAlgo_[whichHisto]->setBinLabel(whichBin, pname);
209  snprintf(pname, 256, "Rate - Technical Bit %03d", i);
211  }
212  first_tt = false;
213  }
214 
215  MonitorElement *nLumi = dbe_->get(folderName_ + std::string("nLumiBlock"));
216 
217  int testval = (nLumi != nullptr ? nLumi->getIntValue() : -1);
218  LogDebug("Parameter") << "Lumi Block from DQM: " << testval << ", local is " << nLumi_;
219 
220  int nL = (nLumi != nullptr ? nLumi->getIntValue() : nLumi_);
221  if (nL > MAX_LUMI_SEG) {
222  LogDebug("Status") << "Too many Lumi segments, " << nL << " is greater than MAX_LUMI_SEG,"
223  << " wrapping to " << (nL % MAX_LUMI_SEG);
224  nL = nL % MAX_LUMI_SEG;
225  }
226  float delta_t = (nL - currentLumiBlockNumber_) * SECS_PER_LUMI_SECTION;
227  if (delta_t < 0) {
228  LogDebug("Status") << " time is negative ... " << delta_t;
229  delta_t = -delta_t;
230  } else if (nL == currentLumiBlockNumber_) { // divide-by-zero
231  LogInfo("Status") << "divide by zero: same lumi section 2x " << nL;
232  return;
233  }
234  // selected --------------------- fill in the rates for th
235  int currSlot = 1; // for selected bits histogram
236  MonitorElement *algoBx = dbe_->get(folderName_ + std::string("/l1AlgoBits_Vs_Bx"));
237  // selected --------------------- end
238  for (int i = 1; i <= nalgobits; ++i) { // bins start at 1
239  float current_count = algoScalers->getBinContent(i);
240  // selected -------------------- start
241  int bit = i - 1; //
242  if (std::find(algoSelected_.begin(), algoSelected_.end(), bit) != algoSelected_.end()) {
243  selected_->setBinContent(currSlot, current_count);
244  if (algoBx) {
245  for (int j = 1; j <= 3600; ++j) {
246  bxSelected_->setBinContent(j, currSlot, algoBx->getBinContent(j, i));
247  }
248  }
249  ++currSlot;
250  }
251  // selected -------------------- end
252  float rate = (current_count - l1AlgoScalerCounters_[i - 1]) / delta_t;
253  if (rate > 1E-3) {
254  LogDebug("Parameter") << "rate path " << i << " is " << rate;
255  }
258  // currentRate_->setBinError(i, error);
259  l1AlgoScalerCounters_[i - 1] = (unsigned long)(current_count);
261  }
262  // selected ----------------- start
263  MonitorElement *techBx = dbe_->get(folderName_ + std::string("/l1TechBits_Vs_Bx"));
264  // selected ----------------- end
265 
266  for (int i = 1; i <= nttbits; ++i) { // bins start at 1
267  float current_count = ttScalers->getBinContent(i);
268  // selected -------------------- start
269  int bit = i - 1; //
270  if (std::find(techSelected_.begin(), techSelected_.end(), bit) != techSelected_.end()) {
271  selected_->setBinContent(currSlot, current_count);
272  if (techBx) {
273  for (int j = 1; j <= 3600; ++j) {
274  bxSelected_->setBinContent(j, currSlot, techBx->getBinContent(j, i));
275  }
276  }
277  ++currSlot;
278  }
279  // selected -------------------- end
280  float rate = (current_count - l1TechTrigScalerCounters_[i - 1]) / delta_t;
281  if (rate > 1E-3) {
282  LogDebug("Parameter") << "rate path " << i << " is " << rate;
283  }
286  // currentRate_->setBinError(i, error);
287  l1TechTrigScalerCounters_[i - 1] = (unsigned long)(current_count);
289  }
290 
291  // compute total rate
292  MonitorElement *l1AlgoCounter = dbe_->get(folderName_ + std::string("/l1AlgoCounter"));
293  MonitorElement *l1TtCounter = dbe_->get(folderName_ + std::string("/l1TtCounter"));
294  if (l1AlgoCounter != nullptr && l1TtCounter != nullptr) {
295  float totAlgoCount = l1AlgoCounter->getIntValue();
296  float totTtCount = l1TtCounter->getIntValue();
297  float totAlgRate = (totAlgoCount - totAlgoPrevCount) / delta_t;
298  float totTtRate = (totTtCount - totTtPrevCount) / delta_t;
299  totalAlgoRate_->setBinContent(nL, totAlgRate);
300  totAlgoPrevCount = totAlgoCount;
301  totalTtRate_->setBinContent(nL, totTtRate);
302  totTtPrevCount = totTtCount;
303  }
304 
306 }
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
LuminosityBlockNumber_t luminosityBlock() const
unsigned long int l1AlgoScalerCounters_[140]
const int kPerHisto
std::vector< int > algoSelected_
MonitorElement * l1TechTrigCurrentRatePerAlgo_[80]
#define SECS_PER_LUMI_SECTION
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
#define MAX_LUMI_SEG
Definition: L1Scalers.h:13
std::string folderName_
MonitorElement * l1AlgoCurrentRatePerAlgo_[140]
MonitorElement * l1AlgoCurrentRate_
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)
unsigned long int l1TechTrigScalerCounters_[80]
Log< level::Info, false > LogInfo
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
LuminosityBlockID id() const
std::vector< int > techSelected_
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:697
double rate(double x)
Definition: Constants.cc:3
MonitorElement * totalTtRate_
#define MAX_ALGOS
virtual int getNbinsX() const
get # of bins in X-axis
MonitorElement * totalAlgoRate_
MonitorElement * l1TechTrigRateHistories_[80]
MonitorElement * bxSelected_
MonitorElement * l1AlgoRateHistories_[140]
#define MAX_TT
MonitorElement * selected_
MonitorElement * l1TechTrigCurrentRate_
#define LogDebug(id)
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual int64_t getIntValue() const

◆ endRun()

void L1ScalersClient::endRun ( const edm::Run run,
const edm::EventSetup c 
)
override

EndRun.

Definition at line 159 of file L1ScalersClient.cc.

159 {}

Member Data Documentation

◆ algoSelected_

std::vector<int> L1ScalersClient::algoSelected_
private

Definition at line 79 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ bxSelected_

MonitorElement* L1ScalersClient::bxSelected_
private

Definition at line 78 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ currentLumiBlockNumber_

int L1ScalersClient::currentLumiBlockNumber_
private

Definition at line 84 of file L1ScalersClient.h.

Referenced by endLuminosityBlock().

◆ currentRun_

int L1ScalersClient::currentRun_
private

Definition at line 59 of file L1ScalersClient.h.

◆ dbe_

DQMStore* L1ScalersClient::dbe_
private

Definition at line 55 of file L1ScalersClient.h.

Referenced by beginJob(), endLuminosityBlock(), and L1ScalersClient().

◆ first_algo

bool L1ScalersClient::first_algo
private

Definition at line 85 of file L1ScalersClient.h.

Referenced by endLuminosityBlock().

◆ first_tt

bool L1ScalersClient::first_tt
private

Definition at line 86 of file L1ScalersClient.h.

Referenced by endLuminosityBlock().

◆ folderName_

std::string L1ScalersClient::folderName_
private

Definition at line 81 of file L1ScalersClient.h.

Referenced by beginJob(), endLuminosityBlock(), and L1ScalersClient().

◆ l1AlgoCurrentRate_

MonitorElement* L1ScalersClient::l1AlgoCurrentRate_
private

Definition at line 65 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ l1AlgoCurrentRatePerAlgo_

MonitorElement* L1ScalersClient::l1AlgoCurrentRatePerAlgo_[140]
private

Definition at line 67 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ l1AlgoRateHistories_

MonitorElement* L1ScalersClient::l1AlgoRateHistories_[140]
private

Definition at line 66 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ l1AlgoScalerCounters_

unsigned long int L1ScalersClient::l1AlgoScalerCounters_[140]
private

Definition at line 64 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ l1TechTrigCurrentRate_

MonitorElement* L1ScalersClient::l1TechTrigCurrentRate_
private

Definition at line 71 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ l1TechTrigCurrentRatePerAlgo_

MonitorElement* L1ScalersClient::l1TechTrigCurrentRatePerAlgo_[80]
private

Definition at line 73 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ l1TechTrigRateHistories_

MonitorElement* L1ScalersClient::l1TechTrigRateHistories_[80]
private

Definition at line 72 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ l1TechTrigScalerCounters_

unsigned long int L1ScalersClient::l1TechTrigScalerCounters_[80]
private

Definition at line 70 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ nev_

int L1ScalersClient::nev_
private

Definition at line 57 of file L1ScalersClient.h.

◆ nLumi_

int L1ScalersClient::nLumi_
private

Definition at line 58 of file L1ScalersClient.h.

Referenced by endLuminosityBlock().

◆ numSelected_

int L1ScalersClient::numSelected_
private

Definition at line 82 of file L1ScalersClient.h.

Referenced by L1ScalersClient().

◆ selected_

MonitorElement* L1ScalersClient::selected_
private

Definition at line 77 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ techSelected_

std::vector<int> L1ScalersClient::techSelected_
private

Definition at line 80 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ totalAlgoRate_

MonitorElement* L1ScalersClient::totalAlgoRate_
private

Definition at line 68 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ totAlgoPrevCount

float L1ScalersClient::totAlgoPrevCount
private

Definition at line 61 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ totalTtRate_

MonitorElement* L1ScalersClient::totalTtRate_
private

Definition at line 74 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

◆ totTtPrevCount

float L1ScalersClient::totTtPrevCount
private

Definition at line 62 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().