Main Page
Namespaces
Classes
Package Documentation
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
{
13
public
:
14
Phase2TrackerFEDZSChannelUnpacker
(
const
Phase2TrackerFEDChannel
& channel);
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_
; }
18
Phase2TrackerFEDZSChannelUnpacker
&
operator ++
();
19
Phase2TrackerFEDZSChannelUnpacker
&
operator ++
(
int
);
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
()),
29
currentOffset_
(channel.
offset
()),
30
valuesLeft_
(channel.length()/2)
31
{
32
}
33
34
inline
Phase2TrackerFEDZSChannelUnpacker
&
Phase2TrackerFEDZSChannelUnpacker::operator ++
()
35
{
36
currentOffset_
=
currentOffset_
+2;
37
valuesLeft_
--;
38
return
(*
this
);
39
}
40
41
inline
Phase2TrackerFEDZSChannelUnpacker
&
Phase2TrackerFEDZSChannelUnpacker::operator ++
(
int
)
42
{
43
++(*this);
return
*
this
;
44
}
45
46
}
// end of Phase2Tracker namespace
47
48
#endif // } end def EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDZSChannelUnpacker_H
49
Phase2TrackerFEDDAQHeader.h
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::operator++
Phase2TrackerFEDZSChannelUnpacker & operator++()
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:34
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::data_
const uint8_t * data_
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:21
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::currentOffset_
uint8_t currentOffset_
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:22
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::clusterIndex
uint8_t clusterIndex() const
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:15
Phase2Tracker
Definition:
Phase2TrackerFEDBuffer.h:12
Phase2Tracker::Phase2TrackerFEDChannel
Definition:
Phase2TrackerFEDChannel.h:12
Phase2TrackerFEDChannel.h
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::clusterLength
uint8_t clusterLength() const
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:16
Phase2TrackerFEDDAQTrailer.h
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::Phase2TrackerFEDZSChannelUnpacker
Phase2TrackerFEDZSChannelUnpacker(const Phase2TrackerFEDChannel &channel)
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:27
PFRecoTauDiscriminationByIsolation_cfi.offset
offset
Definition:
PFRecoTauDiscriminationByIsolation_cfi.py:62
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::valuesLeft_
uint16_t valuesLeft_
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:23
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:82
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::hasData
bool hasData() const
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:17
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker
Definition:
Phase2TrackerFEDZSChannelUnpacker.h:11
Generated for CMSSW Reference Manual by
1.8.11