CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

bool GEMRawToDigi::amcError ( ) const
inline

Definition at line 13 of file GEMRawToDigi.h.

References amcError_.

13 { return amcError_; }
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 amc, amcError_, mps_fire::i, dqmiolumiharvest::j, isotrackApplyRegressor::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.setChamberHeader(*(++word));
31 
32  // Fill vfat
33  for (uint16_t k = 0; k < oh.vfatWordCnt() / 3; k++) {
34  auto vfat = GEMVFAT();
35  vfat.read_fw(*(++word));
36  vfat.read_sw(*(++word));
37  vfat.read_tw(*(++word));
38  oh.addVFAT(vfat);
39 
40  } // end of vfat loop
41 
42  oh.setChamberTrailer(*(++word));
43  amc.addGEB(oh);
44 
45  } // end of geb loop
46 
47  amc.setGEMeventTrailer(*(++word));
48  amc.setAMCTrailer(*(++word));
49  amc13->addAMCpayload(amc);
50 
51  } // end of amc loop
52 
53  amc13->setAMC13Trailer(*(++word));
54  amc13->setCDFTrailer(*(++word));
55 
56  return amc13;
57 }
uint64_t word
Definition: GEMVFAT.h:5
double amc
Definition: hdecay.h:20
Definition: GEMAMC.h:6
bool GEMRawToDigi::vfatError ( ) const
inline

Definition at line 12 of file GEMRawToDigi.h.

References vfatError_.

12 { return vfatError_; }

Member Data Documentation

bool GEMRawToDigi::amcError_
private

Definition at line 17 of file GEMRawToDigi.h.

Referenced by amcError(), and convertWordToGEMAMC13().

bool GEMRawToDigi::vfatError_
private

Definition at line 16 of file GEMRawToDigi.h.

Referenced by convertWordToGEMAMC13(), and vfatError().