CMS 3D CMS Logo

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

#include <GEMRawToDigi.h>

Public Member Functions

bool amcError () const
 
std::unique_ptr< gem::AMC13EventconvertWordToAMC13Event (const uint64_t *word)
 
bool vfatError () const
 

Private Attributes

bool amcError_
 
bool vfatError_
 

Detailed Description

Author
J. Lee, Yechan Kang - UoS

Definition at line 9 of file GEMRawToDigi.h.

Member Function Documentation

◆ amcError()

bool GEMRawToDigi::amcError ( ) const
inline

Definition at line 13 of file GEMRawToDigi.h.

13 { return amcError_; }

References amcError_.

◆ convertWordToAMC13Event()

std::unique_ptr< AMC13Event > GEMRawToDigi::convertWordToAMC13Event ( const uint64_t *  word)

Definition at line 8 of file GEMRawToDigi.cc.

8  {
9  vfatError_ = false;
10  amcError_ = false;
11 
12  auto amc13Event = std::make_unique<AMC13Event>();
13 
14  amc13Event->setCDFHeader(*word);
15  amc13Event->setAMC13Header(*(++word));
16 
17  // Readout out AMC headers
18  for (uint8_t i = 0; i < amc13Event->nAMC(); ++i)
19  amc13Event->addAMCheader(*(++word));
20 
21  // Readout out AMC payloads
22  for (uint8_t i = 0; i < amc13Event->nAMC(); ++i) {
23  auto amcData = AMCdata();
24  amcData.setAMCheader1(*(++word));
25  amcData.setAMCheader2(*(++word));
26  amcData.setGEMeventHeader(*(++word));
27 
28  // Fill GEB
29  for (uint8_t j = 0; j < amcData.davCnt(); ++j) {
30  auto gebData = GEBdata();
31  gebData.setChamberHeader(*(++word));
32 
33  // Fill vfat
34  for (uint16_t k = 0; k < gebData.vfatWordCnt() / 3; k++) {
35  auto vfatData = VFATdata();
36  vfatData.read_fw(*(++word));
37  vfatData.read_sw(*(++word));
38  vfatData.read_tw(*(++word));
39  gebData.addVFAT(vfatData);
40 
41  } // end of vfat loop
42 
43  gebData.setChamberTrailer(*(++word));
44  amcData.addGEB(gebData);
45 
46  } // end of geb loop
47 
48  amcData.setGEMeventTrailer(*(++word));
49  amcData.setAMCTrailer(*(++word));
50  amc13Event->addAMCpayload(amcData);
51 
52  } // end of amc loop
53 
54  amc13Event->setAMC13Trailer(*(++word));
55  amc13Event->setCDFTrailer(*(++word));
56 
57  return amc13Event;
58 }

References mps_fire::i, dqmiolumiharvest::j, and dqmdumpme::k.

◆ vfatError()

bool GEMRawToDigi::vfatError ( ) const
inline

Definition at line 12 of file GEMRawToDigi.h.

12 { return vfatError_; }

References vfatError_.

Member Data Documentation

◆ amcError_

bool GEMRawToDigi::amcError_
private

Definition at line 17 of file GEMRawToDigi.h.

Referenced by amcError().

◆ vfatError_

bool GEMRawToDigi::vfatError_
private

Definition at line 16 of file GEMRawToDigi.h.

Referenced by vfatError().

mps_fire.i
i
Definition: mps_fire.py:428
gem::GEBdata
Definition: GEBdata.h:45
GEMRawToDigi::vfatError_
bool vfatError_
Definition: GEMRawToDigi.h:16
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
dqmdumpme.k
k
Definition: dqmdumpme.py:60
gem::AMCdata
Definition: AMCdata.h:67
GEMRawToDigi::amcError_
bool amcError_
Definition: GEMRawToDigi.h:17
gem::VFATdata
Definition: VFATdata.h:48
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66