CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes
FEDHeader Class Reference

#include <FEDHeader.h>

Public Member Functions

uint16_t bxID () const
 The bunch crossing number. More...
 
bool check () const
 Check that the header is OK. More...
 
 FEDHeader (const unsigned char *header)
 Constructor. More...
 
uint32_t lvl1ID () const
 Level-1 event number generated by the TTC system. More...
 
bool moreHeaders () const
 
uint16_t sourceID () const
 Identifier of the FED. More...
 
uint8_t triggerType () const
 Event Trigger type identifier. More...
 
uint8_t version () const
 Version identifier of the FED data format. More...
 
 ~FEDHeader ()
 Destructor. More...
 

Static Public Member Functions

static void set (unsigned char *header, uint8_t triggerType, uint32_t lvl1ID, uint16_t bxID, uint16_t sourceID, uint8_t version=0, bool moreHeaders=false)
 Set all fields in the header. More...
 

Static Public Attributes

static const uint32_t length = sizeof(fedh_t)
 

Private Attributes

const fedh_structtheHeader
 

Detailed Description

Helper class to interpret/create FED header words.

Author
N. Amapane - CERN, R. Mommsen - FNAL

Definition at line 14 of file FEDHeader.h.

Constructor & Destructor Documentation

◆ FEDHeader()

FEDHeader::FEDHeader ( const unsigned char *  header)

Constructor.

Definition at line 9 of file FEDHeader.cc.

9 : theHeader(reinterpret_cast<const fedh_t*>(header)) {}

◆ ~FEDHeader()

FEDHeader::~FEDHeader ( )

Destructor.

Definition at line 11 of file FEDHeader.cc.

11 {}

Member Function Documentation

◆ bxID()

uint16_t FEDHeader::bxID ( ) const

◆ check()

bool FEDHeader::check ( ) const

◆ lvl1ID()

uint32_t FEDHeader::lvl1ID ( ) const

◆ moreHeaders()

bool FEDHeader::moreHeaders ( ) const

◆ set()

void FEDHeader::set ( unsigned char *  header,
uint8_t  triggerType,
uint32_t  lvl1ID,
uint16_t  bxID,
uint16_t  sourceID,
uint8_t  version = 0,
bool  moreHeaders = false 
)
static

Set all fields in the header.

Definition at line 25 of file FEDHeader.cc.

31  {
32  // FIXME: should check that input ranges are OK!!!
33  fedh_t* h = reinterpret_cast<fedh_t*>(header);
36 
37  h->sourceid = ((bxID << FED_BXID_SHIFT) & FED_BXID_MASK) | ((sourceID << FED_SOID_SHIFT) & FED_SOID_MASK) |
39 
40  if (moreHeaders)
42 }

References bxID(), FED_BXID_MASK, FED_BXID_SHIFT, FED_EVTY_MASK, FED_EVTY_SHIFT, FED_HCTRLID_SHIFT, FED_LVL1_MASK, FED_LVL1_SHIFT, FED_MORE_HEADERS_SHIFT, FED_MORE_HEADERS_WIDTH, FED_SLINK_START_MARKER, FED_SOID_MASK, FED_SOID_SHIFT, FED_VERSION_MASK, FED_VERSION_SHIFT, RecoTauValidation_cfi::header, lvl1ID(), moreHeaders(), sourceID(), triggerType(), and version().

Referenced by CSCDCCHeader::CSCDCCHeader(), ESDataFormatterV1_1::DigiToRaw(), ESDataFormatterV4::DigiToRaw(), DaqFakeReader::fillFEDs(), DaqFakeReader::fillTCDSFED(), CTPPSTotemDataFormatter::formatRawData(), PixelDataFormatter::formatRawData(), CTPPSPixelDataFormatter::formatRawData(), L1GTEvmDigiToRaw::packHeader(), L1GTDigiToRaw::packHeader(), DTDigiToRawModule::produce(), RPCTwinMuxDigiToRaw::produce(), CSCTFPacker::produce(), GctDigiToRaw::produce(), HcalDigiToRawuHTR::produce(), and RPCPackingModule::rawData().

◆ sourceID()

uint16_t FEDHeader::sourceID ( ) const

◆ triggerType()

uint8_t FEDHeader::triggerType ( ) const

◆ version()

uint8_t FEDHeader::version ( ) const

Member Data Documentation

◆ length

const uint32_t FEDHeader::length = sizeof(fedh_t)
static

◆ theHeader

const fedh_struct* FEDHeader::theHeader
private

Definition at line 57 of file FEDHeader.h.

Referenced by bxID(), check(), lvl1ID(), moreHeaders(), sourceID(), triggerType(), and version().

FED_BXID_SHIFT
#define FED_BXID_SHIFT
Definition: fed_header.h:42
FED_HCTRLID_EXTRACT
#define FED_HCTRLID_EXTRACT(a)
Definition: fed_header.h:29
FEDHeader::moreHeaders
bool moreHeaders() const
Definition: FEDHeader.cc:23
FED_EVTY_SHIFT
#define FED_EVTY_SHIFT
Definition: fed_header.h:32
FED_SOID_EXTRACT
#define FED_SOID_EXTRACT(a)
Definition: fed_header.h:49
FEDHeader::version
uint8_t version() const
Version identifier of the FED data format.
Definition: FEDHeader.cc:21
FEDHeader::lvl1ID
uint32_t lvl1ID() const
Level-1 event number generated by the TTC system.
Definition: FEDHeader.cc:15
FED_SOID_SHIFT
#define FED_SOID_SHIFT
Definition: fed_header.h:47
FED_HCTRLID_SHIFT
#define FED_HCTRLID_SHIFT
Definition: fed_header.h:27
FED_LVL1_SHIFT
#define FED_LVL1_SHIFT
Definition: fed_header.h:37
FED_LVL1_EXTRACT
#define FED_LVL1_EXTRACT(a)
Definition: fed_header.h:39
fedh_struct
Definition: fed_header.h:19
FED_MORE_HEADERS_SHIFT
#define FED_MORE_HEADERS_SHIFT
Definition: fed_header.h:57
FED_MORE_HEADERS_WIDTH
#define FED_MORE_HEADERS_WIDTH
Definition: fed_header.h:56
FED_EVTY_MASK
#define FED_EVTY_MASK
Definition: fed_header.h:33
h
FED_BXID_EXTRACT
#define FED_BXID_EXTRACT(a)
Definition: fed_header.h:44
FED_LVL1_MASK
#define FED_LVL1_MASK
Definition: fed_header.h:38
FED_VERSION_EXTRACT
#define FED_VERSION_EXTRACT(a)
Definition: fed_header.h:54
FEDHeader::triggerType
uint8_t triggerType() const
Event Trigger type identifier.
Definition: FEDHeader.cc:13
FEDHeader::theHeader
const fedh_struct * theHeader
Definition: FEDHeader.h:57
FEDHeader::bxID
uint16_t bxID() const
The bunch crossing number.
Definition: FEDHeader.cc:17
fedh_struct::sourceid
uint32_t sourceid
Definition: fed_header.h:23
FED_SLINK_START_MARKER
#define FED_SLINK_START_MARKER
Definition: fed_header.h:24
FED_EVTY_EXTRACT
#define FED_EVTY_EXTRACT(a)
Definition: fed_header.h:34
FED_MORE_HEADERS_EXTRACT
#define FED_MORE_HEADERS_EXTRACT(a)
Definition: fed_header.h:59
FED_VERSION_SHIFT
#define FED_VERSION_SHIFT
Definition: fed_header.h:52
FED_SOID_MASK
#define FED_SOID_MASK
Definition: fed_header.h:48
FEDHeader::sourceID
uint16_t sourceID() const
Identifier of the FED.
Definition: FEDHeader.cc:19
RecoTauValidation_cfi.header
header
Definition: RecoTauValidation_cfi.py:292
FED_VERSION_MASK
#define FED_VERSION_MASK
Definition: fed_header.h:53
fedh_struct::eventid
uint32_t eventid
Definition: fed_header.h:24
FED_BXID_MASK
#define FED_BXID_MASK
Definition: fed_header.h:43