19 #define SECS_PER_LUMI_SECTION 23.31040958083832;
29 l1AlgoCurrentRate_(0),
30 l1TechTrigCurrentRate_(0),
33 algoSelected_(ps.getUntrackedParameter<std::vector<int> >(
"algoMonitorBits", std::vector<int>())),
34 techSelected_(ps.getUntrackedParameter<std::vector<int> >(
"techMonitorBits", std::vector<int>())),
35 folderName_(ps.getUntrackedParameter<std::
string>(
"dqmFolder",
"L1T/L1Scalers_EvF")),
36 currentLumiBlockNumber_(0),
40 LogDebug(
"Status") <<
"constructor" ;
47 "current lumi section rate per Algo Bits",
51 "current lumi section rate per Tech. Trig.s",
59 "Selected L1 Algorithm Bits vs Bx",
94 char name[256]; snprintf(name, 256,
"rate_algobit%03d",
i);
108 char name[256]; snprintf(name, 256,
"rate_ttbit%03d",
i);
123 snprintf(mename1, 40,
"L1AlgoBits_%0d", k);
124 snprintf(metitle1, 40,
"L1 rates - Algo Bits %d to %d", npath_low,
127 -0.5 + npath_low, npath_high+0.5);
140 snprintf(mename2, 40,
"L1TechBits_%0d", k);
141 snprintf(metitle2, 40,
"L1 rates - Tech. Trig. Bits %d to %d", npath_low,
144 -0.5 + npath_low, npath_high+0.5);
147 std::ostringstream params;
152 params <<
", Tech: ";
156 LogDebug(
"Parameter") <<
"L1 bits to monitor are " << params.str();
193 if ( algoScalers == 0 || ttScalers ==0) {
194 LogInfo(
"Status") <<
"cannot get l1 scalers histogram, bailing out.";
199 int nalgobits = algoScalers->
getNbinsX();
205 LogDebug(
"Status") <<
"I see " << nalgobits <<
" algo paths. ";
206 LogDebug(
"Status") <<
"I see " << nttbits <<
" tt paths. ";
210 for (
int i = 0;
i < nalgobits; ++
i ) {
214 snprintf(pname, 256,
"AlgoBit%03d",
i);
216 snprintf(pname, 256,
"Rate - Algorithm Bit %03d",
i);
224 for (
int i = 0;
i < nttbits; ++
i ) {
228 snprintf(pname, 256,
"TechBit%03d",
i);
230 snprintf(pname, 256,
"Rate - Technical Bit %03d",
i);
239 LogDebug(
"Parameter") <<
"Lumi Block from DQM: "
241 <<
", local is " <<
nLumi_;
245 LogDebug(
"Status") <<
"Too many Lumi segments, "
246 << nL <<
" is greater than MAX_LUMI_SEG,"
253 LogDebug(
"Status") <<
" time is negative ... " << delta_t;
257 LogInfo(
"Status") <<
"divide by zero: same lumi section 2x " << nL;
265 for (
int i = 1;
i <= nalgobits; ++
i ) {
273 for (
int j = 1;
j <= 3600; ++
j ) {
283 LogDebug(
"Parameter") <<
"rate path " <<
i <<
" is " <<
rate;
295 for (
int i = 1;
i <= nttbits; ++
i ) {
303 for (
int j = 1;
j <= 3600; ++
j ) {
313 LogDebug(
"Parameter") <<
"rate path " <<
i <<
" is " <<
rate;
325 if ( l1AlgoCounter != 0 && l1TtCounter != 0 ) {
LuminosityBlockID id() const
MonitorElement * l1AlgoRateHistories_[MAX_ALGOS]
void setBinContent(int binx, double content)
set content of bin (1-D)
int currentLumiBlockNumber_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
std::vector< int > algoSelected_
void analyze(const edm::Event &e, const edm::EventSetup &c)
L1ScalersClient(const edm::ParameterSet &ps)
Constructors.
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)
#define SECS_PER_LUMI_SECTION
void beginJob(void)
BeginJob.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
MonitorElement * l1AlgoCurrentRatePerAlgo_[MAX_ALGOS]
unsigned long int l1TechTrigScalerCounters_[MAX_TT]
void endRun(const edm::Run &run, const edm::EventSetup &c)
EndRun.
unsigned long int l1AlgoScalerCounters_[MAX_ALGOS]
MonitorElement * l1AlgoCurrentRate_
MonitorElement * l1TechTrigCurrentRatePerAlgo_[MAX_TT]
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void setTitle(const std::string &title)
set (ie. change) histogram/profile title
int64_t getIntValue(void) const
std::vector< int > techSelected_
LuminosityBlockNumber_t luminosityBlock() const
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * l1TechTrigRateHistories_[MAX_TT]
int getNbinsX(void) const
get # of bins in X-axis
MonitorElement * totalTtRate_
MonitorElement * totalAlgoRate_
MonitorElement * bxSelected_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void setCurrentFolder(const std::string &fullpath)
void beginRun(const edm::Run &run, const edm::EventSetup &c)
BeginRun.
MonitorElement * selected_
MonitorElement * l1TechTrigCurrentRate_