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
Phase2Tracker::Phase2TrackerFEDChannel
Definition: Phase2TrackerFEDChannel.h:12
Phase2Tracker::Phase2TrackerFEDChannel::data
const uint8_t * data() const
Definition: Phase2TrackerFEDChannel.h:23
Phase2Tracker::Phase2TrackerFEDChannel::packetCode
uint8_t packetCode() const
Phase2Tracker::Phase2TrackerFEDChannel::offset
size_t offset() const
Definition: Phase2TrackerFEDChannel.h:24
Phase2TrackerFEDDAQHeader.h
Phase2Tracker::Phase2TrackerFEDChannel::length_
uint16_t length_
Definition: Phase2TrackerFEDChannel.h:33
Phase2Tracker::Phase2TrackerFEDChannel::length
uint16_t length() const
Definition: Phase2TrackerFEDChannel.h:22
Phase2TrackerFEDDAQTrailer.h
Phase2Tracker::Phase2TrackerFEDBuffer
Definition: Phase2TrackerFEDBuffer.h:14
Phase2Tracker::Phase2TrackerFEDChannel::Phase2TrackerFEDChannel
Phase2TrackerFEDChannel(const uint8_t *const data, const size_t offset, const uint16_t length)
Definition: Phase2TrackerFEDChannel.h:17
Phase2Tracker::Phase2TrackerFEDChannel::offset_
size_t offset_
Definition: Phase2TrackerFEDChannel.h:32
Phase2Tracker::Phase2TrackerFEDChannel::data_
const uint8_t * data_
Definition: Phase2TrackerFEDChannel.h:31
Phase2Tracker
Definition: Phase2TrackerFEDBuffer.h:12
Phase2Tracker::Phase2TrackerFEDChannel::cmMedian
uint16_t cmMedian(const uint8_t apvIndex) const