22 desc.
add<Int_t>(
"AMCSlots", 13);
25 descriptions.
add(
"GEMDAQStatusSource", desc);
29 unsigned int unBinPos = 1;
31 h2Status->
setBinLabel(unBinPos++,
"Invalid AMC", 2);
32 h2Status->
setBinLabel(unBinPos++,
"Invalid size", 2);
33 h2Status->
setBinLabel(unBinPos++,
"Fail trailer check", 2);
34 h2Status->
setBinLabel(unBinPos++,
"Fail fragment length", 2);
35 h2Status->
setBinLabel(unBinPos++,
"Fail trailer match", 2);
36 h2Status->
setBinLabel(unBinPos++,
"More trailer", 2);
37 h2Status->
setBinLabel(unBinPos++,
"CRC modified", 2);
38 h2Status->
setBinLabel(unBinPos++,
"S-link error", 2);
39 h2Status->
setBinLabel(unBinPos++,
"Wrong FED ID", 2);
46 unsigned int unBinPos = 1;
49 h2Status->
setBinLabel(unBinPos++,
"Back pressure", 2);
53 h2Status->
setBinLabel(unBinPos++,
"Bad run type", 2);
55 h2Status->
setBinLabel(unBinPos++,
"MMCM locked", 2);
56 h2Status->
setBinLabel(unBinPos++,
"DAQ clock locked", 2);
57 h2Status->
setBinLabel(unBinPos++,
"DAQ not ready", 2);
58 h2Status->
setBinLabel(unBinPos++,
"BC0 not locked", 2);
62 unsigned int unBinPos = 1;
64 h2Status->
setBinLabel(unBinPos++,
"Event FIFO near full", 2);
65 h2Status->
setBinLabel(unBinPos++,
"Input FIFO near full", 2);
66 h2Status->
setBinLabel(unBinPos++,
"L1A FIFO near full", 2);
67 h2Status->
setBinLabel(unBinPos++,
"Event size warn", 2);
68 h2Status->
setBinLabel(unBinPos++,
"Invalid VFAT", 2);
69 h2Status->
setBinLabel(unBinPos++,
"Event FIFO full", 2);
70 h2Status->
setBinLabel(unBinPos++,
"Input FIFO full", 2);
71 h2Status->
setBinLabel(unBinPos++,
"L1A FIFO full", 2);
72 h2Status->
setBinLabel(unBinPos++,
"Event size overflow", 2);
73 h2Status->
setBinLabel(unBinPos++,
"Invalid event", 2);
74 h2Status->
setBinLabel(unBinPos++,
"Out of Sync AMC vs VFAT", 2);
75 h2Status->
setBinLabel(unBinPos++,
"Out of Sync VFAT vs VFAT", 2);
76 h2Status->
setBinLabel(unBinPos++,
"BX mismatch AMC vs VFAT", 2);
77 h2Status->
setBinLabel(unBinPos++,
"BX mismatch VFAT vs VFAT", 2);
78 h2Status->
setBinLabel(unBinPos++,
"Input FIFO underflow", 2);
79 h2Status->
setBinLabel(unBinPos++,
"Bad VFAT count", 2);
83 unsigned int unBinPos = 1;
85 h2Status->
setBinLabel(unBinPos++,
"Basic overflow", 2);
86 h2Status->
setBinLabel(unBinPos++,
"Zero-sup overflow", 2);
87 h2Status->
setBinLabel(unBinPos++,
"VFAT CRC error", 2);
88 h2Status->
setBinLabel(unBinPos++,
"Invalid header", 2);
89 h2Status->
setBinLabel(unBinPos++,
"AMC EC mismatch", 2);
90 h2Status->
setBinLabel(unBinPos++,
"AMC BC mismatch", 2);
111 "AMC Status GE11-M;AMC slot;",
119 "AMC Status GE11-P;AMC slot;",
137 this,
"vfat_statusWarnSum",
"VFAT reporting warnings", 36, 0.5, 36.5, 24, -0.5, 24 - 0.5,
"Chamber",
"VFAT");
139 this,
"vfat_statusErrSum",
"VFAT reporting errors", 36, 0.5, 36.5, 24, -0.5, 24 - 0.5,
"Chamber",
"VFAT");
202 event.getByToken(
tagVFAT_, gemVFAT);
203 event.getByToken(
tagOH_, gemOH);
204 event.getByToken(
tagAMC_, gemAMC);
207 for (
auto amc13It = gemAMC13->begin(); amc13It != gemAMC13->end(); ++amc13It) {
208 int fedId = (*amc13It).first;
221 const auto &
range = (*amc13It).second;
222 for (
auto amc13 =
range.first; amc13 !=
range.second; ++amc13) {
223 Bool_t bWarn =
false;
227 if (warnings.InValidAMC)
231 if (errors.InValidSize)
233 if (errors.failTrailerCheck)
235 if (errors.failFragmentLength)
237 if (errors.failTrailerMatch)
239 if (errors.moreTrailers)
241 if (errors.crcModified)
243 if (errors.slinkError)
245 if (errors.wrongFedId)
255 for (
auto amcIt = gemAMC->begin(); amcIt != gemAMC->end(); ++amcIt) {
256 int fedId = (*amcIt).first;
269 for (
auto amc = range.first;
amc != range.second; ++
amc) {
270 Bool_t bWarn =
false;
273 Int_t nAMCNum =
amc->amcNumber();
276 if (warnings.InValidOH)
278 if (warnings.backPressure)
288 if (errors.badRunType)
292 if (errors.MMCMlocked)
294 if (errors.DAQclocklocked)
296 if (errors.DAQnotReday)
298 if (errors.BC0locked)
302 h2AMCStatus->
Fill(nAMCNum, 1);
307 std::map<ME4IdsKey, bool> mapChamberAll;
308 std::map<ME4IdsKey, bool> mapChamberWarning;
309 std::map<ME4IdsKey, bool> mapChamberError;
311 for (
auto ohIt = gemOH->begin(); ohIt != gemOH->end(); ++ohIt) {
317 for (
auto OHStatus = range.first; OHStatus != range.second; ++OHStatus) {
327 if (warnings.InValidVFAT)
351 if (errors.badVFatCount)
354 Bool_t bWarn = warnings.wcodes != 0;
355 Bool_t bErr = errors.codes != 0;
359 mapChamberWarning[key4] =
false;
361 mapChamberError[key4] =
false;
362 mapChamberAll[key4] =
true;
366 for (
auto vfatIt = gemVFAT->begin(); vfatIt != gemVFAT->end(); ++vfatIt) {
372 for (
auto vfatStat = range.first; vfatStat != range.second; ++vfatStat) {
376 if (warnings.basicOFW)
378 if (warnings.zeroSupOFW)
380 if (warnings.basicOFW)
382 if (warnings.zeroSupOFW)
388 if (errors.InValidHeader)
396 if (errors.InValidHeader)
403 Bool_t bWarn = warnings.wcodes != 0;
404 Bool_t bErr = errors.codes != 0;
410 mapChamberWarning[key4Ch] =
false;
412 mapChamberError[key4Ch] =
false;
417 mapChamberAll[key4Ch] =
true;
422 for (
auto const &[key4, bErr] : mapChamberAll) {
429 for (
auto const &[key4, bWarning] : mapChamberWarning) {
430 if (mapChamberError.find(key4) != mapChamberError.end())
438 for (
auto const &[key4, bErr] : mapChamberError) {
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MEMapInfT< MEMap4Ids, ME4IdsKey > MEMap4Inf
dqm::impl::MonitorElement * CreateSummaryHist(DQMStore::IBooker &ibooker, TString strName)
int ProcessWithMEMap3WithChamber(BookingHelper &bh, ME4IdsKey key) override
GEMDAQStatusSource(const edm::ParameterSet &cfg)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void FillWithRiseErr(MonitorElement *h, Int_t nX, Int_t nY, Bool_t &bErr)
virtual void setCurrentFolder(std::string const &fullpath)
edm::EDGetToken tagAMC13_
int getVFATNumber(const int, const int, const int)
MonitorElement * h2AMCStatusNeg_
MEMapInfT< MEMap3Ids, ME3IdsKey > MEMap3Inf
#define DEFINE_FWK_MODULE(type)
MonitorElement * h2AMC13Status_
int SetLabelForChambers(K key, Int_t nAxis, Int_t nNumBin=-1)
int initGeometry(edm::EventSetup const &iSetup)
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
std::map< UInt_t, int > mapFEDIdToRe_
int SetLabelForVFATs(K key, Int_t nNumEtaPartitions, Int_t nAxis, Int_t nNumBin=-1)
std::map< ME3IdsKey, MEStationInfo > mapStationInfo_
std::map< ME3IdsKey, int > mapStationToIdx_
Log< level::Error, false > LogError
int Fill(K key, Double_t x)
std::string log_category_
constexpr int ieta() const
const uint16_t range(const Frame &aFrame)
MEMap3Inf mapStatusWarnVFATPerLayer_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h2SummaryStatusError
MEMap3Inf mapStatusErrVFATPerLayer_
int GenerateMEPerChamber(DQMStore::IBooker &ibooker)
void SetLabelAMCStatus(MonitorElement *h2Status)
constexpr int region() const
tuple key
prepare the HTCondor submission files and eventually submit them
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
virtual 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)
void SetLabelAMC13Status(MonitorElement *h2Status)
MonitorElement * h2SummaryStatusAll
const GEMGeometry * GEMGeometry_
void SetLabelVFATStatus(MonitorElement *h2Status)
constexpr int chamber() const
constexpr int layer() const
std::pair< const_iterator, const_iterator > Range
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
T getParameter(std::string const &) const
constexpr int station() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
int keyToChamber(ME4IdsKey key)
void SetLabelOHStatus(MonitorElement *h2Status)
int bookND(BookingHelper &bh, K key)
ME3IdsKey key4Tokey3(ME4IdsKey key)
MEMap4Inf mapStatusVFATPerCh_
int ProcessWithMEMap3(BookingHelper &bh, ME3IdsKey key) override
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
void SetBinConfX(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
MonitorElement * h2SummaryStatusWarning
void SetBinConfY(Int_t nBins, Double_t dL=0.5, Double_t dH=-1048576.0)
dqm::impl::MonitorElement * FindHist(K key)
MonitorElement * h2AMCStatusPos_