112 descriptions.
add(
"GEMDQMStatusDigi", desc);
122 string strLabel =
"BID: "+to_string(BID_);
123 const char* tmpLabel = strLabel.data();
125 ( (TH2F *)
GEMDAV2D_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumAMC,tmpLabel);
128 ( (TH2F *)
Tstate2D_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumAMC,tmpLabel);
133 ( (TH2F *)
ChamT2D_->
getTH2F() )->SetBins(24, 0, 24, nNumAMC, 0, nNumAMC);
134 ( (TH2F *)
ChamT2D_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumAMC,tmpLabel);
136 ( (TH2F *)
OOSG2D_->
getTH2F() )->SetBins(1, 0, 1, nNumAMC, 0, nNumAMC);
137 ( (TH2F *)
OOSG2D_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumAMC,tmpLabel);
149 string strLabel =
"BID: "+to_string(BID_);
150 const char* tmpLabel = strLabel.data();
163 ( (TH2F *)
h2CRCAll_->
getTH2F() )->SetBins(0xffff, -32768, 32768, nNumGEB, 0, nNumGEB);
164 ( (TH2F *)
h2CRCAll_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumGEB,tmpLabel);
166 ( (TH2F *)
h2InputID_->
getTH2F() )->SetBins(31, 0x0 , 0b11111, nNumGEB, 0, nNumGEB);
169 ( (TH2F *)
h2Vwh_->
getTH2F() )->SetBins(4095, 0x0 , 0xfff, nNumGEB, 0, nNumGEB);
170 ( (TH2F *)
h2Vwh_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumGEB,tmpLabel);
172 ( (TH2F *)
h2Vwt_->
getTH2F() )->SetBins(4095, 0x0 , 0xfff, nNumGEB, 0, nNumGEB);
173 ( (TH2F *)
h2Vwt_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumGEB,tmpLabel);
194 h1B1010All_ = ibooker.
book1D(
"vfatErrors_all_b1010",
"Control Bit 1010", 15, 0x0 , 0xf);
195 h1B1100All_ = ibooker.
book1D(
"vfatErrors_all_b1100",
"Control Bit 1100", 15, 0x0 , 0xf);
196 h1B1110All_ = ibooker.
book1D(
"vfatErrors_all_b1110",
"Control Bit 1110", 15, 0x0 , 0xf);
197 h2B1010All_ = ibooker.
book2D(
"vfatErrors_all_b1010_PerGEB",
"Control Bit 1010", 15, 0x0 , 0xf, 1, 0, 1);
198 h2B1100All_ = ibooker.
book2D(
"vfatErrors_all_b1100_PerGEB",
"Control Bit 1100", 15, 0x0 , 0xf, 1, 0, 1);
199 h2B1110All_ = ibooker.
book2D(
"vfatErrors_all_b1110_PerGEB",
"Control Bit 1110", 15, 0x0 , 0xf, 1, 0, 1);
201 h1FlagAll_ = ibooker.
book1D(
"vfatErrors_all_flag",
"Control Flags", 15, 0x0 , 0xf);
202 h1CRCAll_ = ibooker.
book1D(
"vfatErrors_all_CRC",
"CRC Mismatches", 0xffff, -32768, 32768);
203 h2FlagAll_ = ibooker.
book2D(
"vfatErrors_all_flag_PerGEB",
"Control Flags", 15, 0x0 , 0xf, 1, 0, 1);
204 h2CRCAll_ = ibooker.
book2D(
"vfatErrors_all_CRC_PerGEB",
"CRC Mismatches", 0xffff, -32768, 32768, 1, 0, 1);
206 h1InputID_ = ibooker.
book1D(
"GEB_InputID",
"GEB GLIB input ID", 31, 0x0 , 0b11111);
207 h1Vwh_ = ibooker.
book1D(
"VFAT_Vwh",
"VFAT word count", 4095, 0x0 , 0xfff);
208 h1Vwt_ = ibooker.
book1D(
"VFAT_Vwt",
"VFAT word count", 4095, 0x0 , 0xfff);
209 h2InputID_ = ibooker.
book2D(
"GEB_InputID_PerGEB",
"GEB GLIB input ID", 31, 0x0 , 0b11111, 1, 0, 1);
210 h2Vwh_ = ibooker.
book2D(
"VFAT_Vwh_PerGEB",
"VFAT word count", 4095, 0x0 , 0xfff, 1, 0, 1);
211 h2Vwt_ = ibooker.
book2D(
"VFAT_Vwt_PerGEB",
"VFAT word count", 4095, 0x0 , 0xfff, 1, 0, 1);
214 h2GEBError_ = ibooker.
book2D(
"GEB_Errors_PerGEB",
"GEB Critical Errors", 5, 0, 5, 1, 0, 1);
217 const char *error_flags[5] = {
"Event Size Overflow",
"L1AFIFO Full",
"InFIFO Full",
"Evt FIFO Full",
"InFIFO Underflow"};
218 for (
int i = 1;
i< histErr1D->GetNbinsX()+1;
i++) {histErr1D->GetXaxis()->SetBinLabel(
i, error_flags[
i-1]); histErr2D->GetXaxis()->SetBinLabel(
i, error_flags[
i-1]);}
223 const char *warning_flags[10] = {
"BX AMC-OH Mismatch",
"BX AMC-VFAT Mismatch",
"OOS AMC OH",
"OOS AMC VFAT",
"No VFAT Marker",
"Event Size Warn",
"L1AFIFO Near Full",
"InFIFO Near Full",
"EvtFIFO Near Full",
"Stuck Data"};
224 for (
int i = 1;
i<histWar1D->GetNbinsX()+1;
i++) {histWar1D->GetXaxis()->SetBinLabel(
i, warning_flags[
i-1]); histWar2D->GetXaxis()->SetBinLabel(
i, warning_flags[
i-1]);}
226 GEMDAV_ = ibooker.
book1D(
"GEMDAV",
"GEM DAV list", 24, 0, 24);
229 ChamT_ = ibooker.
book1D(
"ChamT",
"Chamber Timeout", 24, 0, 24);
230 OOSG_ = ibooker.
book1D(
"OOSG",
"OOS GLIB", 1, 0, 1);
232 GEMDAV2D_ = ibooker.
book2D(
"GEMDAV_PerAMC",
"GEM DAV list", 24, 0, 24, 1, 0, 1);
233 Tstate2D_ = ibooker.
book2D(
"Tstate_PerAMC",
"TTS state", 15, 0, 15, 1, 0, 1);
234 GDcount2D_ = ibooker.
book2D(
"GDcount_PerAMC",
"GEM DAV count", 32, 0, 32, 1, 0, 1);
235 ChamT2D_ = ibooker.
book2D(
"ChamT_PerAMC",
"Chamber Timeout", 24, 0, 24, 1, 0, 1);
236 OOSG2D_ = ibooker.
book2D(
"OOSG_PerAMC",
"OOS GLIB", 1, 0, 1, 1, 0, 1);
244 event.getByToken( this->
tagVFAT_, gemVFAT);
245 event.getByToken( this->
tagGEB_, gemGEB);
246 event.getByToken( this->
tagAMC_, gemAMC);
250 uint16_t tmpID = (*vfatIt).first;
252 for (
auto vfatError = range.first; vfatError != range.second; ++vfatError ) {
270 for (
auto GEBStatus = range.first; GEBStatus != range.second; ++GEBStatus ) {
271 uint16_t tmpID = (*gebIt).first;
282 if ( ( ( GEBStatus->getErrorC() >>
bin ) & 0
x1 ) != 0 ) {
288 if ( ( ( GEBStatus->getErrorC() >>
bin ) & 0
x1 ) != 0 ) {
294 if ( ( GEBStatus->getInFu() & 0x1 ) != 0 ) {
298 if ( ( GEBStatus->getStuckd() & 0x1 ) != 0 ) {
307 for (
auto amc = range.first;
amc != range.second; ++
amc ) {
308 uint16_t tmpID = (*amcIt).first;
310 uint8_t binFired = 0;
312 binFired = ((
amc->GEMDAV() >>
bin) & 0
x1);
314 binFired = ((
amc->ChamT() >>
bin) & 0
x1);
MonitorElement * GEMDAV2D_
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * h1B1110All_
#define DEFINE_FWK_MODULE(type)
GEMDQMStatusDigi(const edm::ParameterSet &cfg)
MonitorElement * h2GEBError_
int AMCBinN(uint16_t BID_)
MonitorElement * h1GEBWarning_
std::unordered_map< uint16_t, int > mlAMCID_
MonitorElement * GDcount_
MonitorElement * h2InputID_
MonitorElement * h2CRCAll_
MonitorElement * book1D(Args &&...args)
MonitorElement * h2B1110All_
MonitorElement * h2B1100All_
MonitorElement * h1CRCAll_
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void endRun(edm::Run const &run, edm::EventSetup const &eSetup) override
int GEBBinN(uint16_t BID_)
bin
set the eta bin as selection string.
MonitorElement * h1FlagAll_
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
MonitorElement * h1InputID_
void setCurrentFolder(const std::string &fullpath)
MonitorElement * Tstate2D_
MonitorElement * book2D(Args &&...args)
std::unordered_map< uint16_t, int > mlGEBID_
MonitorElement * h2B1010All_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * h2FlagAll_
MonitorElement * ChamT2D_
MonitorElement * h2GEBWarning_
~GEMDQMStatusDigi() override
MonitorElement * h1GEBError_
std::pair< const_iterator, const_iterator > Range
MonitorElement * h1B1100All_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * GDcount2D_
DigiRangeIterator end() const
void endLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup) override
DigiRangeIterator begin() const
MonitorElement * h1B1010All_