CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Attributes
L1ScalersClient Class Reference

#include <L1ScalersClient.h>

Inheritance diagram for L1ScalersClient:
edm::EDAnalyzer edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer 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 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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

Definition at line 25 of file L1ScalersClient.h.

Definition at line 24 of file L1ScalersClient.h.

Constructor & Destructor Documentation

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, isotrackApplyRegressor::k, kNumAlgoHistos, kNumTTHistos, kPerHisto, l1AlgoCurrentRate_, l1AlgoCurrentRatePerAlgo_, l1AlgoRateHistories_, l1AlgoScalerCounters_, l1TechTrigCurrentRate_, l1TechTrigCurrentRatePerAlgo_, l1TechTrigRateHistories_, l1TechTrigScalerCounters_, LogDebug, MAX_ALGOS, MAX_LUMI_SEG, MAX_TT, mergeVDriftHistosByStation::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
38  assert(dbe_ != nullptr); // blammo!
40 
42  dbe_->book1D("algo_cur_rate", "current lumi section rate per Algo Bits", MAX_ALGOS, -0.5, MAX_ALGOS - 0.5);
43 
45  dbe_->book1D("tt_cur_rate", "current lumi section rate per Tech. Trig.s", MAX_TT, -0.5, MAX_TT - 0.5);
46  // ----------------------
47  numSelected_ = algoSelected_.size() + techSelected_.size();
48  selected_ = dbe_->book1D("l1BitsSel",
49  "Selected L1 Algorithm"
50  " and tech Bits",
52  -0.5,
53  numSelected_ - 0.5);
55  "l1BitsBxSel", "Selected L1 Algorithm Bits vs Bx", 3600, -0.5, 3599.5, numSelected_, -0.5, numSelected_ - 0.5);
56  int j = 1;
57  for (unsigned int i = 0; i < algoSelected_.size(); ++i) {
58  char title[256];
59  snprintf(title, 256, "Algo %d", algoSelected_[i]);
60  selected_->setBinLabel(j, title);
61  bxSelected_->setBinLabel(j, title, 2);
62  ++j;
63  }
64  for (unsigned int i = 0; i < techSelected_.size(); ++i) {
65  char title[256];
66  snprintf(title, 256, "Tech %d", techSelected_[i]);
67  selected_->setBinLabel(j, title);
68  bxSelected_->setBinLabel(j, title, 2);
69  ++j;
70  }
71 
72  // book individual bit rates vs lumi for algo bits.
73  totalAlgoRate_ = dbe_->book1D("totAlgoRate", "Total Algo Rate", MAX_LUMI_SEG, -0.5, MAX_LUMI_SEG - 0.5);
74  totalTtRate_ = dbe_->book1D("totTtRate", "Total Tech Rate", MAX_LUMI_SEG, -0.5, MAX_LUMI_SEG - 0.5);
75 
76  totAlgoPrevCount = 0UL;
77  totTtPrevCount = 0UL;
78 
79  std::string algodir = "/AlgoRates";
80  dbe_->setCurrentFolder(folderName_ + algodir);
81 
82  for (int i = 0; i < MAX_ALGOS; ++i) {
83  l1AlgoScalerCounters_[i] = 0UL;
84  l1AlgoRateHistories_[i] = nullptr; // not really needed but ...
85  char name[256];
86  snprintf(name, 256, "rate_algobit%03d", i);
87  LogDebug("Parameter") << "name " << i << " is " << name;
88  l1AlgoRateHistories_[i] = dbe_->book1D(name, name, MAX_LUMI_SEG, -0.5, MAX_LUMI_SEG - 0.5);
89  }
90 
91  // book individual bit rates vs lumi for technical trigger bits.
92 
93  std::string techdir = "/TechRates";
94  dbe_->setCurrentFolder(folderName_ + techdir);
95 
96  for (int i = 0; i < MAX_TT; ++i) {
98  l1TechTrigRateHistories_[i] = nullptr; // not really needed but ...
99  char name[256];
100  snprintf(name, 256, "rate_ttbit%03d", i);
101  LogDebug("Parameter") << "name " << i << " is " << name;
102  l1TechTrigRateHistories_[i] = dbe_->book1D(name, name, MAX_LUMI_SEG, -0.5, MAX_LUMI_SEG - 0.5);
103  }
104 
105  // split l1 scalers up into groups of 20, assuming total of 140 bits
106  std::string algodir2 = "/AlgoBits";
107  dbe_->setCurrentFolder(folderName_ + algodir2);
108 
109  char metitle1[64]; // histo name
110  char mename1[64]; // ME name
111  for (int k = 0; k < kNumAlgoHistos; k++) {
112  int npath_low = kPerHisto * k;
113  int npath_high = kPerHisto * (k + 1) - 1;
114  snprintf(mename1, 64, "L1AlgoBits_%0d", k);
115  snprintf(metitle1, 64, "L1 rates - Algo Bits %d to %d", npath_low, npath_high);
116  l1AlgoCurrentRatePerAlgo_[k] = dbe_->book1D(mename1, metitle1, kPerHisto, -0.5 + npath_low, npath_high + 0.5);
117  }
118 
119  // split l1 scalers up into groups of 20, assuming total of 80 technical bits
120 
121  std::string techdir2 = "/TechBits";
122  dbe_->setCurrentFolder(folderName_ + techdir2);
123 
124  char metitle2[64]; // histo name
125  char mename2[64]; // ME name
126  for (int k = 0; k < kNumTTHistos; k++) {
127  int npath_low = kPerHisto * k;
128  int npath_high = kPerHisto * (k + 1) - 1;
129  snprintf(mename2, 64, "L1TechBits_%0d", k);
130  snprintf(metitle2, 64, "L1 rates - Tech. Trig. Bits %d to %d", npath_low, npath_high);
131  l1TechTrigCurrentRatePerAlgo_[k] = dbe_->book1D(mename2, metitle2, kPerHisto, -0.5 + npath_low, npath_high + 0.5);
132  }
133 
134  std::ostringstream params;
135  params << "Algo: ";
136  for (unsigned int i = 0; i < algoSelected_.size(); ++i) {
137  params << algoSelected_[i] << " ";
138  }
139  params << ", Tech: ";
140  for (unsigned int i = 0; i < techSelected_.size(); ++i) {
141  params << techSelected_[i] << " ";
142  }
143  LogDebug("Parameter") << "L1 bits to monitor are " << params.str();
144 }
T getUntrackedParameter(std::string const &, T const &) const
unsigned long int l1AlgoScalerCounters_[140]
std::vector< int > algoSelected_
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
MonitorElement * l1TechTrigCurrentRatePerAlgo_[80]
const int kNumAlgoHistos
assert(be >=bs)
const int kNumTTHistos
#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:177
std::vector< int > techSelected_
MonitorElement * totalTtRate_
const int kPerHisto
#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 ( )
inlineoverride

Destructor.

Definition at line 31 of file L1ScalersClient.h.

31 {};

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 308 of file L1ScalersClient.cc.

308 {}
void L1ScalersClient::beginJob ( void  )
overridevirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 147 of file L1ScalersClient.cc.

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

147  {
148  LogDebug("Status") << "beingJob";
149  if (dbe_) {
151  }
152 }
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
std::string folderName_
#define LogDebug(id)
void L1ScalersClient::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
overridevirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 155 of file L1ScalersClient.cc.

155 {}
void L1ScalersClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
overridevirtual

End LumiBlock DQM Client Diagnostic should be performed here

Reimplemented from edm::EDAnalyzer.

Definition at line 162 of file L1ScalersClient.cc.

References algoSelected_, 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.

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

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 158 of file L1ScalersClient.cc.

158 {}

Member Data Documentation

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

Definition at line 77 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

MonitorElement* L1ScalersClient::bxSelected_
private

Definition at line 76 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

int L1ScalersClient::currentLumiBlockNumber_
private

Definition at line 82 of file L1ScalersClient.h.

Referenced by endLuminosityBlock().

int L1ScalersClient::currentRun_
private

Definition at line 57 of file L1ScalersClient.h.

DQMStore* L1ScalersClient::dbe_
private

Definition at line 53 of file L1ScalersClient.h.

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

bool L1ScalersClient::first_algo
private

Definition at line 83 of file L1ScalersClient.h.

Referenced by endLuminosityBlock().

bool L1ScalersClient::first_tt
private

Definition at line 84 of file L1ScalersClient.h.

Referenced by endLuminosityBlock().

std::string L1ScalersClient::folderName_
private

Definition at line 79 of file L1ScalersClient.h.

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

MonitorElement* L1ScalersClient::l1AlgoCurrentRate_
private

Definition at line 63 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

MonitorElement* L1ScalersClient::l1AlgoCurrentRatePerAlgo_[140]
private

Definition at line 65 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

MonitorElement* L1ScalersClient::l1AlgoRateHistories_[140]
private

Definition at line 64 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

unsigned long int L1ScalersClient::l1AlgoScalerCounters_[140]
private

Definition at line 62 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

MonitorElement* L1ScalersClient::l1TechTrigCurrentRate_
private

Definition at line 69 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

MonitorElement* L1ScalersClient::l1TechTrigCurrentRatePerAlgo_[80]
private

Definition at line 71 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

MonitorElement* L1ScalersClient::l1TechTrigRateHistories_[80]
private

Definition at line 70 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

unsigned long int L1ScalersClient::l1TechTrigScalerCounters_[80]
private

Definition at line 68 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

int L1ScalersClient::nev_
private

Definition at line 55 of file L1ScalersClient.h.

int L1ScalersClient::nLumi_
private

Definition at line 56 of file L1ScalersClient.h.

Referenced by endLuminosityBlock().

int L1ScalersClient::numSelected_
private

Definition at line 80 of file L1ScalersClient.h.

Referenced by L1ScalersClient().

MonitorElement* L1ScalersClient::selected_
private

Definition at line 75 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

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

Definition at line 78 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

MonitorElement* L1ScalersClient::totalAlgoRate_
private

Definition at line 66 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

float L1ScalersClient::totAlgoPrevCount
private

Definition at line 59 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

MonitorElement* L1ScalersClient::totalTtRate_
private

Definition at line 72 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().

float L1ScalersClient::totTtPrevCount
private

Definition at line 60 of file L1ScalersClient.h.

Referenced by endLuminosityBlock(), and L1ScalersClient().