772 event.getByToken(
tagVFAT_, gemVFAT);
773 event.getByToken(
tagGEB_, gemGEB);
774 event.getByToken(
tagAMC_, gemAMC);
775 event.getByToken(
tagDigi_, gemDigis);
777 auto fillTimeHisto = [](
TimeStoreItem &listCurr,
int nStackedBin,
int nIdx,
bool bFill) ->
void {
778 Int_t nX = nStackedBin + 1;
792 int nRoll = gemid.
roll();
798 for (
auto vfatStat = range.first; vfatStat != range.second; ++vfatStat) {
800 if ((unQFVFAT & ~0
x1) == 0) {
803 Int_t nIdxLayer, nIdxChamber;
816 fillTimeHisto(listCurr,
nStackedBin_, nVFAT, (unQFVFAT & ~0
x1) != 0);
829 for (
auto GEBStatus = range.first; GEBStatus != range.second; ++GEBStatus) {
833 unStatus |= (GEBStatus->bxmVvV() << unBit++);
834 unStatus |= (GEBStatus->bxmAvV() << unBit++);
835 unStatus |= (GEBStatus->oOScVvV() << unBit++);
836 unStatus |= (GEBStatus->oOScAvV() << unBit++);
837 unStatus |= (GEBStatus->noVFAT() << unBit++);
838 unStatus |= (GEBStatus->evtSzW() << unBit++);
839 unStatus |= (GEBStatus->l1aNF() << unBit++);
840 unStatus |= (GEBStatus->inNF() << unBit++);
841 unStatus |= (GEBStatus->evtNF() << unBit++);
842 unStatus |= (GEBStatus->evtSzOFW() << unBit++);
843 unStatus |= (GEBStatus->l1aF() << unBit++);
844 unStatus |= (GEBStatus->inF() << unBit++);
845 unStatus |= (GEBStatus->evtF() << unBit++);
846 unStatus |= (GEBStatus->inUfw() << unBit++);
847 unStatus |= (GEBStatus->stuckData() << unBit++);
848 unStatus |= (GEBStatus->evUfw() << unBit++);
851 Int_t nIdxLayer, nIdxChamber;
867 fillTimeHisto(listCurr,
nStackedBin_, nCh, unStatus != 0);
871 auto findAMCIdx = [
this](Int_t nAMCnum) -> Int_t {
881 for (
auto amc = range.first;
amc != range.second; ++
amc) {
882 Int_t nIdAMC = findAMCIdx(
amc->amcNum());
886 unStatus |= (!
amc->bc0locked() << unBit++);
887 unStatus |= (!
amc->daqReady() << unBit++);
888 unStatus |= (!
amc->daqClockLocked() << unBit++);
889 unStatus |= (!
amc->mmcmLocked() << unBit++);
890 unStatus |= (
amc->backPressure() << unBit++);
891 unStatus |= (
amc->oosGlib() << unBit++);
901 fillTimeHisto(listCurr,
nStackedBin_, nIdAMC, unStatus != 0);
905 auto findVFATByStrip = [](
GEMDetId gid, Int_t nIdxStrip, Int_t nNumStrips) -> Int_t {
911 return nNumEtaPart * ((Int_t)(nIdxStrip / (nNumStrips / nNumVFAT)) + 1) - gid.
roll();
912 }
else if (gid.
station() == 2) {
914 return nNumEtaPart * ((Int_t)(nIdxStrip / (nNumStrips / nNumVFAT)) + 1) - gid.
roll();
923 Bool_t bIsHit =
false;
926 std::unordered_map<Int_t, Int_t> mapBXVFAT;
934 for (
auto roll : ch.etaPartitions()) {
936 const auto &digis_in_det = gemDigis->get(rId);
938 for (
auto d = digis_in_det.first;
d != digis_in_det.second; ++
d) {
940 Int_t nVFAT = findVFATByStrip(rId, nIdxStrip, roll->nstrips());
943 mapBXVFAT[nVFAT] =
d->bx();
948 if (
d->bx() < listCurrBx.nNbinMin)
950 else if (
d->bx() >= listCurrBx.nNbinMax)
951 nIdxBx = listCurrBx.nNbinY - 1;
953 nIdxBx = (Int_t)(listCurrBx.nNbinY * 1.0 * (
d->bx() - listCurrBx.nNbinMin) /
954 (listCurrBx.nNbinMax - listCurrBx.nNbinMin));
963 for (
auto bx : mapBXVFAT)
967 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_
virtual double getBinContent(int binx) const
get content of bin (1-D)
void FillBits(MonitorElement *monitor, uint64_t unVal, int nNumBits)
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::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_
std::unordered_map< UInt_t, TimeStoreItem > listTimeStore_
DigiRangeIterator begin() const
void seekIdxSummary(GEMDetId gid, Int_t &nIdxLayer, Int_t &nIdxChamber)