diff --git a/DataFormats/GEMDigi/interface/AMC13Event.h b/DataFormats/GEMDigi/interface/AMC13Event.h deleted file mode 100644 index f659ff208f2fa..0000000000000 --- a/DataFormats/GEMDigi/interface/AMC13Event.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef DataFormats_GEMDigi_AMC13Event_h -#define DataFormats_GEMDigi_AMC13Event_h -#include -#include "AMCdata.h" - -namespace gem { - - union CDFHeader { - uint64_t word; - struct { - uint64_t fov : 8; // not used - uint64_t sourceId : 12; // FED number assigned by CDAQ - uint64_t bxId : 12; // BX number, Reset by BC0 - uint64_t lv1Id : 24; // L1A / event number, Reset by EC0 - uint64_t eventType : 4; // Event Type (1 for normal, 2 for calibration) - uint64_t cb5 : 4; // 0x5 - }; - }; - union AMC13Header { - uint64_t word; - struct { - uint64_t cb0 : 4; // 0x0 - uint64_t orbitN : 32; // Orbit Number - uint64_t reserved0 : 16; // reserved - uint64_t nAMC : 4; // Number of AMCs following (0 to 12) - uint64_t calType : 4; // Calibration event type - uint64_t uFov : 4; // Format version: 0x1 - }; - }; - union AMC13Trailer { - uint64_t word; - struct { - uint64_t bxIdT : 12; // bx id - uint64_t lv1IdT : 8; // level 1 id - uint64_t blkN : 8; // block number - uint64_t : 4; - uint64_t crc32 : 32; // Overall CRC - }; - }; - union CDFTrailer { - uint64_t word; - struct { - uint64_t res1 : 2; - uint64_t crcModified : 1; - uint64_t moreTrailers : 1; - uint64_t tts : 4; // tts - uint64_t evtStat : 4; // event status - uint64_t res2 : 2; - uint64_t slinkError : 1; - uint64_t wrongFedId : 1; - uint64_t crcCDF : 16; // CDF crc - uint64_t evtLength : 24; // event length - uint64_t eventType : 4; // Event Type - uint64_t cbA : 4; // 0xA - }; - }; - union AMCHeader { - uint64_t word; - struct { - uint64_t boardId : 16; // board id - uint64_t amcNo : 4; // amc number - uint64_t blkNo : 8; // block number - uint64_t unused : 4; // unused - uint64_t amcSize : 24; // amc size - uint64_t errStrip : 8; // errStrip - }; - }; - - class AMC13Event { - public: - AMC13Event() : cdfh_(0), amc13h_(0), amc13t_(0), cdft_(0) {} - ~AMC13Event() { - amcHeaders_.clear(); - amcs_.clear(); - } - - void setCDFHeader(uint64_t word) { cdfh_ = word; } - void setCDFHeader(uint8_t Evt_ty, uint32_t LV1_id, uint16_t BX_id, uint16_t Source_id); - uint64_t getCDFHeader() const { return cdfh_; } - - void setAMC13Header(uint64_t word) { amc13h_ = word; } - void setAMC13Header(uint8_t CalTyp, uint8_t nAMC, uint32_t OrN); - uint64_t getAMC13Header() const { return amc13h_; } - - void setAMC13Trailer(uint64_t word) { amc13t_ = word; } - void setAMC13Trailer(uint8_t Blk_NoT, uint8_t LV1_idT, uint16_t BX_idT); - uint64_t getAMC13Trailer() const { return amc13t_; } - - void setCDFTrailer(uint64_t word) { cdft_ = word; } - void setCDFTrailer(uint32_t EvtLength); - uint64_t getCDFTrailer() const { return cdft_; } - uint32_t fragmentLength() const { return CDFTrailer{cdft_}.evtLength; } - uint8_t evtStatus() const { return CDFTrailer{cdft_}.evtStat; } - uint8_t ttsBits() const { return CDFTrailer{cdft_}.tts; } - - uint16_t bunchCrossing() const { return CDFHeader{cdfh_}.bxId; } - uint32_t lv1Id() const { return CDFHeader{cdfh_}.lv1Id; } - uint16_t sourceId() const { return CDFHeader{cdfh_}.sourceId; } - - uint16_t orbitNumber() const { return AMC13Header{amc13h_}.orbitN; } - uint8_t nAMC() const { return AMC13Header{amc13h_}.nAMC; } - - const std::vector* getAMCheaders() const { return &amcHeaders_; } - uint32_t getAMCsize(int i) const { return AMCHeader{amcHeaders_.at(i)}.amcSize; } - void addAMCheader(uint64_t word); - void addAMCheader(uint32_t AMC_size, uint8_t Blk_No, uint8_t AMC_No, uint16_t BoardID); - - uint32_t crc() const { return AMC13Trailer{amc13t_}.crc32; } - - const std::vector* getAMCpayloads() const { return &amcs_; } - void addAMCpayload(const AMCdata& a) { amcs_.push_back(a); } - void clearAMCpayloads() { amcs_.clear(); } - - private: - uint64_t cdfh_; // CDFHeader - uint64_t amc13h_; // AMC13Header - uint64_t amc13t_; // AMC13Trailer - uint64_t cdft_; // CDFTrailer - - // AMC headers - std::vector amcHeaders_; - // AMCs payload - std::vector amcs_; - }; -} // namespace gem -#endif diff --git a/DataFormats/GEMDigi/interface/AMCdata.h b/DataFormats/GEMDigi/interface/AMCdata.h deleted file mode 100644 index eaae41fdcbc79..0000000000000 --- a/DataFormats/GEMDigi/interface/AMCdata.h +++ /dev/null @@ -1,138 +0,0 @@ -#ifndef DataFormats_GEMDigi_AMCdata_h -#define DataFormats_GEMDigi_AMCdata_h -#include "GEBdata.h" -#include - -namespace gem { - - union AMCheader1 { - uint64_t word; - struct { - uint64_t dataLength : 20; // Always 0xfffff, use trailer dataLengthT - uint64_t bxID : 12; // Bunch crossing ID - uint64_t l1AID : 24; // L1A number – basically this is like event number, but reset by resync - uint64_t AMCnum : 4; // Slot number of the AMC - uint64_t reserved : 4; // not used - }; - }; - union AMCheader2 { - uint64_t word; - struct { - uint64_t boardID : 16; // 8bit long GLIB serial number - uint64_t orbitNum : 16; // Orbit number, Reset by EC0 - uint64_t param3 : 8; // RunPar - Controlled by software, normally used only for calibrations - uint64_t param2 : 8; // RunPar - Controlled by software, normally used only for calibrations - uint64_t param1 : 8; // RunPar - Controlled by software, normally used only for calibrations - uint64_t runType : 4; // run types like physics, cosmics, threshold scan, latency scan, etc.. - uint64_t formatVer : 4; // Current format version = 0x0 - }; - }; - union AMCTrailer { - uint64_t word; - struct { - uint64_t dataLength : 20; // Number of 64bit words in this event - uint64_t : 4; - uint64_t l1AID : 8; // L1A number (first 8 bits) - uint64_t crc : 32; // CRC added by the AMC13 - }; - }; - union EventHeader { - uint64_t word; - struct { - uint64_t ttsState : 4; // GLIB TTS state at the moment when this event was built. - uint64_t pType : 4; // Payload type: can be one refering to different zero suppression schemes - // in normal data taking or calibration type. - // Note in calibration type the entire GCT (GEM Chamber Trailer) is skipped - uint64_t pVer : 3; // Version of the payload type - uint64_t davCnt : 5; // Number of chamber blocks in this event - uint64_t buffState : 24; // Buffer status, Always 0 in current fw - uint64_t davList : 24; // Data Available list: a bitmask indicating which chambers have data in this event - }; - }; - union EventTrailer { - uint64_t word; - struct { - uint64_t BCL : 4; // 1st bit, BC0 locked - If 0, this is a bad condition indicating a - // problem in the clock or TTC command stream (critical condition) - uint64_t DR : 1; // DAQ Ready - If 0, this means that AMC13 is not ready to take data (critical condition) - uint64_t CL : 1; // DAQ clock locked- If 0, this indicates a problem in the DAQ clock (critical condition) - uint64_t ML : 1; // MMCM locked - Should always be 1 - uint64_t BP : 1; // Backpressure - If this is 1, it means that we are receiving backpressure from AMC13 - uint64_t oosGlib : 32; // GLIB is out‐of‐sync (critical): L1A ID is different for - // different chambers in this event (1 bit) - uint64_t linkTo : 24; // Link timeout flags (one bit for each link indicating timeout condition) - }; - }; - - class AMCdata { - public: - AMCdata() : amch1_(0), amch2_(0), amct_(0), eh_(0), et_(0){}; - ~AMCdata() { gebd_.clear(); } - - int status(); - - void setAMCheader1(uint64_t word) { amch1_ = word; } - void setAMCheader1(uint32_t dataLength, uint16_t bxID, uint32_t l1AID, uint8_t AMCnum); - uint64_t getAMCheader1() const { return amch1_; } - - void setAMCheader2(uint64_t word) { amch2_ = word; } - void setAMCheader2(uint16_t boardID, uint16_t orbitNum, uint8_t runType); - uint64_t getAMCheader2() const { return amch2_; } - - void setAMCTrailer(uint64_t word) { amct_ = word; } - uint64_t getAMCTrailer() const { return amct_; } - - void setGEMeventHeader(uint64_t word) { eh_ = word; } - void setGEMeventHeader(uint8_t davCnt, uint32_t davList); - uint64_t getGEMeventHeader() const { return eh_; } - - void setGEMeventTrailer(uint64_t word) { et_ = word; } - uint64_t getGEMeventTrailer() const { return et_; } - - uint32_t dataLength() const { return AMCTrailer{amct_}.dataLength; } - uint16_t bunchCrossing() const { return AMCheader1{amch1_}.bxID; } - uint32_t lv1Id() const { return AMCheader1{amch1_}.l1AID; } - uint8_t amcNum() const { return AMCheader1{amch1_}.AMCnum; } - - uint16_t boardId() const { return AMCheader2{amch2_}.boardID; } - uint16_t orbitNumber() const { return AMCheader2{amch2_}.orbitNum; } - uint8_t param3() const { return AMCheader2{amch2_}.param3; } - uint8_t param2() const { return AMCheader2{amch2_}.param2; } - uint8_t param1() const { return AMCheader2{amch2_}.param1; } - uint8_t runType() const { return AMCheader2{amch2_}.runType; } - uint8_t formatVer() const { return AMCheader2{amch2_}.formatVer; } - - uint8_t lv1Idt() const { return AMCTrailer{amct_}.l1AID; } - uint32_t crc() const { return AMCTrailer{amct_}.crc; } - - uint16_t ttsState() const { return EventHeader{eh_}.ttsState; } - uint8_t davCnt() const { return EventHeader{eh_}.davCnt; } - uint32_t buffState() const { return EventHeader{eh_}.buffState; } - uint32_t davList() const { return EventHeader{eh_}.davList; } - - uint8_t bc0locked() const { return EventTrailer{et_}.BCL; } - uint8_t daqReady() const { return EventTrailer{et_}.DR; } - uint8_t daqClockLocked() const { return EventTrailer{et_}.CL; } - uint8_t mmcmLocked() const { return EventTrailer{et_}.ML; } - uint8_t backPressure() const { return EventTrailer{et_}.BP; } - uint8_t oosGlib() const { return EventTrailer{et_}.oosGlib; } - uint32_t linkTo() const { return EventTrailer{et_}.linkTo; } - - //!Adds GEB data to vector - void addGEB(GEBdata g) { gebd_.push_back(g); } - //!Returns a vector of GEB data - const std::vector* gebs() const { return &gebd_; } - //!Clear a vector of GEB data - void clearGEBs() { gebd_.clear(); } - - private: - uint64_t amch1_; - uint64_t amch2_; - uint64_t amct_; - uint64_t eh_; - uint64_t et_; - - std::vector gebd_; /// - -namespace gem { - - union GEBchamberHeader { - uint64_t word; - struct { - uint64_t : 10; // unused - uint64_t BxmVvV : 1; // 1st bit BX mismatch VFAT vs VFAT - uint64_t BxmAvV : 1; // BX mismatch AMC vs VFAT - uint64_t OOScVvV : 1; // Out of Sync (EC mismatch) VFAT vs VFAT - uint64_t OOScAvV : 1; // Out of Sync (EC mismatch) AMC vs VFAT - uint64_t Inv : 1; // Invalid event - uint64_t EvtSzW : 1; // Event size warning - uint64_t L1aNF : 1; // L1A FIFO near full - uint64_t InNF : 1; // Input FIFO near full - uint64_t EvtNF : 1; // Event FIFO near full - uint64_t EvtSzOFW : 1; // Event size overflow - uint64_t L1aF : 1; // L1A FIFO full - uint64_t InF : 1; // Input FIFO full - uint64_t EvtF : 1; // Event FIFO full - uint64_t VfWdCnt : 12; // VFAT word count (in number of 64-bit words) - uint64_t InputID : 5; // Input link ID - uint64_t CALIB_CHAN : 7; // Calibration channel number - uint64_t : 17; // unused - }; - }; - - union GEBchamberTrailer { - uint64_t word; - struct { - uint64_t ecOH : 20; // NOT USED - OptoHybrid event counter - uint64_t bcOH : 13; // NOT USED - OptoHybrid bunch crossing - uint64_t InUfw : 1; // Input FIFO underflow - uint64_t SkD : 1; // NOT USED - Stuck data - uint64_t EvUfw : 1; // NOT USED - Event FIFO underflow - uint64_t VfWdCntT : 12; // VFAT word count (in number of 64-bit words) - uint64_t crc16 : 16; // CRC of OptoHybrid data (currently not available – filled with 0) - }; - }; - - class GEBdata { - public: - GEBdata() : ch_(0), ct_(0){}; - ~GEBdata() { vfatd_.clear(); } - - //!Read chamberHeader from the block. - void setChamberHeader(uint64_t word) { ch_ = word; } - void setChamberHeader(uint16_t vfatWordCnt, uint8_t inputID) { - GEBchamberHeader u{0}; - u.VfWdCnt = vfatWordCnt; - u.InputID = inputID; - ch_ = u.word; - } - uint64_t getChamberHeader() const { return ch_; } - - //!Read chamberTrailer from the block. - void setChamberTrailer(uint64_t word) { ct_ = word; } - void setChamberTrailer(uint32_t ecOH, uint16_t bcOH, uint16_t vfatWordCntT) { - GEBchamberTrailer u{0}; - u.ecOH = ecOH; - u.bcOH = bcOH; - u.VfWdCntT = vfatWordCntT; - ct_ = u.word; - } - uint64_t getChamberTrailer() const { return ct_; } - - uint16_t vfatWordCnt() const { return GEBchamberHeader{ch_}.VfWdCnt; } - uint8_t inputID() const { return GEBchamberHeader{ch_}.InputID; } - uint16_t vfatWordCntT() const { return GEBchamberTrailer{ct_}.VfWdCntT; } - - bool bxmVvV() const { return GEBchamberHeader{ch_}.BxmVvV; } - bool bxmAvV() const { return GEBchamberHeader{ch_}.BxmAvV; } - bool oOScVvV() const { return GEBchamberHeader{ch_}.OOScVvV; } - bool oOScAvV() const { return GEBchamberHeader{ch_}.OOScAvV; } - bool inv() const { return GEBchamberHeader{ch_}.Inv; } - bool evtSzW() const { return GEBchamberHeader{ch_}.EvtSzW; } - bool l1aNF() const { return GEBchamberHeader{ch_}.L1aNF; } - bool inNF() const { return GEBchamberHeader{ch_}.InNF; } - bool evtNF() const { return GEBchamberHeader{ch_}.EvtNF; } - bool evtSzOFW() const { return GEBchamberHeader{ch_}.EvtSzOFW; } - bool l1aF() const { return GEBchamberHeader{ch_}.L1aF; } - bool inF() const { return GEBchamberHeader{ch_}.InF; } - bool evtF() const { return GEBchamberHeader{ch_}.EvtF; } - bool inUfw() const { return GEBchamberTrailer{ct_}.InUfw; } - - bool noVFAT() const { return false; } // to be removed - bool stuckData() const { return false; } // to be removed - bool evUfw() const { return false; } // to be removed - - //!Adds VFAT data to the vector - void addVFAT(VFATdata v) { vfatd_.push_back(v); } - //!Returns the vector of VFAT data - const std::vector* vFATs() const { return &vfatd_; } - //!Clear the vector rof VFAT data - void clearVFATs() { vfatd_.clear(); } - - static const int sizeGebID = 5; - - private: - uint64_t ch_; // GEBchamberHeader - uint64_t ct_; // GEBchamberTrailer - - std::vector vfatd_; - }; -} // namespace gem -#endif diff --git a/DataFormats/GEMDigi/interface/GEMAMC.h b/DataFormats/GEMDigi/interface/GEMAMC.h new file mode 100644 index 0000000000000..129dec4be1af7 --- /dev/null +++ b/DataFormats/GEMDigi/interface/GEMAMC.h @@ -0,0 +1,135 @@ +#ifndef DataFormats_GEMDigi_GEMAMC_h +#define DataFormats_GEMDigi_GEMAMC_h +#include "GEMOptoHybrid.h" +#include + +class GEMAMC { +public: + union AMCheader1 { + uint64_t word; + struct { + uint64_t dataLength : 20; // Always 0xfffff, use trailer dataLengthT + uint64_t bxID : 12; // Bunch crossing ID + uint64_t l1AID : 24; // L1A number – basically this is like event number, but reset by resync + uint64_t AMCnum : 4; // Slot number of the AMC + uint64_t reserved : 4; // not used + }; + }; + union AMCheader2 { + uint64_t word; + struct { + uint64_t boardID : 16; // 8bit long GLIB serial number + uint64_t orbitNum : 16; // Orbit number, Reset by EC0 + uint64_t param3 : 8; // RunPar - Controlled by software, normally used only for calibrations + uint64_t param2 : 8; // RunPar - Controlled by software, normally used only for calibrations + uint64_t param1 : 8; // RunPar - Controlled by software, normally used only for calibrations + uint64_t runType : 4; // run types like physics, cosmics, threshold scan, latency scan, etc.. + uint64_t formatVer : 4; // Current format version = 0x0 + }; + }; + union AMCTrailer { + uint64_t word; + struct { + uint64_t dataLength : 20; // Number of 64bit words in this event + uint64_t : 4; + uint64_t l1AID : 8; // L1A number (first 8 bits) + uint64_t crc : 32; // CRC added by the AMC13 + }; + }; + union EventHeader { + uint64_t word; + struct { + uint64_t ttsState : 4; // GLIB TTS state at the moment when this event was built. + uint64_t pType : 4; // Payload type: can be one refering to different zero suppression schemes + // in normal data taking or calibration type. + // Note in calibration type the entire GCT (GEM Chamber Trailer) is skipped + uint64_t pVer : 3; // Version of the payload type + uint64_t davCnt : 5; // Number of chamber blocks in this event + uint64_t buffState : 24; // Buffer status, Always 0 in current fw + uint64_t davList : 24; // Data Available list: a bitmask indicating which chambers have data in this event + }; + }; + union EventTrailer { + uint64_t word; + struct { + uint64_t BCL : 4; // 1st bit, BC0 locked - If 0, this is a bad condition indicating a + // problem in the clock or TTC command stream (critical condition) + uint64_t DR : 1; // DAQ Ready - If 0, this means that AMC13 is not ready to take data (critical condition) + uint64_t CL : 1; // DAQ clock locked- If 0, this indicates a problem in the DAQ clock (critical condition) + uint64_t ML : 1; // MMCM locked - Should always be 1 + uint64_t BP : 1; // Backpressure - If this is 1, it means that we are receiving backpressure from AMC13 + uint64_t oosGlib : 32; // GLIB is out‐of‐sync (critical): L1A ID is different for + // different chambers in this event (1 bit) + uint64_t linkTo : 24; // Link timeout flags (one bit for each link indicating timeout condition) + }; + }; + + GEMAMC() : amch1_(0), amch2_(0), amct_(0), eh_(0), et_(0){}; + ~GEMAMC() { gebd_.clear(); } + + int status(); + + void setAMCheader1(uint64_t word) { amch1_ = word; } + void setAMCheader1(uint32_t dataLength, uint16_t bxID, uint32_t l1AID, uint8_t AMCnum); + uint64_t getAMCheader1() const { return amch1_; } + + void setAMCheader2(uint64_t word) { amch2_ = word; } + void setAMCheader2(uint16_t boardID, uint16_t orbitNum, uint8_t runType); + uint64_t getAMCheader2() const { return amch2_; } + + void setAMCTrailer(uint64_t word) { amct_ = word; } + uint64_t getAMCTrailer() const { return amct_; } + + void setGEMeventHeader(uint64_t word) { eh_ = word; } + void setGEMeventHeader(uint8_t davCnt, uint32_t davList); + uint64_t getGEMeventHeader() const { return eh_; } + + void setGEMeventTrailer(uint64_t word) { et_ = word; } + uint64_t getGEMeventTrailer() const { return et_; } + + uint32_t dataLength() const { return AMCTrailer{amct_}.dataLength; } + uint16_t bunchCrossing() const { return AMCheader1{amch1_}.bxID; } + uint32_t lv1Id() const { return AMCheader1{amch1_}.l1AID; } + uint8_t amcNum() const { return AMCheader1{amch1_}.AMCnum; } + + uint16_t boardId() const { return AMCheader2{amch2_}.boardID; } + uint16_t orbitNumber() const { return AMCheader2{amch2_}.orbitNum; } + uint8_t param3() const { return AMCheader2{amch2_}.param3; } + uint8_t param2() const { return AMCheader2{amch2_}.param2; } + uint8_t param1() const { return AMCheader2{amch2_}.param1; } + uint8_t runType() const { return AMCheader2{amch2_}.runType; } + uint8_t formatVer() const { return AMCheader2{amch2_}.formatVer; } + + uint8_t lv1Idt() const { return AMCTrailer{amct_}.l1AID; } + uint32_t crc() const { return AMCTrailer{amct_}.crc; } + + uint16_t ttsState() const { return EventHeader{eh_}.ttsState; } + uint8_t davCnt() const { return EventHeader{eh_}.davCnt; } + uint32_t buffState() const { return EventHeader{eh_}.buffState; } + uint32_t davList() const { return EventHeader{eh_}.davList; } + + uint8_t bc0locked() const { return EventTrailer{et_}.BCL; } + uint8_t daqReady() const { return EventTrailer{et_}.DR; } + uint8_t daqClockLocked() const { return EventTrailer{et_}.CL; } + uint8_t mmcmLocked() const { return EventTrailer{et_}.ML; } + uint8_t backPressure() const { return EventTrailer{et_}.BP; } + uint8_t oosGlib() const { return EventTrailer{et_}.oosGlib; } + uint32_t linkTo() const { return EventTrailer{et_}.linkTo; } + + //!Adds GEB data to vector + void addGEB(GEMOptoHybrid g) { gebd_.push_back(g); } + //!Returns a vector of GEB data + const std::vector* gebs() const { return &gebd_; } + //!Clear a vector of GEB data + void clearGEBs() { gebd_.clear(); } + +private: + uint64_t amch1_; + uint64_t amch2_; + uint64_t amct_; + uint64_t eh_; + uint64_t et_; + + std::vector gebd_; /// +#include "GEMAMC.h" + +class GEMAMC13 { +public: + union CDFHeader { + uint64_t word; + struct { + uint64_t fov : 8; // not used + uint64_t sourceId : 12; // FED number assigned by CDAQ + uint64_t bxId : 12; // BX number, Reset by BC0 + uint64_t lv1Id : 24; // L1A / event number, Reset by EC0 + uint64_t eventType : 4; // Event Type (1 for normal, 2 for calibration) + uint64_t cb5 : 4; // 0x5 + }; + }; + union AMC13Header { + uint64_t word; + struct { + uint64_t cb0 : 4; // 0x0 + uint64_t orbitN : 32; // Orbit Number + uint64_t reserved0 : 16; // reserved + uint64_t nAMC : 4; // Number of AMCs following (0 to 12) + uint64_t calType : 4; // Calibration event type + uint64_t uFov : 4; // Format version: 0x1 + }; + }; + union AMC13Trailer { + uint64_t word; + struct { + uint64_t bxIdT : 12; // bx id + uint64_t lv1IdT : 8; // level 1 id + uint64_t blkN : 8; // block number + uint64_t : 4; + uint64_t crc32 : 32; // Overall CRC + }; + }; + union CDFTrailer { + uint64_t word; + struct { + uint64_t res1 : 2; + uint64_t crcModified : 1; + uint64_t moreTrailers : 1; + uint64_t tts : 4; // tts + uint64_t evtStat : 4; // event status + uint64_t res2 : 2; + uint64_t slinkError : 1; + uint64_t wrongFedId : 1; + uint64_t crcCDF : 16; // CDF crc + uint64_t evtLength : 24; // event length + uint64_t eventType : 4; // Event Type + uint64_t cbA : 4; // 0xA + }; + }; + union AMCHeader { + uint64_t word; + struct { + uint64_t boardId : 16; // board id + uint64_t amcNo : 4; // amc number + uint64_t blkNo : 8; // block number + uint64_t unused : 4; // unused + uint64_t amcSize : 24; // amc size + uint64_t errStrip : 8; // errStrip + }; + }; + + GEMAMC13() : cdfh_(0), amc13h_(0), amc13t_(0), cdft_(0) {} + ~GEMAMC13() { + amcHeaders_.clear(); + amcs_.clear(); + } + + void setCDFHeader(uint64_t word) { cdfh_ = word; } + void setCDFHeader(uint8_t Evt_ty, uint32_t LV1_id, uint16_t BX_id, uint16_t Source_id); + uint64_t getCDFHeader() const { return cdfh_; } + + void setAMC13Header(uint64_t word) { amc13h_ = word; } + void setAMC13Header(uint8_t CalTyp, uint8_t nAMC, uint32_t OrN); + uint64_t getAMC13Header() const { return amc13h_; } + + void setAMC13Trailer(uint64_t word) { amc13t_ = word; } + void setAMC13Trailer(uint8_t Blk_NoT, uint8_t LV1_idT, uint16_t BX_idT); + uint64_t getAMC13Trailer() const { return amc13t_; } + + void setCDFTrailer(uint64_t word) { cdft_ = word; } + void setCDFTrailer(uint32_t EvtLength); + uint64_t getCDFTrailer() const { return cdft_; } + uint32_t fragmentLength() const { return CDFTrailer{cdft_}.evtLength; } + uint8_t evtStatus() const { return CDFTrailer{cdft_}.evtStat; } + uint8_t ttsBits() const { return CDFTrailer{cdft_}.tts; } + + uint16_t bunchCrossing() const { return CDFHeader{cdfh_}.bxId; } + uint32_t lv1Id() const { return CDFHeader{cdfh_}.lv1Id; } + uint16_t sourceId() const { return CDFHeader{cdfh_}.sourceId; } + + uint16_t orbitNumber() const { return AMC13Header{amc13h_}.orbitN; } + uint8_t nAMC() const { return AMC13Header{amc13h_}.nAMC; } + + const std::vector* getAMCheaders() const { return &amcHeaders_; } + uint32_t getAMCsize(int i) const { return AMCHeader{amcHeaders_.at(i)}.amcSize; } + void addAMCheader(uint64_t word); + void addAMCheader(uint32_t AMC_size, uint8_t Blk_No, uint8_t AMC_No, uint16_t BoardID); + + uint32_t crc() const { return AMC13Trailer{amc13t_}.crc32; } + + const std::vector* getAMCpayloads() const { return &amcs_; } + void addAMCpayload(const GEMAMC& a) { amcs_.push_back(a); } + void clearAMCpayloads() { amcs_.clear(); } + +private: + uint64_t cdfh_; // CDFHeader + uint64_t amc13h_; // AMC13Header + uint64_t amc13t_; // AMC13Trailer + uint64_t cdft_; // CDFTrailer + + // AMC headers + std::vector amcHeaders_; + // AMCs payload + std::vector amcs_; +}; + +#endif diff --git a/DataFormats/GEMDigi/interface/GEMAMC13EventCollection.h b/DataFormats/GEMDigi/interface/GEMAMC13EventCollection.h deleted file mode 100644 index 2eb053e303f3b..0000000000000 --- a/DataFormats/GEMDigi/interface/GEMAMC13EventCollection.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef DataFormats_GEMDigi_GEMAMC13EventCollection_h -#define DataFormats_GEMDigi_GEMAMC13EventCollection_h - -#include "DataFormats/MuonData/interface/MuonDigiCollection.h" -#include "DataFormats/GEMDigi/interface/AMC13Event.h" - -typedef MuonDigiCollection GEMAMC13EventCollection; - -#endif diff --git a/DataFormats/GEMDigi/interface/GEMAMC13Status.h b/DataFormats/GEMDigi/interface/GEMAMC13Status.h index 6c848ed005fad..a1ad46fcc86c7 100644 --- a/DataFormats/GEMDigi/interface/GEMAMC13Status.h +++ b/DataFormats/GEMDigi/interface/GEMAMC13Status.h @@ -1,7 +1,7 @@ #ifndef DataFormats_GEMDigi_GEMAMC13Status_h #define DataFormats_GEMDigi_GEMAMC13Status_h -#include "AMC13Event.h" -#include "AMCdata.h" +#include "GEMAMC13.h" +#include "GEMAMC.h" #include "DataFormats/FEDRawData/interface/FEDRawData.h" #include "DataFormats/FEDRawData/interface/FEDTrailer.h" #include diff --git a/DataFormats/GEMDigi/interface/GEMAMCStatus.h b/DataFormats/GEMDigi/interface/GEMAMCStatus.h index d66d59c55dadc..abb9d6f66f026 100644 --- a/DataFormats/GEMDigi/interface/GEMAMCStatus.h +++ b/DataFormats/GEMDigi/interface/GEMAMCStatus.h @@ -1,7 +1,7 @@ #ifndef DataFormats_GEMDigi_GEMAMCStatus_h #define DataFormats_GEMDigi_GEMAMCStatus_h -#include "AMC13Event.h" -#include "AMCdata.h" +#include "GEMAMC13.h" +#include "GEMAMC.h" #include #include @@ -30,7 +30,7 @@ class GEMAMCStatus { }; GEMAMCStatus() {} - GEMAMCStatus(const gem::AMC13Event* amc13, const gem::AMCdata& amc) { + GEMAMCStatus(const GEMAMC13* amc13, const GEMAMC& amc) { amcNum_ = amc.amcNum(); Errors error{0}; error.badEC = (amc13->lv1Id() != amc.lv1Id()); diff --git a/DataFormats/GEMDigi/interface/GEMAMCdataCollection.h b/DataFormats/GEMDigi/interface/GEMAMCdataCollection.h deleted file mode 100644 index 3065dd3dc5306..0000000000000 --- a/DataFormats/GEMDigi/interface/GEMAMCdataCollection.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef DataFormats_GEMDigi_GEMAMCdataCollection_h -#define DataFormats_GEMDigi_GEMAMCdataCollection_h - -#include "DataFormats/MuonData/interface/MuonDigiCollection.h" -#include "DataFormats/GEMDigi/interface/AMCdata.h" - -typedef MuonDigiCollection GEMAMCdataCollection; - -#endif diff --git a/DataFormats/GEMDigi/interface/GEMGEBdataCollection.h b/DataFormats/GEMDigi/interface/GEMGEBdataCollection.h deleted file mode 100644 index c18a7176363ad..0000000000000 --- a/DataFormats/GEMDigi/interface/GEMGEBdataCollection.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef DataFormats_GEMDigi_GEMGEBdataCollection_h -#define DataFormats_GEMDigi_GEMGEBdataCollection_h - -#include "DataFormats/GEMDigi/interface/GEBdata.h" -#include "DataFormats/MuonDetId/interface/GEMDetId.h" -#include "DataFormats/MuonData/interface/MuonDigiCollection.h" - -typedef MuonDigiCollection GEMGEBdataCollection; - -#endif diff --git a/DataFormats/GEMDigi/interface/GEMOHStatus.h b/DataFormats/GEMDigi/interface/GEMOHStatus.h index c62675e1ece15..850356cb1618c 100644 --- a/DataFormats/GEMDigi/interface/GEMOHStatus.h +++ b/DataFormats/GEMDigi/interface/GEMOHStatus.h @@ -1,6 +1,6 @@ #ifndef DataFormats_GEMDigi_GEMOHStatus_h #define DataFormats_GEMDigi_GEMOHStatus_h -#include "GEBdata.h" +#include "GEMOptoHybrid.h" #include #include @@ -35,7 +35,7 @@ class GEMOHStatus { }; GEMOHStatus() {} - GEMOHStatus(const gem::GEBdata& oh) { + GEMOHStatus(const GEMOptoHybrid& oh) { Errors error{0}; error.EvtF = oh.evtF(); error.InF = oh.inF(); diff --git a/DataFormats/GEMDigi/interface/GEMOptoHybrid.h b/DataFormats/GEMDigi/interface/GEMOptoHybrid.h new file mode 100644 index 0000000000000..b0054f5fd2a5d --- /dev/null +++ b/DataFormats/GEMDigi/interface/GEMOptoHybrid.h @@ -0,0 +1,107 @@ +#ifndef DataFormats_GEMDigi_GEMOptoHybrid_h +#define DataFormats_GEMDigi_GEMOptoHybrid_h +#include "GEMVFAT.h" +#include + +class GEMOptoHybrid { +public: + union GEBchamberHeader { + uint64_t word; + struct { + uint64_t : 10; // unused + uint64_t BxmVvV : 1; // 1st bit BX mismatch VFAT vs VFAT + uint64_t BxmAvV : 1; // BX mismatch AMC vs VFAT + uint64_t OOScVvV : 1; // Out of Sync (EC mismatch) VFAT vs VFAT + uint64_t OOScAvV : 1; // Out of Sync (EC mismatch) AMC vs VFAT + uint64_t Inv : 1; // Invalid event + uint64_t EvtSzW : 1; // Event size warning + uint64_t L1aNF : 1; // L1A FIFO near full + uint64_t InNF : 1; // Input FIFO near full + uint64_t EvtNF : 1; // Event FIFO near full + uint64_t EvtSzOFW : 1; // Event size overflow + uint64_t L1aF : 1; // L1A FIFO full + uint64_t InF : 1; // Input FIFO full + uint64_t EvtF : 1; // Event FIFO full + uint64_t VfWdCnt : 12; // VFAT word count (in number of 64-bit words) + uint64_t InputID : 5; // Input link ID + uint64_t CALIB_CHAN : 7; // Calibration channel number + uint64_t : 17; // unused + }; + }; + + union GEBchamberTrailer { + uint64_t word; + struct { + uint64_t ecOH : 20; // NOT USED - OptoHybrid event counter + uint64_t bcOH : 13; // NOT USED - OptoHybrid bunch crossing + uint64_t InUfw : 1; // Input FIFO underflow + uint64_t SkD : 1; // NOT USED - Stuck data + uint64_t EvUfw : 1; // NOT USED - Event FIFO underflow + uint64_t VfWdCntT : 12; // VFAT word count (in number of 64-bit words) + uint64_t crc16 : 16; // CRC of OptoHybrid data (currently not available – filled with 0) + }; + }; + + GEMOptoHybrid() : ch_(0), ct_(0){}; + ~GEMOptoHybrid() { vfatd_.clear(); } + + //!Read chamberHeader from the block. + void setChamberHeader(uint64_t word) { ch_ = word; } + void setChamberHeader(uint16_t vfatWordCnt, uint8_t inputID) { + GEBchamberHeader u{0}; + u.VfWdCnt = vfatWordCnt; + u.InputID = inputID; + ch_ = u.word; + } + uint64_t getChamberHeader() const { return ch_; } + + //!Read chamberTrailer from the block. + void setChamberTrailer(uint64_t word) { ct_ = word; } + void setChamberTrailer(uint32_t ecOH, uint16_t bcOH, uint16_t vfatWordCntT) { + GEBchamberTrailer u{0}; + u.ecOH = ecOH; + u.bcOH = bcOH; + u.VfWdCntT = vfatWordCntT; + ct_ = u.word; + } + uint64_t getChamberTrailer() const { return ct_; } + + uint16_t vfatWordCnt() const { return GEBchamberHeader{ch_}.VfWdCnt; } + uint8_t inputID() const { return GEBchamberHeader{ch_}.InputID; } + uint16_t vfatWordCntT() const { return GEBchamberTrailer{ct_}.VfWdCntT; } + + bool bxmVvV() const { return GEBchamberHeader{ch_}.BxmVvV; } + bool bxmAvV() const { return GEBchamberHeader{ch_}.BxmAvV; } + bool oOScVvV() const { return GEBchamberHeader{ch_}.OOScVvV; } + bool oOScAvV() const { return GEBchamberHeader{ch_}.OOScAvV; } + bool inv() const { return GEBchamberHeader{ch_}.Inv; } + bool evtSzW() const { return GEBchamberHeader{ch_}.EvtSzW; } + bool l1aNF() const { return GEBchamberHeader{ch_}.L1aNF; } + bool inNF() const { return GEBchamberHeader{ch_}.InNF; } + bool evtNF() const { return GEBchamberHeader{ch_}.EvtNF; } + bool evtSzOFW() const { return GEBchamberHeader{ch_}.EvtSzOFW; } + bool l1aF() const { return GEBchamberHeader{ch_}.L1aF; } + bool inF() const { return GEBchamberHeader{ch_}.InF; } + bool evtF() const { return GEBchamberHeader{ch_}.EvtF; } + bool inUfw() const { return GEBchamberTrailer{ct_}.InUfw; } + + bool noVFAT() const { return false; } // to be removed + bool stuckData() const { return false; } // to be removed + bool evUfw() const { return false; } // to be removed + + //!Adds VFAT data to the vector + void addVFAT(GEMVFAT v) { vfatd_.push_back(v); } + //!Returns the vector of VFAT data + const std::vector* vFATs() const { return &vfatd_; } + //!Clear the vector rof VFAT data + void clearVFATs() { vfatd_.clear(); } + + static const int sizeGebID = 5; + +private: + uint64_t ch_; // GEBchamberHeader + uint64_t ct_; // GEBchamberTrailer + + std::vector vfatd_; +}; +#endif diff --git a/DataFormats/GEMDigi/interface/GEMVFAT.h b/DataFormats/GEMDigi/interface/GEMVFAT.h new file mode 100644 index 0000000000000..94811bac22e2b --- /dev/null +++ b/DataFormats/GEMDigi/interface/GEMVFAT.h @@ -0,0 +1,128 @@ +#ifndef DataFormats_GEMDigi_GEMVFAT_h +#define DataFormats_GEMDigi_GEMVFAT_h +#include + +class GEMVFAT { +public: + /// VFAT data structure - 3 words of 64 bits each + union VFATfirst { + uint64_t word; + // v3 dataformat + struct { + uint64_t msData1 : 16; /// #include @@ -25,7 +25,7 @@ class GEMVFATStatus { }; GEMVFATStatus() {} - GEMVFATStatus(const gem::AMCdata& amc, const gem::VFATdata& vfat, uint16_t position, bool readMultiBX) { + GEMVFATStatus(const GEMAMC& amc, const GEMVFAT& vfat, uint16_t position, bool readMultiBX) { Errors error{0}; Warnings warn{0}; diff --git a/DataFormats/GEMDigi/interface/GEMVfatStatusDigi.h b/DataFormats/GEMDigi/interface/GEMVfatStatusDigi.h deleted file mode 100644 index 6cb72edbef637..0000000000000 --- a/DataFormats/GEMDigi/interface/GEMVfatStatusDigi.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef DataFormats_GEMDigi_GEMVfatStatusDigi_H -#define DataFormats_GEMDigi_GEMVfatStatusDigi_H - -#include -#include "DataFormats/GEMDigi/interface/VFATdata.h" - -class GEMVfatStatusDigi { -public: - GEMVfatStatusDigi(gem::VFATdata &vfat); - GEMVfatStatusDigi() {} - - uint8_t quality() const { return quality_; } - uint8_t flag() const { return flag_; } - int phi() const { return phi_; } - uint16_t bc() const { return bc_; } - uint8_t ec() const { return ec_; } - -private: - uint8_t quality_; /// quality flag - bit: 0 good, 1 crc fail, 2 b1010 fail, 3 b1100 fail, 4 b1110 - uint8_t flag_; /// Control Flags: 4 bits, Hamming Error/AFULL/SEUlogic/SUEI2C - int phi_; /// vfat local phi postion in chamber - uint16_t bc_; - uint8_t ec_; -}; -#endif diff --git a/DataFormats/GEMDigi/interface/GEMVfatStatusDigiCollection.h b/DataFormats/GEMDigi/interface/GEMVfatStatusDigiCollection.h deleted file mode 100644 index 2fd3b2527b8bc..0000000000000 --- a/DataFormats/GEMDigi/interface/GEMVfatStatusDigiCollection.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef DataFormats_GEMDigi_GEMVfatStatusDigiCollection_h -#define DataFormats_GEMDigi_GEMVfatStatusDigiCollection_h - -#include "DataFormats/GEMDigi/interface/GEMVfatStatusDigi.h" -#include "DataFormats/MuonDetId/interface/GEMDetId.h" -#include "DataFormats/MuonData/interface/MuonDigiCollection.h" - -typedef MuonDigiCollection GEMVfatStatusDigiCollection; - -#endif diff --git a/DataFormats/GEMDigi/interface/VFATdata.h b/DataFormats/GEMDigi/interface/VFATdata.h deleted file mode 100644 index 64f59f482038d..0000000000000 --- a/DataFormats/GEMDigi/interface/VFATdata.h +++ /dev/null @@ -1,130 +0,0 @@ -#ifndef DataFormats_GEMDigi_VFATdata_h -#define DataFormats_GEMDigi_VFATdata_h - -#include - -namespace gem { - /// VFAT data structure - 3 words of 64 bits each - union VFATfirst { - uint64_t word; - // v3 dataformat - struct { - uint64_t msData1 : 16; /// -#include "DataFormats/GEMDigi/interface/AMCdata.h" +#include "DataFormats/GEMDigi/interface/GEMAMC.h" #include -using namespace gem; -void AMCdata::setAMCheader1(uint32_t dataLength, uint16_t bxID, uint32_t l1AID, uint8_t AMCnum) { +void GEMAMC::setAMCheader1(uint32_t dataLength, uint16_t bxID, uint32_t l1AID, uint8_t AMCnum) { AMCheader1 u{0}; u.dataLength = dataLength; u.bxID = bxID; @@ -17,7 +16,7 @@ void AMCdata::setAMCheader1(uint32_t dataLength, uint16_t bxID, uint32_t l1AID, amct_ = ut.word; } -void AMCdata::setAMCheader2(uint16_t boardID, uint16_t orbitNum, uint8_t runType) { +void GEMAMC::setAMCheader2(uint16_t boardID, uint16_t orbitNum, uint8_t runType) { AMCheader2 u{0}; u.boardID = boardID; u.orbitNum = orbitNum; @@ -25,7 +24,7 @@ void AMCdata::setAMCheader2(uint16_t boardID, uint16_t orbitNum, uint8_t runType amch2_ = u.word; } -void AMCdata::setGEMeventHeader(uint8_t davCnt, uint32_t davList) { +void GEMAMC::setGEMeventHeader(uint8_t davCnt, uint32_t davList) { EventHeader u{0}; u.davCnt = davCnt; u.davList = davList; diff --git a/DataFormats/GEMDigi/src/AMC13Event.cc b/DataFormats/GEMDigi/src/GEMAMC13.cc similarity index 60% rename from DataFormats/GEMDigi/src/AMC13Event.cc rename to DataFormats/GEMDigi/src/GEMAMC13.cc index 171af2c09a919..2d357995aaf1a 100644 --- a/DataFormats/GEMDigi/src/AMC13Event.cc +++ b/DataFormats/GEMDigi/src/GEMAMC13.cc @@ -1,9 +1,7 @@ #include -#include "DataFormats/GEMDigi/interface/AMC13Event.h" +#include "DataFormats/GEMDigi/interface/GEMAMC13.h" -using namespace gem; - -void AMC13Event::setCDFHeader(uint8_t Evt_ty, uint32_t LV1_id, uint16_t BX_id, uint16_t Source_id) { +void GEMAMC13::setCDFHeader(uint8_t Evt_ty, uint32_t LV1_id, uint16_t BX_id, uint16_t Source_id) { CDFHeader u{0}; u.cb5 = 0x5; u.eventType = Evt_ty; @@ -13,7 +11,7 @@ void AMC13Event::setCDFHeader(uint8_t Evt_ty, uint32_t LV1_id, uint16_t BX_id, u cdfh_ = u.word; } -void AMC13Event::setAMC13Header(uint8_t CalTyp, uint8_t nAMC, uint32_t OrN) { +void GEMAMC13::setAMC13Header(uint8_t CalTyp, uint8_t nAMC, uint32_t OrN) { AMC13Header u{0}; u.cb0 = 0x0; u.calType = CalTyp; @@ -22,7 +20,7 @@ void AMC13Event::setAMC13Header(uint8_t CalTyp, uint8_t nAMC, uint32_t OrN) { amc13h_ = u.word; } -void AMC13Event::setAMC13Trailer(uint8_t Blk_NoT, uint8_t LV1_idT, uint16_t BX_idT) { +void GEMAMC13::setAMC13Trailer(uint8_t Blk_NoT, uint8_t LV1_idT, uint16_t BX_idT) { AMC13Trailer u{0}; u.blkN = Blk_NoT; u.lv1IdT = LV1_idT; @@ -30,7 +28,7 @@ void AMC13Event::setAMC13Trailer(uint8_t Blk_NoT, uint8_t LV1_idT, uint16_t BX_i amc13t_ = u.word; } -void AMC13Event::setCDFTrailer(uint32_t EvtLength) { +void GEMAMC13::setCDFTrailer(uint32_t EvtLength) { CDFTrailer u{0}; u.cbA = 0xA; u.eventType = CDFHeader{cdfh_}.eventType; @@ -38,9 +36,9 @@ void AMC13Event::setCDFTrailer(uint32_t EvtLength) { cdft_ = u.word; } -void AMC13Event::addAMCheader(uint64_t word) { amcHeaders_.push_back(word); } +void GEMAMC13::addAMCheader(uint64_t word) { amcHeaders_.push_back(word); } -void AMC13Event::addAMCheader(uint32_t AMC_size, uint8_t Blk_No, uint8_t AMC_No, uint16_t BoardID) { +void GEMAMC13::addAMCheader(uint32_t AMC_size, uint8_t Blk_No, uint8_t AMC_No, uint16_t BoardID) { // AMC Header word // 55 - 32 | 27 - 20 | 19 - 16 | 15 - 0 | // AMC_size | Blk_No | AMC_No | BoardID | diff --git a/DataFormats/GEMDigi/src/VFATdata.cc b/DataFormats/GEMDigi/src/GEMVFAT.cc similarity index 82% rename from DataFormats/GEMDigi/src/VFATdata.cc rename to DataFormats/GEMDigi/src/GEMVFAT.cc index 41ad6e81124f5..1282be867d96b 100644 --- a/DataFormats/GEMDigi/src/VFATdata.cc +++ b/DataFormats/GEMDigi/src/GEMVFAT.cc @@ -1,15 +1,14 @@ -#include "DataFormats/GEMDigi/interface/VFATdata.h" +#include "DataFormats/GEMDigi/interface/GEMVFAT.h" #include -using namespace gem; -VFATdata::VFATdata() : ver_(0), phiPos_(0), fw_(0), sw_(0), tw_(0) {} +GEMVFAT::GEMVFAT() : ver_(0), phiPos_(0), fw_(0), sw_(0), tw_(0) {} -VFATdata::VFATdata(const int vfatVer, - const uint16_t BC, - const uint32_t EC, - const uint16_t chipID, - const uint64_t lsDatas, - const uint64_t msDatas) { +GEMVFAT::GEMVFAT(const int vfatVer, + const uint16_t BC, + const uint32_t EC, + const uint16_t chipID, + const uint64_t lsDatas, + const uint64_t msDatas) { // this constructor only used for packing sim digis VFATfirst fw{0}; VFATsecond sw{0}; @@ -47,7 +46,7 @@ VFATdata::VFATdata(const int vfatVer, tw_ = tw.word; } -uint8_t VFATdata::quality() { +uint8_t GEMVFAT::quality() { uint8_t q = 0; if (ver_ == 2) { if (VFATthird{tw_}.crc != checkCRC()) @@ -63,7 +62,7 @@ uint8_t VFATdata::quality() { return q; } -uint16_t VFATdata::crc_cal(uint16_t crc_in, uint16_t dato) { +uint16_t GEMVFAT::crc_cal(uint16_t crc_in, uint16_t dato) { uint16_t v = 0x0001; uint16_t mask = 0x0001; uint16_t d = 0x0000; @@ -83,7 +82,7 @@ uint16_t VFATdata::crc_cal(uint16_t crc_in, uint16_t dato) { return crc_temp; } -uint16_t VFATdata::checkCRC() { +uint16_t GEMVFAT::checkCRC() { uint16_t vfatBlockWords[12]; vfatBlockWords[11] = ((0x000f & VFATfirst{fw_}.b1010) << 12) | VFATfirst{fw_}.bcV2; vfatBlockWords[10] = diff --git a/DataFormats/GEMDigi/src/GEMVfatStatusDigi.cc b/DataFormats/GEMDigi/src/GEMVfatStatusDigi.cc deleted file mode 100644 index 0f39fc7488787..0000000000000 --- a/DataFormats/GEMDigi/src/GEMVfatStatusDigi.cc +++ /dev/null @@ -1,10 +0,0 @@ -#include "DataFormats/GEMDigi/interface/GEMVfatStatusDigi.h" -#include - -GEMVfatStatusDigi::GEMVfatStatusDigi(gem::VFATdata &vfat) { - quality_ = vfat.quality(); - flag_ = vfat.flag(); - phi_ = vfat.phi(); - ec_ = vfat.ec(); - bc_ = vfat.bc(); -}; diff --git a/DataFormats/GEMDigi/src/classes.h b/DataFormats/GEMDigi/src/classes.h index f3ae200dca21e..1d516137794a2 100644 --- a/DataFormats/GEMDigi/src/classes.h +++ b/DataFormats/GEMDigi/src/classes.h @@ -22,18 +22,6 @@ #include "DataFormats/GEMDigi/interface/GEMVFATStatus.h" #include "DataFormats/GEMDigi/interface/GEMVFATStatusCollection.h" -#include "DataFormats/GEMDigi/interface/GEMVfatStatusDigi.h" -#include "DataFormats/GEMDigi/interface/GEMVfatStatusDigiCollection.h" - -#include "DataFormats/GEMDigi/interface/GEBdata.h" -#include "DataFormats/GEMDigi/interface/GEMGEBdataCollection.h" - -#include "DataFormats/GEMDigi/interface/AMCdata.h" -#include "DataFormats/GEMDigi/interface/GEMAMCdataCollection.h" - -#include "DataFormats/GEMDigi/interface/AMC13Event.h" -#include "DataFormats/GEMDigi/interface/GEMAMC13EventCollection.h" - #include "DataFormats/GEMDigi/interface/ME0DigiPreReco.h" #include "DataFormats/GEMDigi/interface/ME0DigiPreRecoCollection.h" diff --git a/DataFormats/GEMDigi/src/classes_def.xml b/DataFormats/GEMDigi/src/classes_def.xml index c21b9c62bad44..2046f2f9f66b6 100644 --- a/DataFormats/GEMDigi/src/classes_def.xml +++ b/DataFormats/GEMDigi/src/classes_def.xml @@ -78,43 +78,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/EventFilter/GEMRawToDigi/interface/GEMRawToDigi.h b/EventFilter/GEMRawToDigi/interface/GEMRawToDigi.h index f5997127a4756..075cb4b14e112 100644 --- a/EventFilter/GEMRawToDigi/interface/GEMRawToDigi.h +++ b/EventFilter/GEMRawToDigi/interface/GEMRawToDigi.h @@ -4,11 +4,11 @@ * \author J. Lee, Yechan Kang - UoS */ #include -#include "DataFormats/GEMDigi/interface/AMC13Event.h" +#include "DataFormats/GEMDigi/interface/GEMAMC13.h" class GEMRawToDigi { public: - std::unique_ptr convertWordToAMC13Event(const uint64_t* word); + std::unique_ptr convertWordToGEMAMC13(const uint64_t* word); bool vfatError() const { return vfatError_; } bool amcError() const { return amcError_; } diff --git a/EventFilter/GEMRawToDigi/plugins/GEMDigiToRawModule.cc b/EventFilter/GEMRawToDigi/plugins/GEMDigiToRawModule.cc index ec3f76c8ba5e3..45323c8af0522 100644 --- a/EventFilter/GEMRawToDigi/plugins/GEMDigiToRawModule.cc +++ b/EventFilter/GEMRawToDigi/plugins/GEMDigiToRawModule.cc @@ -13,7 +13,7 @@ #include "DataFormats/FEDRawData/interface/FEDRawData.h" #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h" #include "DataFormats/FEDRawData/interface/FEDTrailer.h" -#include "DataFormats/GEMDigi/interface/AMC13Event.h" +#include "DataFormats/GEMDigi/interface/GEMAMC13.h" #include "DataFormats/GEMDigi/interface/GEMDigiCollection.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" @@ -49,8 +49,6 @@ class GEMDigiToRawModule : public edm::global::EDProducer("eventType")), digi_token(consumes(pset.getParameter("gemDigi"))), @@ -97,15 +95,15 @@ void GEMDigiToRawModule::produce(edm::StreamID iID, edm::Event& iEvent, edm::Eve auto gemROMap = runCache(iEvent.getRun().index()); - std::vector> amc13Events; - amc13Events.reserve(FEDNumbering::MAXGEMFEDID - FEDNumbering::MINGEMFEDID + 1); + std::vector> amc13s; + amc13s.reserve(FEDNumbering::MAXGEMFEDID - FEDNumbering::MINGEMFEDID + 1); int LV1_id = iEvent.id().event(); uint8_t BX_id(iEvent.bunchCrossing()); int OrN = iEvent.orbitNumber(); // making map of bx GEMDigiCollection - // each bx will be saved as new AMC13Event, so GEMDigiCollection needs to be split into bx + // each bx will be saved as new GEMAMC13, so GEMDigiCollection needs to be split into bx std::map gemBxMap; for (auto const& etaPart : *gemDigis) { GEMDetId gemId = etaPart.first; @@ -125,14 +123,14 @@ void GEMDigiToRawModule::produce(edm::StreamID iID, edm::Event& iEvent, edm::Eve for (unsigned int fedId = FEDNumbering::MINGEMFEDID; fedId <= FEDNumbering::MAXGEMFEDID; ++fedId) { uint32_t amc13EvtLength = 0; - std::unique_ptr amc13Event = std::make_unique(); + std::unique_ptr amc13 = std::make_unique(); for (uint8_t amcNum = 0; amcNum <= GEMeMap::maxAMCs_; ++amcNum) { uint32_t amcSize = 0; - std::unique_ptr amcData = std::make_unique(); + std::unique_ptr amc = std::make_unique(); for (uint8_t gebId = 0; gebId <= GEMeMap::maxGEBs_; ++gebId) { - std::unique_ptr gebData = std::make_unique(); + std::unique_ptr optoH = std::make_unique(); GEMROMapping::chamEC geb_ec{fedId, amcNum, gebId}; if (!gemROMap->isValidChamber(geb_ec)) @@ -182,47 +180,47 @@ void GEMDigiToRawModule::produce(edm::StreamID iID, edm::Event& iEvent, edm::Eve continue; // only make vfat with hits amcSize += 3; - auto vfatData = std::make_unique(geb_dc.vfatVer, bc, LV1_id, vfatId, lsData, msData); - gebData->addVFAT(*vfatData); + auto vfat = std::make_unique(geb_dc.vfatVer, bc, LV1_id, vfatId, lsData, msData); + optoH->addVFAT(*vfat); } } // end of vfats in GEB - if (!gebData->vFATs()->empty()) { + if (!optoH->vFATs()->empty()) { amcSize += 2; - gebData->setChamberHeader(gebData->vFATs()->size() * 3, gebId); - gebData->setChamberTrailer(LV1_id, BX_id, gebData->vFATs()->size() * 3); - amcData->addGEB(*gebData); + optoH->setChamberHeader(optoH->vFATs()->size() * 3, gebId); + optoH->setChamberTrailer(LV1_id, BX_id, optoH->vFATs()->size() * 3); + amc->addGEB(*optoH); } } // end of GEB loop - if (!amcData->gebs()->empty()) { + if (!amc->gebs()->empty()) { amcSize += 5; - amcData->setAMCheader1(amcSize, BX_id, LV1_id, amcNum); - amcData->setAMCheader2(amcNum, OrN, 1); - amcData->setGEMeventHeader(amcData->gebs()->size(), 0); - amc13Event->addAMCpayload(*amcData); - // AMC header in AMC13Event - amc13Event->addAMCheader(amcSize, 0, amcNum, 0); + amc->setAMCheader1(amcSize, BX_id, LV1_id, amcNum); + amc->setAMCheader2(amcNum, OrN, 1); + amc->setGEMeventHeader(amc->gebs()->size(), 0); + amc13->addAMCpayload(*amc); + // AMC header in GEMAMC13 + amc13->addAMCheader(amcSize, 0, amcNum, 0); amc13EvtLength += amcSize + 1; // AMC data size + AMC header size } } // end of AMC loop - if (!amc13Event->getAMCpayloads()->empty()) { + if (!amc13->getAMCpayloads()->empty()) { // CDFHeader - amc13Event->setCDFHeader(event_type_, LV1_id, BX_id, fedId); + amc13->setCDFHeader(event_type_, LV1_id, BX_id, fedId); // AMC13header - uint8_t nAMC = amc13Event->getAMCpayloads()->size(); - amc13Event->setAMC13Header(1, nAMC, OrN); - amc13Event->setAMC13Trailer(BX_id, LV1_id, BX_id); + uint8_t nAMC = amc13->getAMCpayloads()->size(); + amc13->setAMC13Header(1, nAMC, OrN); + amc13->setAMC13Trailer(BX_id, LV1_id, BX_id); //CDF trailer uint32_t EvtLength = amc13EvtLength + 4; // 2 header and 2 trailer - amc13Event->setCDFTrailer(EvtLength); - amc13Events.emplace_back(std::move(amc13Event)); - } // finished making amc13Event data + amc13->setCDFTrailer(EvtLength); + amc13s.emplace_back(std::move(amc13)); + } // finished making amc13 data } // end of FED loop - // read out amc13Events into fedRawData - for (const auto& amc13e : amc13Events) { + // read out amc13s into fedRawData + for (const auto& amc13e : amc13s) { std::vector words; words.emplace_back(amc13e->getCDFHeader()); words.emplace_back(amc13e->getAMC13Header()); diff --git a/EventFilter/GEMRawToDigi/plugins/GEMRawToDigiModule.cc b/EventFilter/GEMRawToDigi/plugins/GEMRawToDigiModule.cc index 3b1e04ea88291..668a86868a26c 100644 --- a/EventFilter/GEMRawToDigi/plugins/GEMRawToDigiModule.cc +++ b/EventFilter/GEMRawToDigi/plugins/GEMRawToDigiModule.cc @@ -15,13 +15,7 @@ #include "DataFormats/GEMDigi/interface/GEMAMCStatusCollection.h" #include "DataFormats/GEMDigi/interface/GEMOHStatusCollection.h" #include "DataFormats/GEMDigi/interface/GEMVFATStatusCollection.h" -#include "DataFormats/GEMDigi/interface/AMC13Event.h" -#include "DataFormats/GEMDigi/interface/GEMAMC13EventCollection.h" -#include "DataFormats/GEMDigi/interface/GEMAMCdataCollection.h" #include "DataFormats/GEMDigi/interface/GEMDigiCollection.h" -#include "DataFormats/GEMDigi/interface/GEMGEBdataCollection.h" -#include "DataFormats/GEMDigi/interface/GEMVfatStatusDigiCollection.h" -#include "DataFormats/GEMDigi/interface/VFATdata.h" #include "EventFilter/GEMRawToDigi/interface/GEMRawToDigi.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" @@ -59,14 +53,11 @@ class GEMRawToDigiModule : public edm::global::EDProducer(pset.getParameter("InputLabel"))), useDBEMap_(pset.getParameter("useDBEMap")), keepDAQStatus_(pset.getParameter("keepDAQStatus")), readMultiBX_(pset.getParameter("readMultiBX")), - unPackStatusDigis_(pset.getParameter("unPackStatusDigis")), gemRawToDigi_(std::make_unique()) { produces(); if (keepDAQStatus_) { @@ -75,13 +66,6 @@ GEMRawToDigiModule::GEMRawToDigiModule(const edm::ParameterSet& pset) produces("OHStatus"); produces("VFATStatus"); } - if (unPackStatusDigis_) { - // to be removed - produces("vfatStatus"); - produces("gebStatus"); - produces("AMCdata"); - produces("AMC13Event"); - } if (useDBEMap_) { gemEMapToken_ = esConsumes(); } @@ -91,7 +75,6 @@ void GEMRawToDigiModule::fillDescriptions(edm::ConfigurationDescriptions& descri edm::ParameterSetDescription desc; desc.add("InputLabel", edm::InputTag("rawDataCollector")); desc.add("useDBEMap", false); - desc.add("unPackStatusDigis", false); desc.add("keepDAQStatus", false); desc.add("readMultiBX", false); descriptions.add("muonGEMDigisDefault", desc); @@ -120,12 +103,6 @@ void GEMRawToDigiModule::produce(edm::StreamID iID, edm::Event& iEvent, edm::Eve auto outOHStatus = std::make_unique(); auto outVFATStatus = std::make_unique(); - // to be removed - auto outVFATStatusOld = std::make_unique(); - auto outGEBStatus = std::make_unique(); - auto outAMCdata = std::make_unique(); - auto outAMC13Event = std::make_unique(); - // Take raw from the event edm::Handle fed_buffers; iEvent.getByToken(fed_token, fed_buffers); @@ -147,23 +124,22 @@ void GEMRawToDigiModule::produce(edm::StreamID iID, edm::Event& iEvent, edm::Eve } const uint64_t* word = reinterpret_cast(fedData.data()); - auto amc13Event = gemRawToDigi_->convertWordToAMC13Event(word); + auto amc13 = gemRawToDigi_->convertWordToGEMAMC13(word); LogDebug("GEMRawToDigiModule") << "Event bx:" << iEvent.bunchCrossing() << " lv1Id:" << iEvent.id().event() << " orbitNumber:" << iEvent.orbitNumber(); - LogDebug("GEMRawToDigiModule") << "AMC13 bx:" << amc13Event->bunchCrossing() - << " lv1Id:" << int(amc13Event->lv1Id()) - << " orbitNumber:" << amc13Event->orbitNumber(); + LogDebug("GEMRawToDigiModule") << "AMC13 bx:" << amc13->bunchCrossing() << " lv1Id:" << int(amc13->lv1Id()) + << " orbitNumber:" << amc13->orbitNumber(); // Read AMC data - for (auto amcData : *(amc13Event->getAMCpayloads())) { - uint8_t amcNum = amcData.amcNum(); + for (const auto& amc : *(amc13->getAMCpayloads())) { + uint8_t amcNum = amc.amcNum(); GEMROMapping::sectorEC amcEC{fedId, amcNum}; if (!gemROMap->isValidAMC(amcEC)) { st_amc13.inValidAMC(); continue; } - GEMAMCStatus st_amc(amc13Event.get(), amcData); + GEMAMCStatus st_amc(amc13.get(), amc); if (st_amc.isBad()) { LogDebug("GEMRawToDigiModule") << st_amc; if (keepDAQStatus_) { @@ -172,13 +148,12 @@ void GEMRawToDigiModule::produce(edm::StreamID iID, edm::Event& iEvent, edm::Eve continue; } - uint16_t amcBx = amcData.bunchCrossing(); - LogDebug("GEMRawToDigiModule") << "AMC no.:" << int(amcData.amcNum()) << " bx:" << int(amcData.bunchCrossing()) - << " lv1Id:" << int(amcData.lv1Id()) - << " orbitNumber:" << int(amcData.orbitNumber()); + uint16_t amcBx = amc.bunchCrossing(); + LogDebug("GEMRawToDigiModule") << "AMC no.:" << int(amc.amcNum()) << " bx:" << int(amc.bunchCrossing()) + << " lv1Id:" << int(amc.lv1Id()) << " orbitNumber:" << int(amc.orbitNumber()); // Read GEB data - for (auto optoHybrid : *amcData.gebs()) { + for (const auto& optoHybrid : *amc.gebs()) { uint8_t gebId = optoHybrid.inputID(); GEMROMapping::chamEC geb_ec{fedId, amcNum, gebId}; @@ -199,10 +174,10 @@ void GEMRawToDigiModule::produce(edm::StreamID iID, edm::Event& iEvent, edm::Eve } //Read vfat data - for (auto vfatData : *optoHybrid.vFATs()) { + for (auto vfat : *optoHybrid.vFATs()) { // set vfat fw version - vfatData.setVersion(geb_dc.vfatVer); - uint16_t vfatId = vfatData.vfatId(); + vfat.setVersion(geb_dc.vfatVer); + uint16_t vfatId = vfat.vfatId(); GEMROMapping::vfatEC vfat_ec{vfatId, gemChId}; if (!gemROMap->isValidChipID(vfat_ec)) { @@ -211,10 +186,10 @@ void GEMRawToDigiModule::produce(edm::StreamID iID, edm::Event& iEvent, edm::Eve } GEMROMapping::vfatDC vfat_dc = gemROMap->vfatPos(vfat_ec); - vfatData.setPhi(vfat_dc.localPhi); + vfat.setPhi(vfat_dc.localPhi); GEMDetId gemId = vfat_dc.detId; - GEMVFATStatus st_vfat(amcData, vfatData, vfatData.phi(), readMultiBX_); + GEMVFATStatus st_vfat(amc, vfat, vfat.phi(), readMultiBX_); if (st_vfat.isBad()) { LogDebug("GEMRawToDigiModule") << st_vfat; if (keepDAQStatus_) { @@ -223,14 +198,14 @@ void GEMRawToDigiModule::produce(edm::StreamID iID, edm::Event& iEvent, edm::Eve continue; } - int bx(vfatData.bc() - amcBx); + int bx(vfat.bc() - amcBx); - for (int chan = 0; chan < VFATdata::nChannels; ++chan) { + for (int chan = 0; chan < GEMVFAT::nChannels; ++chan) { uint8_t chan0xf = 0; if (chan < 64) - chan0xf = ((vfatData.lsData() >> chan) & 0x1); + chan0xf = ((vfat.lsData() >> chan) & 0x1); else - chan0xf = ((vfatData.msData() >> (chan - 64)) & 0x1); + chan0xf = ((vfat.msData() >> (chan - 64)) & 0x1); // no hits if (chan0xf == 0) @@ -239,7 +214,7 @@ void GEMRawToDigiModule::produce(edm::StreamID iID, edm::Event& iEvent, edm::Eve GEMROMapping::channelNum chMap{vfat_dc.vfatType, chan}; GEMROMapping::stripNum stMap = gemROMap->hitPos(chMap); - int stripId = stMap.stNum + vfatData.phi() * GEMeMap::maxChan_; + int stripId = stMap.stNum + vfat.phi() * GEMeMap::maxChan_; GEMDigi digi(stripId, bx); @@ -255,29 +230,18 @@ void GEMRawToDigiModule::produce(edm::StreamID iID, edm::Event& iEvent, edm::Eve if (keepDAQStatus_) { outVFATStatus.get()->insertDigi(gemId, st_vfat); } - if (unPackStatusDigis_) { - outVFATStatusOld.get()->insertDigi(gemId, GEMVfatStatusDigi(vfatData)); - } } // end of vfat loop if (keepDAQStatus_) { outOHStatus.get()->insertDigi(gemChId, st_oh); } - if (unPackStatusDigis_) { - optoHybrid.clearVFATs(); - outGEBStatus.get()->insertDigi(gemChId.chamberId(), (optoHybrid)); - } } // end of optohybrid loop if (keepDAQStatus_) { outAMCStatus.get()->insertDigi(fedId, st_amc); } - if (unPackStatusDigis_) { - amcData.clearGEBs(); - outAMCdata.get()->insertDigi(amcData.boardId(), (amcData)); - } } // end of amc loop @@ -285,11 +249,7 @@ void GEMRawToDigiModule::produce(edm::StreamID iID, edm::Event& iEvent, edm::Eve outAMC13Status.get()->insertDigi(fedId, st_amc13); } - if (unPackStatusDigis_) { - amc13Event->clearAMCpayloads(); - } - - } // end of amc13Event + } // end of amc13 iEvent.put(std::move(outGEMDigis)); @@ -299,11 +259,4 @@ void GEMRawToDigiModule::produce(edm::StreamID iID, edm::Event& iEvent, edm::Eve iEvent.put(std::move(outOHStatus), "OHStatus"); iEvent.put(std::move(outVFATStatus), "VFATStatus"); } - if (unPackStatusDigis_) { - // to be removed - iEvent.put(std::move(outVFATStatusOld), "vfatStatus"); - iEvent.put(std::move(outGEBStatus), "gebStatus"); - iEvent.put(std::move(outAMCdata), "AMCdata"); - iEvent.put(std::move(outAMC13Event), "AMC13Event"); - } } diff --git a/EventFilter/GEMRawToDigi/src/GEMRawToDigi.cc b/EventFilter/GEMRawToDigi/src/GEMRawToDigi.cc index 3151d7a180332..6adaaff75fdbf 100644 --- a/EventFilter/GEMRawToDigi/src/GEMRawToDigi.cc +++ b/EventFilter/GEMRawToDigi/src/GEMRawToDigi.cc @@ -3,56 +3,55 @@ */ #include "EventFilter/GEMRawToDigi/interface/GEMRawToDigi.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -using namespace gem; -std::unique_ptr GEMRawToDigi::convertWordToAMC13Event(const uint64_t* word) { +std::unique_ptr GEMRawToDigi::convertWordToGEMAMC13(const uint64_t* word) { vfatError_ = false; amcError_ = false; - auto amc13Event = std::make_unique(); + auto amc13 = std::make_unique(); - amc13Event->setCDFHeader(*word); - amc13Event->setAMC13Header(*(++word)); + amc13->setCDFHeader(*word); + amc13->setAMC13Header(*(++word)); // Readout out AMC headers - for (uint8_t i = 0; i < amc13Event->nAMC(); ++i) - amc13Event->addAMCheader(*(++word)); + for (uint8_t i = 0; i < amc13->nAMC(); ++i) + amc13->addAMCheader(*(++word)); // Readout out AMC payloads - for (uint8_t i = 0; i < amc13Event->nAMC(); ++i) { - auto amcData = AMCdata(); - amcData.setAMCheader1(*(++word)); - amcData.setAMCheader2(*(++word)); - amcData.setGEMeventHeader(*(++word)); + for (uint8_t i = 0; i < amc13->nAMC(); ++i) { + auto amc = GEMAMC(); + amc.setAMCheader1(*(++word)); + amc.setAMCheader2(*(++word)); + amc.setGEMeventHeader(*(++word)); // Fill GEB - for (uint8_t j = 0; j < amcData.davCnt(); ++j) { - auto gebData = GEBdata(); - gebData.setChamberHeader(*(++word)); + for (uint8_t j = 0; j < amc.davCnt(); ++j) { + auto oh = GEMOptoHybrid(); + oh.setChamberHeader(*(++word)); // Fill vfat - for (uint16_t k = 0; k < gebData.vfatWordCnt() / 3; k++) { - auto vfatData = VFATdata(); - vfatData.read_fw(*(++word)); - vfatData.read_sw(*(++word)); - vfatData.read_tw(*(++word)); - gebData.addVFAT(vfatData); + for (uint16_t k = 0; k < oh.vfatWordCnt() / 3; k++) { + auto vfat = GEMVFAT(); + vfat.read_fw(*(++word)); + vfat.read_sw(*(++word)); + vfat.read_tw(*(++word)); + oh.addVFAT(vfat); } // end of vfat loop - gebData.setChamberTrailer(*(++word)); - amcData.addGEB(gebData); + oh.setChamberTrailer(*(++word)); + amc.addGEB(oh); } // end of geb loop - amcData.setGEMeventTrailer(*(++word)); - amcData.setAMCTrailer(*(++word)); - amc13Event->addAMCpayload(amcData); + amc.setGEMeventTrailer(*(++word)); + amc.setAMCTrailer(*(++word)); + amc13->addAMCpayload(amc); } // end of amc loop - amc13Event->setAMC13Trailer(*(++word)); - amc13Event->setCDFTrailer(*(++word)); + amc13->setAMC13Trailer(*(++word)); + amc13->setCDFTrailer(*(++word)); - return amc13Event; + return amc13; } diff --git a/EventFilter/GEMRawToDigi/test/gemUnPackerTester.py b/EventFilter/GEMRawToDigi/test/gemUnPackerTester.py index ac7bfdfeab3e1..b21d5f3d2820f 100755 --- a/EventFilter/GEMRawToDigi/test/gemUnPackerTester.py +++ b/EventFilter/GEMRawToDigi/test/gemUnPackerTester.py @@ -1,8 +1,6 @@ import FWCore.ParameterSet.Config as cms -from Configuration.Eras.Era_Run3_cff import Run3 -from Configuration.Eras.Era_Phase2C11I13M9_cff import Phase2C11I13M9 -process = cms.Process('gemTester', Phase2C11I13M9) +process = cms.Process('gemTester') process.load('FWCore.MessageService.MessageLogger_cfi') process.load('Configuration.StandardSequences.DigiToRaw_cff') @@ -11,14 +9,13 @@ process.load('Configuration.EventContent.EventContent_cff') process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') -process.maxEvents.input = cms.untracked.int32(10) +process.maxEvents.input = cms.untracked.int32(1000) from Configuration.AlCa.GlobalTag import GlobalTag -process.GlobalTag = GlobalTag(process.GlobalTag, '113X_mcRun4_realistic_v4', '') process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '') -#process.gemPacker.useDBEMap = True -#process.muonGEMDigis.readMultiBX = True +process.gemPacker.useDBEMap = False +process.muonGEMDigis.readMultiBX = True process.muonGEMDigis.useDBEMap = process.gemPacker.useDBEMap process.muonGEMDigis.keepDAQStatus = True @@ -49,5 +46,5 @@ process.p = cms.Path(process.gemPacker+process.rawDataCollector+process.muonGEMDigis+process.GEMPackingTester) -print 'useDBEMap', process.gemPacker.useDBEMap, process.muonGEMDigis.useDBEMap -print 'readMultiBX', process.muonGEMDigis.readMultiBX +print('useDBEMap', process.gemPacker.useDBEMap, process.muonGEMDigis.useDBEMap) +print('readMultiBX', process.muonGEMDigis.readMultiBX)