CMS 3D CMS Logo

Phase2TrackerFEDChannel.h
Go to the documentation of this file.
1 #ifndef EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDChannel_H // {
2 #define EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDChannel_H
3 
6 #include <cstdint>
7 
8 namespace Phase2Tracker {
9 
10  // holds information about position of a channel in the buffer
11  // for use by unpacker
13  //forward declaration to avoid circular includes
15 
16  public:
17  Phase2TrackerFEDChannel(const uint8_t* const data, const size_t offset, const uint16_t length)
19 
20  //gets length from first 2 bytes (assuming normal FED channel)
21  Phase2TrackerFEDChannel(const uint8_t* const data, const size_t offset);
22  uint16_t length() const { return length_; }
23  const uint8_t* data() const { return data_; }
24  size_t offset() const { return offset_; }
25  uint16_t cmMedian(const uint8_t apvIndex) const;
26 
27  private:
28  friend class Phase2TrackerFEDBuffer;
29  //third byte of channel data for normal FED channels
30  uint8_t packetCode() const;
31  const uint8_t* data_;
32  size_t offset_;
33  uint16_t length_;
34  }; // end Phase2TrackerFEDChannel class
35 
36 } // namespace Phase2Tracker
37 
38 #endif // } end def EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDChannel_H
Phase2TrackerFEDChannel(const uint8_t *const data, const size_t offset, const uint16_t length)
uint16_t cmMedian(const uint8_t apvIndex) const