test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
FEDTrailer Class Reference

#include <FEDTrailer.h>

Public Member Functions

bool check ()
 
bool check ()
 
int crc ()
 Cyclic Redundancy Code of the event fragment including header and trailer. More...
 
int crc ()
 Cyclic Redundancy Code of the event fragment including header and trailer. More...
 
int evtStatus ()
 Event fragment status information. More...
 
int evtStatus ()
 Event fragment status information. More...
 
 FEDTrailer (const unsigned char *trailer)
 Constructor. More...
 
 FEDTrailer (const unsigned char *trailer)
 Constructor. More...
 
int lenght ()
 The length of the event fragment counted in 64-bit words including header and trailer. More...
 
int lenght ()
 The length of the event fragment counted in 64-bit words including header and trailer. More...
 
bool moreTrailers ()
 
bool moreTrailers ()
 
int ttsBits ()
 Current value of the Trigger Throttling System bitsAQ). More...
 
int ttsBits ()
 Current value of the Trigger Throttling System bitsAQ). More...
 
virtual ~FEDTrailer ()
 Destructor. More...
 
virtual ~FEDTrailer ()
 Destructor. More...
 

Static Public Member Functions

static void set (unsigned char *trailer, int evt_lgth, int crc, int evt_stat, int tts, bool T=false)
 Set all fields in the trailer. More...
 
static void set (unsigned char *trailer, int evt_lgth, int crc, int evt_stat, int tts, bool T=false)
 Set all fields in the trailer. More...
 

Private Attributes

const fedt_structtheTrailer
 
const fedt_ttheTrailer
 

Detailed Description

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

Author
N. Amapane - CERN

Definition at line 13 of file FEDTrailer.h.

Constructor & Destructor Documentation

FEDTrailer::FEDTrailer ( const unsigned char *  trailer)

Constructor.

Definition at line 9 of file FEDTrailer.cc.

9  :
10  theTrailer(reinterpret_cast<const fedt_t*>(trailer)) {}
const fedt_struct * theTrailer
Definition: FEDTrailer.h:50
FEDTrailer::~FEDTrailer ( )
virtual

Destructor.

Definition at line 13 of file FEDTrailer.cc.

13 {}
FEDTrailer::FEDTrailer ( const unsigned char *  trailer)

Constructor.

virtual FEDTrailer::~FEDTrailer ( )
virtual

Destructor.

Member Function Documentation

bool FEDTrailer::check ( )
bool FEDTrailer::check ( )
int FEDTrailer::crc ( )

Cyclic Redundancy Code of the event fragment including header and trailer.

Definition at line 22 of file FEDTrailer.cc.

References fedt_struct::conscheck, FED_CRCS_MASK, FED_CRCS_SHIFT, and theTrailer.

Referenced by L1TMP7ZeroSupp::analyze(), RPCUnpackingModule::produce(), l1t::L1TRawToDigi::produce(), RctRawToDigi::unpack(), L1GlobalTriggerEvmRawToDigi::unpackTrailer(), and L1GlobalTriggerRawToDigi::unpackTrailer().

22  {
24 }
#define FED_CRCS_MASK
Definition: fed_trailer.h:40
const fedt_struct * theTrailer
Definition: FEDTrailer.h:50
unsigned int conscheck
Definition: fed_trailer.h:32
#define FED_CRCS_SHIFT
Definition: fed_trailer.h:51
int FEDTrailer::crc ( )

Cyclic Redundancy Code of the event fragment including header and trailer.

int FEDTrailer::evtStatus ( )

Event fragment status information.

Definition at line 27 of file FEDTrailer.cc.

References fedt_struct::conscheck, FED_STAT_MASK, FED_STAT_SHIFT, and theTrailer.

Referenced by L1TMP7ZeroSupp::analyze(), RPCUnpackingModule::produce(), l1t::L1TRawToDigi::produce(), RctRawToDigi::unpack(), L1GlobalTriggerEvmRawToDigi::unpackTrailer(), and L1GlobalTriggerRawToDigi::unpackTrailer().

27  {
29 }
const fedt_struct * theTrailer
Definition: FEDTrailer.h:50
#define FED_STAT_SHIFT
Definition: fed_trailer.h:52
unsigned int conscheck
Definition: fed_trailer.h:32
#define FED_STAT_MASK
Definition: fed_trailer.h:41
int FEDTrailer::evtStatus ( )

Event fragment status information.

int FEDTrailer::lenght ( )
int FEDTrailer::lenght ( )

The length of the event fragment counted in 64-bit words including header and trailer.

bool FEDTrailer::moreTrailers ( )

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

Definition at line 37 of file FEDTrailer.cc.

References fedt_struct::conscheck, FED_MORE_TRAILERS, and theTrailer.

Referenced by ErrorChecker::checkTrailer(), ESUnpacker::interpretRawData(), RPCUnpackingModule::produce(), HcalDataIntegrityTask::unpack(), HcalRawDataMonitor::unpack(), L1GlobalTriggerEvmRawToDigi::unpackTrailer(), and L1GlobalTriggerRawToDigi::unpackTrailer().

37  {
38  return ((theTrailer->conscheck & FED_MORE_TRAILERS)!=0);
39 }
const fedt_struct * theTrailer
Definition: FEDTrailer.h:50
unsigned int conscheck
Definition: fed_trailer.h:32
#define FED_MORE_TRAILERS
Definition: fed_trailer.h:43
bool FEDTrailer::moreTrailers ( )

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

void FEDTrailer::set ( unsigned char *  trailer,
int  evt_lgth,
int  crc,
int  evt_stat,
int  tts,
bool  T = false 
)
static

Set all fields in the trailer.

Definition at line 42 of file FEDTrailer.cc.

References fedt_struct::conscheck, fedt_struct::eventsize, FED_CRCS_SHIFT, FED_EVSZ_SHIFT, FED_MORE_TRAILERS, FED_STAT_SHIFT, FED_TCTRLID, FED_TTSI_SHIFT, and lumiQTWidget::t.

Referenced by ESDataFormatterV1_1::DigiToRaw(), ESDataFormatterV4::DigiToRaw(), DaqFakeReader::fillFEDs(), DaqFakeReader::fillGTPFED(), l1t::AMCDumpToRaw::formatRaw(), l1t::MP7BufferDumpToRaw::formatRaw(), PixelDataFormatter::formatRawData(), CastorCtdcPacker::pack(), CastorPacker::pack(), HcalPacker::pack(), L1GTEvmDigiToRaw::packTrailer(), L1GTDigiToRaw::packTrailer(), DTDigiToRawModule::produce(), CSCTFPacker::produce(), GctDigiToRaw::produce(), l1t::L1TDigiToRaw::produce(), and RPCPackingModule::rawData().

47  {
48  // FIXME: should check that input ranges are OK!!!
49  fedt_t* t = reinterpret_cast<fedt_t*>(trailer);
50 
51  t->eventsize =
52  FED_TCTRLID |
53  evt_lgth << FED_EVSZ_SHIFT;
54 
55  t->conscheck =
56  crc << FED_CRCS_SHIFT |
57  evt_stat << FED_STAT_SHIFT |
58  tts << FED_TTSI_SHIFT;
59 
60  if (T) t->conscheck |= FED_MORE_TRAILERS;
61 }
#define FED_TTSI_SHIFT
Definition: fed_trailer.h:53
#define FED_STAT_SHIFT
Definition: fed_trailer.h:52
unsigned int conscheck
Definition: fed_trailer.h:32
#define FED_CRCS_SHIFT
Definition: fed_trailer.h:51
#define FED_TCTRLID
Definition: fed_trailer.h:46
#define FED_MORE_TRAILERS
Definition: fed_trailer.h:43
unsigned int eventsize
Definition: fed_trailer.h:33
int crc()
Cyclic Redundancy Code of the event fragment including header and trailer.
Definition: FEDTrailer.cc:22
#define FED_EVSZ_SHIFT
Definition: fed_trailer.h:49
long double T
static void FEDTrailer::set ( unsigned char *  trailer,
int  evt_lgth,
int  crc,
int  evt_stat,
int  tts,
bool  T = false 
)
static

Set all fields in the trailer.

int FEDTrailer::ttsBits ( )
int FEDTrailer::ttsBits ( )

Current value of the Trigger Throttling System bitsAQ).

Member Data Documentation

const fedt_struct* FEDTrailer::theTrailer
private

Definition at line 50 of file FEDTrailer.h.

Referenced by check(), crc(), evtStatus(), lenght(), moreTrailers(), and ttsBits().

const fedt_t* FEDTrailer::theTrailer
private

Definition at line 52 of file FEDTrailer.h.