ATLAS Offline Software
Functions
LArFebHeaderReader Namespace Reference

Functions

void fillFebHeader (LArFebHeader *lfh, const LArRodBlockStructure *bl, const ROBFragment &robFrag)
 Fill info for one FEB Header. More...
 

Function Documentation

◆ fillFebHeader()

void LArFebHeaderReader::fillFebHeader ( LArFebHeader lfh,
const LArRodBlockStructure bl,
const ROBFragment robFrag 
)

Fill info for one FEB Header.

Parameters
lfhPointer ot the FEB header obj to fill
blPointer to the input RodBlockStructure
robFragPointer to the input ROB Fragment

Extracts a bunch of control words, etc from the
byte stream objects LArRodBlockStructure and ROBFragment and stores them in a FebHeader object

Definition at line 10 of file LArFebHeaderReader.cxx.

12  { //input
13  larFebHeader->SetFormatVersion(rob.rod_version());
14  larFebHeader->SetSourceId(rob.rod_source_id());
15  larFebHeader->SetRunNumber(rob.rod_run_no());
16  larFebHeader->SetELVL1Id(rob.rod_lvl1_id());
17  larFebHeader->SetBCId(rob.rod_bc_id());
18  larFebHeader->SetLVL1TigType(rob.rod_lvl1_trigger_type());
19  larFebHeader->SetDetEventType(rob.rod_detev_type());
20 
21  //set DSP data
22  const unsigned nsample=rodBlock->getNumberOfSamples();
23  larFebHeader->SetRodStatus(rodBlock->getStatus());
24  larFebHeader->SetDspCodeVersion(rodBlock->getDspCodeVersion());
25  larFebHeader->SetDspEventCounter(rodBlock->getDspEventCounter());
26  larFebHeader->SetRodResults1Size(rodBlock->getResults1Size());
27  larFebHeader->SetRodResults2Size(rodBlock->getResults2Size());
28  larFebHeader->SetRodRawDataSize(rodBlock->getRawDataSize());
29  larFebHeader->SetNbSweetCells1(rodBlock->getNbSweetCells1());
30  larFebHeader->SetNbSweetCells2(rodBlock->getNbSweetCells2());
31  larFebHeader->SetNbSamples(nsample);
32  larFebHeader->SetOnlineChecksum(rodBlock->onlineCheckSum());
33  larFebHeader->SetOfflineChecksum(rodBlock->offlineCheckSum());
34 
35  if(!rodBlock->hasControlWords()) {
36  larFebHeader->SetFebELVL1Id(rob.rod_lvl1_id());
37  larFebHeader->SetFebBCId(rob.rod_bc_id());
38  } else {
39  const uint16_t evtid = rodBlock->getCtrl1(0) & 0x1f;
40  const uint16_t bcid = rodBlock->getCtrl2(0) & 0x1fff;
41  larFebHeader->SetFebELVL1Id(evtid);
42  larFebHeader->SetFebBCId(bcid);
43  for(int iadc=0;iadc<16;iadc++) {
44  larFebHeader->SetFebCtrl1(rodBlock->getCtrl1(iadc));
45  larFebHeader->SetFebCtrl2(rodBlock->getCtrl2(iadc));
46  larFebHeader->SetFebCtrl3(rodBlock->getCtrl3(iadc));
47  }
48  for(unsigned int i = 0; i<nsample; i++ ) {
49  larFebHeader->SetFebSCA(rodBlock->getRadd(0,i) & 0xff);
50  }
51  }//end else no control words
52 
53  return;
54 }
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
lumiFormat.i
int i
Definition: lumiFormat.py:85
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133