File indexing completed on 2024-04-06 12:10:56
0001 #ifndef EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDChannel_H
0002 #define EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDChannel_H
0003
0004 #include "EventFilter/Phase2TrackerRawToDigi/interface/Phase2TrackerFEDDAQHeader.h"
0005 #include "EventFilter/Phase2TrackerRawToDigi/interface/Phase2TrackerFEDDAQTrailer.h"
0006 #include <cstdint>
0007
0008 namespace Phase2Tracker {
0009
0010
0011
0012 class Phase2TrackerFEDChannel {
0013
0014 class Phase2TrackerFEDBuffer;
0015
0016 public:
0017 Phase2TrackerFEDChannel(const uint8_t* const data, const size_t offset, const uint16_t length)
0018 : data_(data), offset_(offset), length_(length) {}
0019
0020
0021 Phase2TrackerFEDChannel(const uint8_t* const data, const size_t offset);
0022 uint16_t length() const { return length_; }
0023 const uint8_t* data() const { return data_; }
0024 size_t offset() const { return offset_; }
0025 uint16_t cmMedian(const uint8_t apvIndex) const;
0026
0027 private:
0028 friend class Phase2TrackerFEDBuffer;
0029
0030 uint8_t packetCode() const;
0031 const uint8_t* data_;
0032 size_t offset_;
0033 uint16_t length_;
0034 };
0035
0036 }
0037
0038 #endif