CMS 3D CMS Logo

Phase2TrackerFEDZSChannelUnpacker.h
Go to the documentation of this file.
1 #ifndef EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDZSChannelUnpacker_H // {
2 #define EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDZSChannelUnpacker_H
3 
7 #include <stdint.h>
8 
9 namespace Phase2Tracker {
10 
12  {
13  public:
15  uint8_t clusterIndex() const { return data_[currentOffset_^7]; }
16  uint8_t clusterLength() const {return data_[(currentOffset_+1)^7]; }
17  bool hasData() const { return valuesLeft_; }
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()),
29  currentOffset_(channel.offset()),
30  valuesLeft_(channel.length()/2)
31  {
32  }
33 
35  {
37  valuesLeft_--;
38  return (*this);
39  }
40 
42  {
43  ++(*this); return *this;
44  }
45 
46 } // end of Phase2Tracker namespace
47 
48 #endif // } end def EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDZSChannelUnpacker_H
49 
Phase2TrackerFEDZSChannelUnpacker(const Phase2TrackerFEDChannel &channel)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82