CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
sistrip::FEDDAQHeader Class Reference

#include <SiStripFEDBufferComponents.h>

Public Member Functions

uint8_t boeNibble () const
 
uint16_t bxID () const
 
const uint8_t * data () const
 
FEDDAQEventType eventType () const
 
uint8_t eventTypeNibble () const
 
 FEDDAQHeader ()
 
 FEDDAQHeader (const uint32_t l1ID, const uint16_t bxID, const uint16_t sourceID, const FEDDAQEventType evtType=DAQ_EVENT_TYPE_PHYSICS)
 
 FEDDAQHeader (const uint8_t *header)
 
bool hBit () const
 
uint32_t l1ID () const
 
bool lastHeader () const
 
void print (std::ostream &os) const
 
FEDDAQHeadersetBXID (const uint16_t bxID)
 
FEDDAQHeadersetEventType (const FEDDAQEventType evtType)
 
FEDDAQHeadersetL1ID (const uint32_t l1ID)
 
FEDDAQHeadersetSourceID (const uint16_t sourceID)
 
uint16_t sourceID () const
 
uint8_t version () const
 

Private Attributes

uint8_t header_ [8]
 

Detailed Description

Definition at line 198 of file SiStripFEDBufferComponents.h.

Constructor & Destructor Documentation

◆ FEDDAQHeader() [1/3]

sistrip::FEDDAQHeader::FEDDAQHeader ( )
inline

Definition at line 200 of file SiStripFEDBufferComponents.h.

200 {}

◆ FEDDAQHeader() [2/3]

sistrip::FEDDAQHeader::FEDDAQHeader ( const uint8_t *  header)
inlineexplicit

Definition at line 1341 of file SiStripFEDBufferComponents.h.

1341 { memcpy(header_, header, 8); }

References RecoTauValidation_cfi::header, and header_.

◆ FEDDAQHeader() [3/3]

sistrip::FEDDAQHeader::FEDDAQHeader ( const uint32_t  l1ID,
const uint16_t  bxID,
const uint16_t  sourceID,
const FEDDAQEventType  evtType = DAQ_EVENT_TYPE_PHYSICS 
)

Definition at line 949 of file SiStripFEDBufferComponents.cc.

952  {
953  //clear everything (FOV,H,x,$ all set to 0)
954  memset(header_, 0x0, 8);
955  //set the BoE nibble to indicate this is the last fragment
956  header_[7] = 0x50;
957  //set variable fields vith values supplied
958  setEventType(evtType);
959  setL1ID(l1ID);
960  setBXID(bxID);
962  }

References bxID(), header_, l1ID(), setBXID(), setEventType(), setL1ID(), setSourceID(), and sourceID().

Member Function Documentation

◆ boeNibble()

uint8_t sistrip::FEDDAQHeader::boeNibble ( ) const
inline

Definition at line 1343 of file SiStripFEDBufferComponents.h.

1343 { return ((header_[7] & 0xF0) >> 4); }

References header_.

Referenced by sistrip::FEDBufferBase::checkNoExtraHeadersOrTrailers().

◆ bxID()

uint16_t sistrip::FEDDAQHeader::bxID ( ) const
inline

◆ data()

const uint8_t * sistrip::FEDDAQHeader::data ( ) const
inline

Definition at line 1359 of file SiStripFEDBufferComponents.h.

1359 { return header_; }

References header_.

Referenced by sistrip::FEDBufferGenerator::fillBuffer().

◆ eventType()

FEDDAQEventType sistrip::FEDDAQHeader::eventType ( ) const

◆ eventTypeNibble()

uint8_t sistrip::FEDDAQHeader::eventTypeNibble ( ) const
inline

Definition at line 1345 of file SiStripFEDBufferComponents.h.

1345 { return (header_[7] & 0x0F); }

References header_.

Referenced by eventType().

◆ hBit()

bool sistrip::FEDDAQHeader::hBit ( ) const
inline

Definition at line 1355 of file SiStripFEDBufferComponents.h.

1355 { return (header_[0] & 0x8); }

References header_.

Referenced by lastHeader().

◆ l1ID()

uint32_t sistrip::FEDDAQHeader::l1ID ( ) const
inline

◆ lastHeader()

bool sistrip::FEDDAQHeader::lastHeader ( ) const
inline

Definition at line 1357 of file SiStripFEDBufferComponents.h.

1357 { return !hBit(); }

References hBit().

◆ print()

void sistrip::FEDDAQHeader::print ( std::ostream &  os) const
inline

Definition at line 1361 of file SiStripFEDBufferComponents.h.

1361 { printHex(header_, 8, os); }

References header_, and sistrip::printHex().

◆ setBXID()

FEDDAQHeader & sistrip::FEDDAQHeader::setBXID ( const uint16_t  bxID)

Definition at line 937 of file SiStripFEDBufferComponents.cc.

937  {
938  header_[3] = ((bxID & 0x0FF0) >> 4);
939  header_[2] = ((header_[2] & 0x0F) | ((bxID & 0x000F) << 4));
940  return *this;
941  }

References bxID(), and header_.

Referenced by FEDDAQHeader(), and sistrip::FEDBufferGenerator::setBXID().

◆ setEventType()

FEDDAQHeader & sistrip::FEDDAQHeader::setEventType ( const FEDDAQEventType  evtType)

Definition at line 925 of file SiStripFEDBufferComponents.cc.

925  {
926  header_[7] = ((header_[7] & 0xF0) | evtType);
927  return *this;
928  }

References header_.

Referenced by FEDDAQHeader(), and sistrip::FEDBufferGenerator::setDAQEventType().

◆ setL1ID()

FEDDAQHeader & sistrip::FEDDAQHeader::setL1ID ( const uint32_t  l1ID)

Definition at line 930 of file SiStripFEDBufferComponents.cc.

930  {
931  header_[4] = (l1ID & 0x000000FF);
932  header_[5] = ((l1ID & 0x0000FF00) >> 8);
933  header_[6] = ((l1ID & 0x00FF0000) >> 16);
934  return *this;
935  }

References header_, and l1ID().

Referenced by FEDDAQHeader(), and sistrip::FEDBufferGenerator::setL1ID().

◆ setSourceID()

FEDDAQHeader & sistrip::FEDDAQHeader::setSourceID ( const uint16_t  sourceID)

Definition at line 943 of file SiStripFEDBufferComponents.cc.

943  {
944  header_[2] = ((header_[2] & 0xF0) | ((sourceID & 0x0F00) >> 8));
945  header_[1] = (sourceID & 0x00FF);
946  return *this;
947  }

References header_, and sourceID().

Referenced by FEDDAQHeader(), and sistrip::FEDBufferGenerator::generateBuffer().

◆ sourceID()

uint16_t sistrip::FEDDAQHeader::sourceID ( ) const
inline

Definition at line 1351 of file SiStripFEDBufferComponents.h.

1351 { return (((header_[2] & 0x0F) << 8) | header_[1]); }

References header_.

Referenced by sistrip::FEDBufferBase::daqSourceID(), FEDDAQHeader(), and setSourceID().

◆ version()

uint8_t sistrip::FEDDAQHeader::version ( ) const
inline

Definition at line 1353 of file SiStripFEDBufferComponents.h.

1353 { return ((header_[0] & 0xF0) >> 4); }

References header_.

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

Member Data Documentation

◆ header_

uint8_t sistrip::FEDDAQHeader::header_[8]
private
sistrip::DAQ_EVENT_TYPE_TEST
Definition: SiStripFEDBufferComponents.h:98
sistrip::DAQ_EVENT_TYPE_SIMULATED
Definition: SiStripFEDBufferComponents.h:100
sistrip::FEDDAQHeader::eventTypeNibble
uint8_t eventTypeNibble() const
Definition: SiStripFEDBufferComponents.h:1345
sistrip::FEDDAQHeader::header_
uint8_t header_[8]
Definition: SiStripFEDBufferComponents.h:226
sistrip::FEDDAQHeader::l1ID
uint32_t l1ID() const
Definition: SiStripFEDBufferComponents.h:1347
sistrip::FEDDAQHeader::sourceID
uint16_t sourceID() const
Definition: SiStripFEDBufferComponents.h:1351
sistrip::DAQ_EVENT_TYPE_TRACED
Definition: SiStripFEDBufferComponents.h:101
sistrip::FEDDAQEventType
FEDDAQEventType
Definition: SiStripFEDBufferComponents.h:95
sistrip::DAQ_EVENT_TYPE_PHYSICS
Definition: SiStripFEDBufferComponents.h:96
sistrip::DAQ_EVENT_TYPE_CALIBRATION
Definition: SiStripFEDBufferComponents.h:97
sistrip::DAQ_EVENT_TYPE_TECHNICAL
Definition: SiStripFEDBufferComponents.h:99
sistrip::printHex
void printHex(const void *pointer, const size_t length, std::ostream &os)
Definition: SiStripFEDBufferComponents.cc:26
sistrip::DAQ_EVENT_TYPE_INVALID
Definition: SiStripFEDBufferComponents.h:103
sistrip::FEDDAQHeader::setL1ID
FEDDAQHeader & setL1ID(const uint32_t l1ID)
Definition: SiStripFEDBufferComponents.cc:930
sistrip::FEDDAQHeader::setSourceID
FEDDAQHeader & setSourceID(const uint16_t sourceID)
Definition: SiStripFEDBufferComponents.cc:943
sistrip::FEDDAQHeader::hBit
bool hBit() const
Definition: SiStripFEDBufferComponents.h:1355
sistrip::FEDDAQHeader::setEventType
FEDDAQHeader & setEventType(const FEDDAQEventType evtType)
Definition: SiStripFEDBufferComponents.cc:925
sistrip::DAQ_EVENT_TYPE_ERROR
Definition: SiStripFEDBufferComponents.h:102
RecoTauValidation_cfi.header
header
Definition: RecoTauValidation_cfi.py:292
sistrip::FEDDAQHeader::setBXID
FEDDAQHeader & setBXID(const uint16_t bxID)
Definition: SiStripFEDBufferComponents.cc:937
sistrip::FEDDAQHeader::bxID
uint16_t bxID() const
Definition: SiStripFEDBufferComponents.h:1349