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 <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
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::hasData
bool hasData() const
Definition: Phase2TrackerFEDZSChannelUnpacker.h:16
Phase2Tracker::Phase2TrackerFEDChannel
Definition: Phase2TrackerFEDChannel.h:12
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::valuesLeft_
uint16_t valuesLeft_
Definition: Phase2TrackerFEDZSChannelUnpacker.h:23
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::Phase2TrackerFEDZSChannelUnpacker
Phase2TrackerFEDZSChannelUnpacker(const Phase2TrackerFEDChannel &channel)
Definition: Phase2TrackerFEDZSChannelUnpacker.h:27
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::data_
const uint8_t * data_
Definition: Phase2TrackerFEDZSChannelUnpacker.h:21
Phase2TrackerFEDChannel.h
Phase2TrackerFEDDAQHeader.h
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::currentOffset_
uint8_t currentOffset_
Definition: Phase2TrackerFEDZSChannelUnpacker.h:22
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::operator++
Phase2TrackerFEDZSChannelUnpacker & operator++()
Definition: Phase2TrackerFEDZSChannelUnpacker.h:30
Phase2TrackerFEDDAQTrailer.h
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::clusterLength
uint8_t clusterLength() const
Definition: Phase2TrackerFEDZSChannelUnpacker.h:15
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::clusterIndex
uint8_t clusterIndex() const
Definition: Phase2TrackerFEDZSChannelUnpacker.h:14
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker
Definition: Phase2TrackerFEDZSChannelUnpacker.h:11
Phase2Tracker
Definition: Phase2TrackerFEDBuffer.h:12