CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Attributes

FEDHeader Class Reference

#include <FEDHeader.h>

List of all members.

Public Member Functions

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

Static Public Member Functions

static void set (unsigned char *header, int evt_ty, int lvl1_ID, int bx_ID, int source_ID, int version=0, bool H=false)
 Set all fields in the header.
static void set (unsigned char *header, int evt_ty, int lvl1_ID, int bx_ID, int source_ID, int version=0, bool H=false)
 Set all fields in the header.

Private Attributes

const fedh_structtheHeader
const fedh_ttheHeader

Detailed Description

TEMPORARY helper class to interpret/create FED header words. FIXME: will be replaced by the xdaq implementation.

Date:
2005/10/06 18:25:22
Revision:
1.3
Author:
N. Amapane - CERN

TEMPORARY helper class to interpret/create FED header words.

Date:
2008/07/01 21:50:36
Revision:
1.1
Author:
N. Amapane - CERN

Definition at line 15 of file FEDHeader.h.


Constructor & Destructor Documentation

FEDHeader::FEDHeader ( const unsigned char *  header)

Constructor.

Definition at line 11 of file FEDHeader.cc.

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

Destructor.

Definition at line 15 of file FEDHeader.cc.

{}
FEDHeader::FEDHeader ( const unsigned char *  header)

Constructor.

FEDHeader::~FEDHeader ( )

Destructor.


Member Function Documentation

int FEDHeader::bxID ( )
int FEDHeader::bxID ( )

The bunch crossing number.

bool FEDHeader::check ( )
bool FEDHeader::check ( )

Check that the header is OK.

int FEDHeader::lvl1ID ( )

Level-1 event number generated by the TTC system.

int FEDHeader::lvl1ID ( )
bool FEDHeader::moreHeaders ( )

0 -> the current header word is the last one. 1-> other header words can follow (always 1 for ECAL)

Definition at line 38 of file FEDHeader.cc.

References FED_MORE_HEADERS, fedh_struct::sourceid, and theHeader.

Referenced by ErrorChecker::checkHeader(), ESUnpacker::interpretRawData(), RPCUnpackingModule::produce(), L1GlobalTriggerEvmRawToDigi::unpackHeader(), and L1GlobalTriggerRawToDigi::unpackHeader().

                           {
  return ((theHeader->sourceid & FED_MORE_HEADERS)!=0);
}
bool FEDHeader::moreHeaders ( )

0 -> the current header word is the last one. 1-> other header words can follow (always 1 for ECAL)

static void FEDHeader::set ( unsigned char *  header,
int  evt_ty,
int  lvl1_ID,
int  bx_ID,
int  source_ID,
int  version = 0,
bool  H = false 
) [static]

Set all fields in the header.

void FEDHeader::set ( unsigned char *  header,
int  evt_ty,
int  lvl1_ID,
int  bx_ID,
int  source_ID,
int  version = 0,
bool  H = false 
) [static]
int FEDHeader::sourceID ( )
int FEDHeader::sourceID ( )

Identifier of the FED.

int FEDHeader::triggerType ( )

Event Trigger type identifier.

int FEDHeader::triggerType ( )
int FEDHeader::version ( )
int FEDHeader::version ( )

Version identifier of the FED data format.


Member Data Documentation

Definition at line 56 of file FEDHeader.h.

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

const fedh_t* FEDHeader::theHeader [private]

Definition at line 55 of file FEDHeader.h.