Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GEM] bugfix - BC and OrbitCounter in AMC13 - backport #37423

Merged
merged 2 commits into from Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions DataFormats/GEMDigi/interface/GEMAMC13.h
Expand Up @@ -109,6 +109,8 @@ class GEMAMC13 {
void addAMCpayload(const GEMAMC& a) { amcs_.push_back(a); }
void clearAMCpayloads() { amcs_.clear(); }

static const int lastBC = 3564;

private:
uint64_t cdfh_; // CDFHeader
uint64_t amc13h_; // AMC13Header
Expand Down
8 changes: 6 additions & 2 deletions DataFormats/GEMDigi/interface/GEMAMCStatus.h
Expand Up @@ -34,9 +34,13 @@ class GEMAMCStatus {
amcNum_ = amc.amcNum();
Errors error{0};
error.badEC = (amc13->lv1Id() != amc.lv1Id());
error.badBC = (amc13->bunchCrossing() != amc.bunchCrossing());
// Last BC in AMC13 is different to TCDS, AMC, and VFAT
error.badBC = !((amc13->bunchCrossing() == amc.bunchCrossing()) ||
(amc13->bunchCrossing() == 0 && amc.bunchCrossing() == GEMAMC13::lastBC));
error.badRunType = amc.runType() != 0x1;
error.badOC = (uint16_t(amc13->orbitNumber()) != amc.orbitNumber());
// Last OC in AMC13 is different to TCDS, AMC, and VFAT
error.badOC = !((uint16_t(amc13->orbitNumber()) == amc.orbitNumber()) ||
(amc13->bunchCrossing() == 0 && uint16_t(amc.orbitNumber() + 1) == uint16_t(amc13->orbitNumber())));
error.MMCMlocked = !amc.mmcmLocked();
error.DAQclocklocked = !amc.daqClockLocked();
error.DAQnotReday = !amc.daqReady();
Expand Down