CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Phase2TrackerFEDZSChannelUnpacker.h
Go to the documentation of this file.
1 #ifndef EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDZSChannelUnpacker_H // {
2 #define EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDZSChannelUnpacker_H
3 
7 #include <cstdint>
8 
9 namespace Phase2Tracker {
10 
12  public:
14  uint8_t clusterIndex() const { return data_[currentOffset_ ^ 7]; }
15  uint8_t clusterLength() const { return data_[(currentOffset_ + 1) ^ 7]; }
16  bool hasData() const { return valuesLeft_; }
19 
20  private:
21  const uint8_t* data_;
22  uint8_t currentOffset_;
23  uint16_t valuesLeft_;
24  };
25 
26  // unpacker for ZS CBC data
28  : data_(channel.data()), currentOffset_(channel.offset()), valuesLeft_(channel.length() / 2) {}
29 
32  valuesLeft_--;
33  return (*this);
34  }
35 
37  ++(*this);
38  return *this;
39  }
40 
41 } // namespace Phase2Tracker
42 
43 #endif // } end def EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDZSChannelUnpacker_H
Phase2TrackerFEDZSChannelUnpacker(const Phase2TrackerFEDChannel &channel)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79