CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  {
14  //forward declaration to avoid circular includes
16  public:
17  Phase2TrackerFEDChannel(const uint8_t*const data, const size_t offset,
18  const uint16_t length): data_(data), offset_(offset), length_(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  private:
27  friend class Phase2TrackerFEDBuffer;
28  //third byte of channel data for normal FED channels
29  uint8_t packetCode() const;
30  const uint8_t* data_;
31  size_t offset_;
32  uint16_t length_;
33  }; // end Phase2TrackerFEDChannel class
34 
35 } // end of Phase2Tracker namespace
36 
37 #endif // } end def EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDChannel_H
38 
Phase2TrackerFEDChannel(const uint8_t *const data, const size_t offset, const uint16_t length)
uint16_t cmMedian(const uint8_t apvIndex) const