test
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 
7 #include <stdint.h>
8 
9 namespace Phase2Tracker {
10 
11  // holds information about position of a channel in the buffer
12  // for use by unpacker
14  {
15  public:
16  Phase2TrackerFEDChannel(const uint8_t*const data, const size_t offset,
17  const uint16_t length): data_(data), offset_(offset), length_(length) {}
18 
19  //gets length from first 2 bytes (assuming normal FED channel)
20  Phase2TrackerFEDChannel(const uint8_t*const data, const size_t offset);
21  uint16_t length() const { return length_; }
22  const uint8_t* data() const { return data_; }
23  size_t offset() const { return offset_; }
24  uint16_t cmMedian(const uint8_t apvIndex) const;
25  private:
26  friend class Phase2TrackerFEDBuffer;
27  //third byte of channel data for normal FED channels
28  uint8_t packetCode() const;
29  const uint8_t* data_;
30  size_t offset_;
31  uint16_t length_;
32  }; // end Phase2TrackerFEDChannel class
33 
34 } // end of Phase2Tracker namespace
35 
36 #endif // } end def EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDChannel_H
37 
Phase2TrackerFEDChannel(const uint8_t *const data, const size_t offset, const uint16_t length)
uint16_t cmMedian(const uint8_t apvIndex) const