773 Bool_t bIsNotEmpty =
true;
780 event.getByToken(
tagVFAT_, gemVFAT);
781 event.getByToken(
tagGEB_, gemGEB);
782 event.getByToken(
tagAMC_, gemAMC);
783 event.getByToken(
tagDigi_, gemDigis);
785 auto fillTimeHisto = [](
TimeStoreItem &listCurr,
int nStackedBin,
int nIdx,
bool bFill) ->
void {
786 Int_t nX = nStackedBin + 1;
800 int nRoll = gemid.
roll();
805 edm::LogError(
"BadGeometry") <<
"Wrong detId which is not in the current geometry (VFAT status): " << gemchId
812 for (
auto vfatStat = range.first; vfatStat != range.second; ++vfatStat) {
815 uint64_t unQFVFAT = vfatStat->quality() ;
816 if ((unQFVFAT & ~0
x1) == 0) {
819 Int_t nIdxLayer, nIdxChamber;
831 edm::LogError(
"BadGeometry") <<
"Wrong detId which is not in the current geometry (VFAT status): " << gemchId
838 fillTimeHisto(listCurr,
nStackedBin_, nVFAT, (unQFVFAT & ~0
x1) != 0);
850 edm::LogError(
"BadGeometry") <<
"Wrong detId which is not in the current geometry (GEB status): " << lid
858 for (
auto GEBStatus = range.first; GEBStatus != range.second; ++GEBStatus) {
864 unStatus |= (GEBStatus->bxmVvV() << unBit++);
865 unStatus |= (GEBStatus->bxmAvV() << unBit++);
866 unStatus |= (GEBStatus->oOScVvV() << unBit++);
867 unStatus |= (GEBStatus->oOScAvV() << unBit++);
868 unStatus |= (GEBStatus->noVFAT() << unBit++);
869 unStatus |= (GEBStatus->evtSzW() << unBit++);
870 unStatus |= (GEBStatus->l1aNF() << unBit++);
871 unStatus |= (GEBStatus->inNF() << unBit++);
872 unStatus |= (GEBStatus->evtNF() << unBit++);
873 unStatus |= (GEBStatus->evtSzOFW() << unBit++);
874 unStatus |= (GEBStatus->l1aF() << unBit++);
875 unStatus |= (GEBStatus->inF() << unBit++);
876 unStatus |= (GEBStatus->evtF() << unBit++);
877 unStatus |= (GEBStatus->inUfw() << unBit++);
878 unStatus |= (GEBStatus->stuckData() << unBit++);
879 unStatus |= (GEBStatus->evUfw() << unBit++);
882 Int_t nIdxLayer, nIdxChamber;
890 edm::LogError(
"BadGeometry") <<
"Wrong detId which is not in the current geometry (GEB status): " << lid
904 fillTimeHisto(listCurr,
nStackedBin_, nCh, unStatus != 0);
908 auto findAMCIdx = [
this](Int_t nAMCnum) -> Int_t {
918 for (
auto amc = range.first;
amc != range.second; ++
amc) {
919 Int_t nIdAMC = findAMCIdx(
amc->amcNum());
923 unStatus |= (!
amc->bc0locked() << unBit++);
924 unStatus |= (!
amc->daqReady() << unBit++);
925 unStatus |= (!
amc->daqClockLocked() << unBit++);
926 unStatus |= (!
amc->mmcmLocked() << unBit++);
927 unStatus |= (
amc->backPressure() << unBit++);
928 unStatus |= (
amc->oosGlib() << unBit++);
938 fillTimeHisto(listCurr,
nStackedBin_, nIdAMC, unStatus != 0);
942 auto findVFATByStrip = [](
GEMDetId gid, Int_t nIdxStrip, Int_t nNumStrips) -> Int_t {
948 return nNumEtaPart * ((Int_t)(nIdxStrip / (nNumStrips / nNumVFAT)) + 1) - gid.
roll();
949 }
else if (gid.
station() == 2) {
951 return nNumEtaPart * ((Int_t)(nIdxStrip / (nNumStrips / nNumVFAT)) + 1) - gid.
roll();
960 Bool_t bIsHit =
false;
963 std::unordered_map<Int_t, Int_t> mapBXVFAT;
971 for (
auto roll : ch.etaPartitions()) {
973 const auto &digis_in_det = gemDigis->get(rId);
975 for (
auto d = digis_in_det.first;
d != digis_in_det.second; ++
d) {
977 Int_t nVFAT = findVFATByStrip(rId, nIdxStrip, roll->nstrips());
980 mapBXVFAT[nVFAT] =
d->bx();
985 if (
d->bx() < listCurrBx.nNbinMin)
987 else if (
d->bx() >= listCurrBx.nNbinMax)
988 nIdxBx = listCurrBx.nNbinY - 1;
990 nIdxBx = (Int_t)(listCurrBx.nNbinY * 1.0 * (
d->bx() - listCurrBx.nNbinMin) /
991 (listCurrBx.nNbinMax - listCurrBx.nNbinMin));
997 for (
auto bx : mapBXVFAT)
1001 Int_t nIdxLayer, nIdxChamber;
MonitorElement * h1_amc_buffState_
static const int maxEtaPartition_
std::unordered_map< UInt_t, MonitorElement * > listGEBVFATWordCntT_
const Int_t m_nIdxSummaryErr
std::unordered_map< UInt_t, MonitorElement * > listVFATEC_
std::unordered_map< UInt_t, MonitorElement * > listGEBZeroSupWordsCnt_
std::unordered_map< UInt_t, MonitorElement * > listGEBInputStatus_
MonitorElement * h1_vfat_qualityflag_
MonitorElement * h1_amc_chTimeOut_
GEMDetId chamberId() const
std::unordered_map< UInt_t, MonitorElement * > listGEBVFATWordCnt_
MonitorElement * h2_vfat_qualityflag_
MonitorElement * h1_amc_oosGlib_
std::unordered_map< UInt_t, MonitorElement * > listGEBInputID_
MonitorElement * h3SummaryStatusPre_
std::vector< GEMChamber > gemChambers_
Bool_t FillBits(MonitorElement *monitor, uint64_t unVal, int nNumBits)
virtual double getBinContent(int binx) const
get content of bin (1-D)
Int_t seekIdx(std::vector< GEMDetId > &listLayers, UInt_t unId)
std::unordered_map< UInt_t, MonitorElement * > listVFATQualityFlag_
std::unordered_map< UInt_t, MonitorElement * > listGEBbcOH_
std::vector< GEMDetId > m_listChambers
std::unordered_map< UInt_t, MonitorElement * > listGEBOHCRC_
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
unsigned long long uint64_t
std::map< UInt_t, TimeStoreItem > listTimeStore_
std::pair< const_iterator, const_iterator > Range
MonitorElement * h2AMCStatus_
static const int maxVFatGE21_
MonitorElement * h1_amc_ttsState_
std::vector< Int_t > listAMCSlots_
DigiRangeIterator end() const
std::unordered_map< UInt_t, MonitorElement * > listGEBecOH_
MonitorElement * h1_amc_davCnt_
std::unordered_map< UInt_t, MonitorElement * > listVFATBC_
const Int_t m_nIdxSummaryFill
static const int maxVFatGE11_
DigiRangeIterator begin() const
void seekIdxSummary(GEMDetId gid, Int_t &nIdxLayer, Int_t &nIdxChamber)