File indexing completed on 2024-04-06 12:10:22
0001
0002
0003
0004
0005 #ifndef EventFilter_CSCRawToDigi_CSCDCCHeader_h
0006 #define EventFilter_CSCRawToDigi_CSCDCCHeader_h
0007
0008 #include <cstdint>
0009 #include <cstring>
0010 #include <string> //for bzero
0011 #include "DataFormats/CSCDigi/interface/CSCDCCStatusDigi.h"
0012
0013 class CSCDCCHeader {
0014 public:
0015 CSCDCCHeader(int bx, int l1a, int sourceId, int version = 0);
0016 CSCDCCHeader();
0017 CSCDCCHeader(const CSCDCCStatusDigi& digi);
0018
0019 void setFromBuffer(uint16_t const* buf) { memcpy(this, buf, sizeInWords() * 2); }
0020
0021 int getCDFEventNumber() const;
0022 int getCDFSourceId() const;
0023 int getCDFFOV() const;
0024 int getCDFEventType() const;
0025 int getCDFBunchCounter() const;
0026 void setDAV(int dduSlot);
0027 bool check() const { return true ; }
0028 unsigned short* data() { return (short unsigned*)word; }
0029 static unsigned sizeInWords() { return 8; }
0030
0031
0032 friend class CSCDDUEventData;
0033
0034 private:
0035 unsigned long long word[2];
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058 };
0059 #endif