src
EventFilter
Phase2TrackerRawToDigi
interface
Phase2TrackerFEDZSChannelUnpacker.h
Go to the documentation of this file.
1
#ifndef EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDZSChannelUnpacker_H // {
2
#define EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDZSChannelUnpacker_H
3
4
#include "
EventFilter/Phase2TrackerRawToDigi/interface/Phase2TrackerFEDDAQHeader.h
"
5
#include "
EventFilter/Phase2TrackerRawToDigi/interface/Phase2TrackerFEDDAQTrailer.h
"
6
#include "
EventFilter/Phase2TrackerRawToDigi/interface/Phase2TrackerFEDChannel.h
"
7
#include <cstdint>
8
9
namespace
Phase2Tracker
{
10
11
class
Phase2TrackerFEDZSChannelUnpacker
{
12
public
:
13
Phase2TrackerFEDZSChannelUnpacker
(
const
Phase2TrackerFEDChannel
& channel);
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_
; }
17
Phase2TrackerFEDZSChannelUnpacker
&
operator++
();
18
Phase2TrackerFEDZSChannelUnpacker
&
operator++
(
int
);
19
20
private
:
21
const
uint8_t*
data_
;
22
uint8_t
currentOffset_
;
23
uint16_t
valuesLeft_
;
24
};
25
26
// unpacker for ZS CBC data
27
inline
Phase2TrackerFEDZSChannelUnpacker::Phase2TrackerFEDZSChannelUnpacker
(
const
Phase2TrackerFEDChannel
& channel)
28
: data_(channel.
data
()), currentOffset_(channel.
offset
()), valuesLeft_(channel.length() / 2) {}
29
30
inline
Phase2TrackerFEDZSChannelUnpacker
&
Phase2TrackerFEDZSChannelUnpacker::operator++
() {
31
currentOffset_
=
currentOffset_
+ 2;
32
valuesLeft_
--;
33
return
(*
this
);
34
}
35
36
inline
Phase2TrackerFEDZSChannelUnpacker
&
Phase2TrackerFEDZSChannelUnpacker::operator++
(
int
) {
37
++(*this);
38
return
*
this
;
39
}
40
41
}
// namespace Phase2Tracker
42
43
#endif // } end def EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDZSChannelUnpacker_H
Phase2TrackerFEDDAQHeader.h
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::operator++
Phase2TrackerFEDZSChannelUnpacker & operator++()
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:30
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::data_
const uint8_t * data_
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:21
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::currentOffset_
uint8_t currentOffset_
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:22
Phase2Tracker
Definition:
Phase2TrackerFEDBuffer.h:12
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::clusterLength
uint8_t clusterLength() const
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:15
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::hasData
bool hasData() const
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:16
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::clusterIndex
uint8_t clusterIndex() const
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:14
Phase2Tracker::Phase2TrackerFEDChannel
Definition:
Phase2TrackerFEDChannel.h:12
Phase2TrackerFEDChannel.h
Phase2TrackerFEDDAQTrailer.h
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::Phase2TrackerFEDZSChannelUnpacker
Phase2TrackerFEDZSChannelUnpacker(const Phase2TrackerFEDChannel &channel)
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:27
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::valuesLeft_
uint16_t valuesLeft_
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:23
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:80
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:11
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition:
hltrates_dqm_sourceclient-live_cfg.py:83
Generated for CMSSW Reference Manual by
1.8.14