EventFilter
Phase2TrackerRawToDigi
interface
Phase2TrackerFEDHeader.h
Go to the documentation of this file.
1
#ifndef EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDHeader_H // {
2
#define EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDHeader_H
3
4
#include "
EventFilter/Phase2TrackerRawToDigi/interface/Phase2TrackerFEDDAQHeader.h
"
5
#include "
EventFilter/Phase2TrackerRawToDigi/interface/Phase2TrackerFEDDAQTrailer.h
"
6
#include <cstdint>
7
#include <vector>
8
9
namespace
Phase2Tracker
{
10
11
// tracker headers for new CBC system
12
class
Phase2TrackerFEDHeader
{
13
public
:
14
Phase2TrackerFEDHeader
() {}
15
16
explicit
Phase2TrackerFEDHeader
(
const
uint8_t* headerPointer);
17
18
// getters:
19
inline
uint8_t
getDataFormatVersion
()
const
{
return
dataFormatVersion_
; }
20
inline
READ_MODE
getDebugMode
()
const
{
return
debugMode_
; }
21
22
inline
uint8_t
getEventType
()
const
{
return
eventType_
; }
23
inline
FEDReadoutMode
getReadoutMode
()
const
{
return
readoutMode_
; }
24
inline
uint8_t
getConditionData
()
const
{
return
conditionData_
; }
25
inline
uint8_t
getDataType
()
const
{
return
dataType_
; }
26
27
inline
uint64_t
getGlibStatusCode
()
const
{
return
glibStatusCode_
; }
28
inline
uint16_t
getNumberOfCBC
()
const
{
return
numberOfCBC_
; }
29
30
// get pointer to Payload data after tracker head
31
const
uint8_t*
getPointerToData
()
const
{
return
pointerToData_
; }
32
// get Front-End Status (16 bits) ==> 16 bool
33
std::vector<bool>
frontendStatus
()
const
;
34
35
inline
uint8_t
getTrackerHeaderSize
()
const
{
return
trackerHeaderSize_
; }
36
37
// CBC status bits, according to debug mode
38
// (empty, 1bit per CBC, 8bits per CBC)
39
std::vector<uint8_t>
CBCStatus
()
const
;
40
41
private
:
42
// readers: read info from Tracker Header and store in local variables
43
44
// version number (4 bits)
45
uint8_t
dataFormatVersion
()
const
;
46
// debug level (2 bits) :
47
// 01 = full debug, 10 = CBC error mode, 00 = summary mode
48
READ_MODE
debugMode
()
const
;
49
// event type (4 bits):
50
// RAW/ZS, condition data, data type (real or simulated)
51
uint8_t
eventType
()
const
;
52
// get readout mode (first bit of the above)
53
FEDReadoutMode
readoutMode
()
const
;
54
uint8_t
conditionData
()
const
;
55
uint8_t
dataType
()
const
;
56
// glib status registers code (38 bits)
57
uint64_t
glibStatusCode
()
const
;
58
// number of CBC chips (8 bits)
59
uint16_t
numberOfCBC
()
const
;
60
// get tracker size (see function) and pointer to end of header. Also sets the TrackerHeaderSize.
61
const
uint8_t*
pointerToData
();
62
63
private
:
64
void
init
();
65
const
uint8_t*
trackerHeader_
;
// pointer to the begining of Tracker Header
66
const
uint8_t*
pointerToData_
;
// pointer next to end of Tracker Header
67
uint8_t
trackerHeaderSize_
;
// Tracker Header in bytes
68
uint64_t
header_first_word_
;
69
uint64_t
header_second_word_
;
70
uint8_t
dataFormatVersion_
;
// shoud be 1
71
READ_MODE
debugMode_
;
// debug, error, sumary ...
72
uint8_t
eventType_
;
// contains readoutMode_, conditionData_ and dataType_
73
FEDReadoutMode
readoutMode_
;
// proc raw or zero suppress
74
uint8_t
conditionData_
;
// condition data present or not
75
uint8_t
dataType_
;
// data fake or real
76
uint64_t
glibStatusCode_
;
// glib status registers
77
uint16_t
numberOfCBC_
;
// Total number of connected CBC
78
79
};
// end of Phase2TrackerFEDHeader class
80
}
// namespace Phase2Tracker
81
#endif // } end def EventFilter_Phase2TrackerRawToDigi_Phase2TrackerPhase2TrackerFEDHeader_H
Phase2Tracker::Phase2TrackerFEDHeader::trackerHeaderSize_
uint8_t trackerHeaderSize_
Definition:
Phase2TrackerFEDHeader.h:67
Phase2Tracker::Phase2TrackerFEDHeader::CBCStatus
std::vector< uint8_t > CBCStatus() const
Definition:
Phase2TrackerFEDHeader.cc:127
Phase2Tracker::Phase2TrackerFEDHeader::conditionData_
uint8_t conditionData_
Definition:
Phase2TrackerFEDHeader.h:74
Phase2Tracker::Phase2TrackerFEDHeader::getReadoutMode
FEDReadoutMode getReadoutMode() const
Definition:
Phase2TrackerFEDHeader.h:23
Phase2Tracker::Phase2TrackerFEDHeader::numberOfCBC_
uint16_t numberOfCBC_
Definition:
Phase2TrackerFEDHeader.h:77
Phase2Tracker::Phase2TrackerFEDHeader::dataType
uint8_t dataType() const
Definition:
Phase2TrackerFEDHeader.cc:103
Phase2Tracker::Phase2TrackerFEDHeader::Phase2TrackerFEDHeader
Phase2TrackerFEDHeader()
Definition:
Phase2TrackerFEDHeader.h:14
Phase2Tracker::Phase2TrackerFEDHeader::getEventType
uint8_t getEventType() const
Definition:
Phase2TrackerFEDHeader.h:22
Phase2Tracker::Phase2TrackerFEDHeader::trackerHeader_
const uint8_t * trackerHeader_
Definition:
Phase2TrackerFEDHeader.h:65
Phase2Tracker::Phase2TrackerFEDHeader::dataFormatVersion_
uint8_t dataFormatVersion_
Definition:
Phase2TrackerFEDHeader.h:70
Phase2Tracker::Phase2TrackerFEDHeader::getPointerToData
const uint8_t * getPointerToData() const
Definition:
Phase2TrackerFEDHeader.h:31
Phase2Tracker::Phase2TrackerFEDHeader::getTrackerHeaderSize
uint8_t getTrackerHeaderSize() const
Definition:
Phase2TrackerFEDHeader.h:35
Phase2Tracker::Phase2TrackerFEDHeader::numberOfCBC
uint16_t numberOfCBC() const
Definition:
Phase2TrackerFEDHeader.cc:118
Phase2Tracker::Phase2TrackerFEDHeader::init
void init()
Definition:
Phase2TrackerFEDHeader.cc:15
Phase2Tracker::FEDReadoutMode
FEDReadoutMode
Definition:
utils.h:95
Phase2Tracker::Phase2TrackerFEDHeader::debugMode_
READ_MODE debugMode_
Definition:
Phase2TrackerFEDHeader.h:71
Phase2Tracker::Phase2TrackerFEDHeader::getNumberOfCBC
uint16_t getNumberOfCBC() const
Definition:
Phase2TrackerFEDHeader.h:28
Phase2Tracker::READ_MODE
READ_MODE
Definition:
utils.h:141
Phase2TrackerFEDDAQHeader.h
Phase2Tracker::Phase2TrackerFEDHeader::header_first_word_
uint64_t header_first_word_
Definition:
Phase2TrackerFEDHeader.h:68
Phase2Tracker::Phase2TrackerFEDHeader::pointerToData_
const uint8_t * pointerToData_
Definition:
Phase2TrackerFEDHeader.h:66
Phase2Tracker::Phase2TrackerFEDHeader::dataType_
uint8_t dataType_
Definition:
Phase2TrackerFEDHeader.h:75
Phase2Tracker::Phase2TrackerFEDHeader::eventType_
uint8_t eventType_
Definition:
Phase2TrackerFEDHeader.h:72
Phase2Tracker::Phase2TrackerFEDHeader::getDataType
uint8_t getDataType() const
Definition:
Phase2TrackerFEDHeader.h:25
Phase2TrackerFEDDAQTrailer.h
Phase2Tracker::Phase2TrackerFEDHeader::getConditionData
uint8_t getConditionData() const
Definition:
Phase2TrackerFEDHeader.h:24
Phase2Tracker::Phase2TrackerFEDHeader
Definition:
Phase2TrackerFEDHeader.h:12
Phase2Tracker::Phase2TrackerFEDHeader::readoutMode
FEDReadoutMode readoutMode() const
Definition:
Phase2TrackerFEDHeader.cc:83
Phase2Tracker::Phase2TrackerFEDHeader::glibStatusCode
uint64_t glibStatusCode() const
Definition:
Phase2TrackerFEDHeader.cc:105
Phase2Tracker::Phase2TrackerFEDHeader::debugMode
READ_MODE debugMode() const
Definition:
Phase2TrackerFEDHeader.cc:56
Phase2Tracker::Phase2TrackerFEDHeader::pointerToData
const uint8_t * pointerToData()
Definition:
Phase2TrackerFEDHeader.cc:173
Phase2Tracker::Phase2TrackerFEDHeader::conditionData
uint8_t conditionData() const
Definition:
Phase2TrackerFEDHeader.cc:101
Phase2Tracker::Phase2TrackerFEDHeader::getGlibStatusCode
uint64_t getGlibStatusCode() const
Definition:
Phase2TrackerFEDHeader.h:27
Phase2Tracker::Phase2TrackerFEDHeader::glibStatusCode_
uint64_t glibStatusCode_
Definition:
Phase2TrackerFEDHeader.h:76
cond::uint64_t
unsigned long long uint64_t
Definition:
Time.h:13
Phase2Tracker::Phase2TrackerFEDHeader::frontendStatus
std::vector< bool > frontendStatus() const
Definition:
Phase2TrackerFEDHeader.cc:109
Phase2Tracker::Phase2TrackerFEDHeader::header_second_word_
uint64_t header_second_word_
Definition:
Phase2TrackerFEDHeader.h:69
Phase2Tracker::Phase2TrackerFEDHeader::readoutMode_
FEDReadoutMode readoutMode_
Definition:
Phase2TrackerFEDHeader.h:73
Phase2Tracker
Definition:
Phase2TrackerFEDBuffer.h:12
Phase2Tracker::Phase2TrackerFEDHeader::getDataFormatVersion
uint8_t getDataFormatVersion() const
Definition:
Phase2TrackerFEDHeader.h:19
Phase2Tracker::Phase2TrackerFEDHeader::eventType
uint8_t eventType() const
Definition:
Phase2TrackerFEDHeader.cc:78
Phase2Tracker::Phase2TrackerFEDHeader::getDebugMode
READ_MODE getDebugMode() const
Definition:
Phase2TrackerFEDHeader.h:20
Phase2Tracker::Phase2TrackerFEDHeader::dataFormatVersion
uint8_t dataFormatVersion() const
Definition:
Phase2TrackerFEDHeader.cc:44
Generated for CMSSW Reference Manual by
1.8.16