110 descriptions.
add(
"GEMDQMStatusDigi", desc);
120 string strLabel =
"BID: "+to_string(BID_);
121 const char* tmpLabel = strLabel.data();
123 ( (TH2F *)
GEMDAV2D_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumAMC,tmpLabel);
126 ( (TH2F *)
Tstate2D_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumAMC,tmpLabel);
131 ( (TH2F *)
ChamT2D_->
getTH2F() )->SetBins(24, 0, 24, nNumAMC, 0, nNumAMC);
132 ( (TH2F *)
ChamT2D_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumAMC,tmpLabel);
134 ( (TH2F *)
OOSG2D_->
getTH2F() )->SetBins(1, 0, 1, nNumAMC, 0, nNumAMC);
135 ( (TH2F *)
OOSG2D_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumAMC,tmpLabel);
147 string strLabel =
"BID: "+to_string(BID_);
148 const char* tmpLabel = strLabel.data();
161 ( (TH2F *)
h2CRCAll_->
getTH2F() )->SetBins(0xffff, -32768, 32768, nNumGEB, 0, nNumGEB);
162 ( (TH2F *)
h2CRCAll_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumGEB,tmpLabel);
164 ( (TH2F *)
h2InputID_->
getTH2F() )->SetBins(31, 0x0 , 0b11111, nNumGEB, 0, nNumGEB);
167 ( (TH2F *)
h2Vwh_->
getTH2F() )->SetBins(4095, 0x0 , 0xfff, nNumGEB, 0, nNumGEB);
168 ( (TH2F *)
h2Vwh_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumGEB,tmpLabel);
170 ( (TH2F *)
h2Vwt_->
getTH2F() )->SetBins(4095, 0x0 , 0xfff, nNumGEB, 0, nNumGEB);
171 ( (TH2F *)
h2Vwt_->
getTH2F() )->GetYaxis()->SetBinLabel(nNumGEB,tmpLabel);
192 h1B1010All_ = ibooker.
book1D(
"vfatErrors_all_b1010",
"Control Bit 1010", 15, 0x0 , 0xf);
193 h1B1100All_ = ibooker.
book1D(
"vfatErrors_all_b1100",
"Control Bit 1100", 15, 0x0 , 0xf);
194 h1B1110All_ = ibooker.
book1D(
"vfatErrors_all_b1110",
"Control Bit 1110", 15, 0x0 , 0xf);
195 h2B1010All_ = ibooker.
book2D(
"vfatErrors_all_b1010_PerGEB",
"Control Bit 1010", 15, 0x0 , 0xf, 1, 0, 1);
196 h2B1100All_ = ibooker.
book2D(
"vfatErrors_all_b1100_PerGEB",
"Control Bit 1100", 15, 0x0 , 0xf, 1, 0, 1);
197 h2B1110All_ = ibooker.
book2D(
"vfatErrors_all_b1110_PerGEB",
"Control Bit 1110", 15, 0x0 , 0xf, 1, 0, 1);
199 h1FlagAll_ = ibooker.
book1D(
"vfatErrors_all_flag",
"Control Flags", 15, 0x0 , 0xf);
200 h1CRCAll_ = ibooker.
book1D(
"vfatErrors_all_CRC",
"CRC Mismatches", 0xffff, -32768, 32768);
201 h2FlagAll_ = ibooker.
book2D(
"vfatErrors_all_flag_PerGEB",
"Control Flags", 15, 0x0 , 0xf, 1, 0, 1);
202 h2CRCAll_ = ibooker.
book2D(
"vfatErrors_all_CRC_PerGEB",
"CRC Mismatches", 0xffff, -32768, 32768, 1, 0, 1);
204 h1InputID_ = ibooker.
book1D(
"GEB_InputID",
"GEB GLIB input ID", 31, 0x0 , 0b11111);
205 h1Vwh_ = ibooker.
book1D(
"VFAT_Vwh",
"VFAT word count", 4095, 0x0 , 0xfff);
206 h1Vwt_ = ibooker.
book1D(
"VFAT_Vwt",
"VFAT word count", 4095, 0x0 , 0xfff);
207 h2InputID_ = ibooker.
book2D(
"GEB_InputID_PerGEB",
"GEB GLIB input ID", 31, 0x0 , 0b11111, 1, 0, 1);
208 h2Vwh_ = ibooker.
book2D(
"VFAT_Vwh_PerGEB",
"VFAT word count", 4095, 0x0 , 0xfff, 1, 0, 1);
209 h2Vwt_ = ibooker.
book2D(
"VFAT_Vwt_PerGEB",
"VFAT word count", 4095, 0x0 , 0xfff, 1, 0, 1);
212 h2GEBError_ = ibooker.
book2D(
"GEB_Errors_PerGEB",
"GEB Critical Errors", 5, 0, 5, 1, 0, 1);
215 const char *error_flags[5] = {
"Event Size Overflow",
"L1AFIFO Full",
"InFIFO Full",
"Evt FIFO Full",
"InFIFO Underflow"};
216 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]);}
221 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"};
222 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]);}
224 GEMDAV_ = ibooker.
book1D(
"GEMDAV",
"GEM DAV list", 24, 0, 24);
227 ChamT_ = ibooker.
book1D(
"ChamT",
"Chamber Timeout", 24, 0, 24);
228 OOSG_ = ibooker.
book1D(
"OOSG",
"OOS GLIB", 1, 0, 1);
230 GEMDAV2D_ = ibooker.
book2D(
"GEMDAV_PerAMC",
"GEM DAV list", 24, 0, 24, 1, 0, 1);
231 Tstate2D_ = ibooker.
book2D(
"Tstate_PerAMC",
"TTS state", 15, 0, 15, 1, 0, 1);
232 GDcount2D_ = ibooker.
book2D(
"GDcount_PerAMC",
"GEM DAV count", 32, 0, 32, 1, 0, 1);
233 ChamT2D_ = ibooker.
book2D(
"ChamT_PerAMC",
"Chamber Timeout", 24, 0, 24, 1, 0, 1);
234 OOSG2D_ = ibooker.
book2D(
"OOSG_PerAMC",
"OOS GLIB", 1, 0, 1, 1, 0, 1);
242 event.getByToken( this->
tagVFAT_, gemVFAT);
243 event.getByToken( this->
tagGEB_, gemGEB);
244 event.getByToken( this->
tagAMC_, gemAMC);
248 uint16_t tmpID = (*vfatIt).first;
250 for (
auto vfatError = range.first; vfatError != range.second; ++vfatError ) {
268 for (
auto GEBStatus = range.first; GEBStatus != range.second; ++GEBStatus ) {
269 uint16_t tmpID = (*gebIt).first;
280 if ( ( ( GEBStatus->getErrorC() >>
bin ) & 0
x1 ) != 0 ) {
286 if ( ( ( GEBStatus->getErrorC() >>
bin ) & 0
x1 ) != 0 ) {
292 if ( ( GEBStatus->getInFu() & 0x1 ) != 0 ) {
296 if ( ( GEBStatus->getStuckd() & 0x1 ) != 0 ) {
305 for (
auto amc = range.first;
amc != range.second; ++
amc ) {
306 uint16_t tmpID = (*amcIt).first;
308 uint8_t binFired = 0;
310 binFired = ((
amc->GEMDAV() >>
bin) & 0
x1);
312 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_
void setCurrentFolder(std::string const &fullpath)
MonitorElement * h2InputID_
MonitorElement * h2CRCAll_
MonitorElement * book1D(Args &&...args)
MonitorElement * h2B1110All_
MonitorElement * h2B1100All_
MonitorElement * h1CRCAll_
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_
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
DigiRangeIterator begin() const
MonitorElement * h1B1010All_