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< GEMAMC13convertWordToGEMAMC13 (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.

References amcError_.

13 { return amcError_; }

◆ convertWordToGEMAMC13()

std::unique_ptr< GEMAMC13 > GEMRawToDigi::convertWordToGEMAMC13 ( const uint64_t *  word)

for gem

Author
J. Lee, Yechan Kang - UoS

Definition at line 7 of file GEMRawToDigi.cc.

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

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

◆ vfatError()

bool GEMRawToDigi::vfatError ( ) const
inline

Definition at line 12 of file GEMRawToDigi.h.

References vfatError_.

12 { return vfatError_; }

Member Data Documentation

◆ amcError_

bool GEMRawToDigi::amcError_
private

Definition at line 17 of file GEMRawToDigi.h.

Referenced by amcError(), and convertWordToGEMAMC13().

◆ vfatError_

bool GEMRawToDigi::vfatError_
private

Definition at line 16 of file GEMRawToDigi.h.

Referenced by convertWordToGEMAMC13(), and vfatError().