CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
gem::AMC13Event Class Reference

#include <AMC13Event.h>

Public Member Functions

void addAMCheader (uint64_t word)
 
void addAMCheader (uint32_t AMC_size, uint8_t Blk_No, uint8_t AMC_No, uint16_t BoardID)
 
void addAMCpayload (const AMCdata &a)
 
 AMC13Event ()
 
uint16_t bxId () const
 
uint64_t getAMC13Header () const
 
uint64_t getAMC13Trailer () const
 
const std::vector< uint64_t > * getAMCheaders () const
 
const std::vector< AMCdata > * getAMCpayloads () const
 
uint64_t getCDFHeader () const
 
uint64_t getCDFTrailer () const
 
uint32_t lv1Id () const
 
uint8_t nAMC () const
 
void setAMC13Header (uint64_t word)
 
void setAMC13Header (uint8_t CalTyp, uint8_t nAMC, uint32_t OrN)
 
void setAMC13Trailer (uint64_t word)
 
void setAMC13Trailer (uint8_t Blk_NoT, uint8_t LV1_idT, uint16_t BX_idT)
 
void setCDFHeader (uint64_t word)
 
void setCDFHeader (uint8_t Evt_ty, uint32_t LV1_id, uint16_t BX_id, uint16_t Source_id)
 
void setCDFTrailer (uint64_t word)
 
void setCDFTrailer (uint32_t EvtLength)
 
uint16_t sourceId () const
 
 ~AMC13Event ()
 

Private Attributes

uint64_t amc13h_
 
uint64_t amc13t_
 
std::vector< uint64_t > amcHeaders_
 
std::vector< AMCdataamcs_
 
uint64_t cdfh_
 
uint64_t cdft_
 

Detailed Description

Definition at line 51 of file AMC13Event.h.

Constructor & Destructor Documentation

gem::AMC13Event::AMC13Event ( )
inline

Definition at line 53 of file AMC13Event.h.

53 : cdfh_(0), amc13h_(0), amc13t_(0), cdft_(0) {}
uint64_t amc13h_
Definition: AMC13Event.h:90
uint64_t cdft_
Definition: AMC13Event.h:92
uint64_t cdfh_
Definition: AMC13Event.h:89
uint64_t amc13t_
Definition: AMC13Event.h:91
gem::AMC13Event::~AMC13Event ( )
inline

Definition at line 54 of file AMC13Event.h.

54  {
55  amcHeaders_.clear();
56  amcs_.clear();
57  }
std::vector< uint64_t > amcHeaders_
Definition: AMC13Event.h:95
std::vector< AMCdata > amcs_
Definition: AMC13Event.h:97

Member Function Documentation

void AMC13Event::addAMCheader ( uint64_t  word)

Definition at line 41 of file AMC13Event.cc.

References amcHeaders_.

41 { amcHeaders_.push_back(word); }
std::vector< uint64_t > amcHeaders_
Definition: AMC13Event.h:95
uint64_t word
void AMC13Event::addAMCheader ( uint32_t  AMC_size,
uint8_t  Blk_No,
uint8_t  AMC_No,
uint16_t  BoardID 
)

Definition at line 43 of file AMC13Event.cc.

References amcHeaders_.

43  {
44  // AMC Header word
45  // 55 - 32 | 27 - 20 | 19 - 16 | 15 - 0 |
46  // AMC_size | Blk_No | AMC_No | BoardID |
47  uint64_t word = (static_cast<uint64_t>(AMC_size & 0x00ffffff) << 32) | (static_cast<uint64_t>(Blk_No & 0xff) << 20) |
48  (static_cast<uint64_t>(AMC_No & 0x0f) << 16) | (static_cast<uint64_t>(BoardID & 0xffff));
49  amcHeaders_.push_back(word);
50 }
std::vector< uint64_t > amcHeaders_
Definition: AMC13Event.h:95
uint64_t word
unsigned long long uint64_t
Definition: Time.h:13
void gem::AMC13Event::addAMCpayload ( const AMCdata a)
inline

Definition at line 86 of file AMC13Event.h.

86 { amcs_.push_back(a); }
std::vector< AMCdata > amcs_
Definition: AMC13Event.h:97
double a
Definition: hdecay.h:119
uint16_t gem::AMC13Event::bxId ( ) const
inline

Definition at line 75 of file AMC13Event.h.

References gem::CDFHeader::bxId.

75 { return CDFHeader{cdfh_}.bxId; }
uint64_t cdfh_
Definition: AMC13Event.h:89
uint64_t gem::AMC13Event::getAMC13Header ( ) const
inline

Definition at line 65 of file AMC13Event.h.

65 { return amc13h_; }
uint64_t amc13h_
Definition: AMC13Event.h:90
uint64_t gem::AMC13Event::getAMC13Trailer ( ) const
inline

Definition at line 69 of file AMC13Event.h.

69 { return amc13t_; }
uint64_t amc13t_
Definition: AMC13Event.h:91
const std::vector<uint64_t>* gem::AMC13Event::getAMCheaders ( ) const
inline

Definition at line 81 of file AMC13Event.h.

81 { return &amcHeaders_; }
std::vector< uint64_t > amcHeaders_
Definition: AMC13Event.h:95
const std::vector<AMCdata>* gem::AMC13Event::getAMCpayloads ( ) const
inline

Definition at line 85 of file AMC13Event.h.

85 { return &amcs_; }
std::vector< AMCdata > amcs_
Definition: AMC13Event.h:97
uint64_t gem::AMC13Event::getCDFHeader ( ) const
inline

Definition at line 61 of file AMC13Event.h.

61 { return cdfh_; }
uint64_t cdfh_
Definition: AMC13Event.h:89
uint64_t gem::AMC13Event::getCDFTrailer ( ) const
inline

Definition at line 73 of file AMC13Event.h.

73 { return cdft_; }
uint64_t cdft_
Definition: AMC13Event.h:92
uint32_t gem::AMC13Event::lv1Id ( ) const
inline

Definition at line 76 of file AMC13Event.h.

References gem::CDFHeader::lv1Id.

76 { return CDFHeader{cdfh_}.lv1Id; }
uint64_t cdfh_
Definition: AMC13Event.h:89
uint8_t gem::AMC13Event::nAMC ( ) const
inline

Definition at line 79 of file AMC13Event.h.

References gem::AMC13Header::nAMC.

Referenced by setAMC13Header().

79 { return AMC13Header{amc13h_}.nAMC; }
uint64_t amc13h_
Definition: AMC13Event.h:90
void gem::AMC13Event::setAMC13Header ( uint64_t  word)
inline

Definition at line 63 of file AMC13Event.h.

References gem::CDFHeader::word.

63 { amc13h_ = word; }
uint64_t amc13h_
Definition: AMC13Event.h:90
uint64_t word
void AMC13Event::setAMC13Header ( uint8_t  CalTyp,
uint8_t  nAMC,
uint32_t  OrN 
)

Definition at line 16 of file AMC13Event.cc.

References amc13h_, gem::AMC13Header::cb0, and nAMC().

16  {
17  AMC13Header u{0};
18  u.cb0 = 0x0;
19  u.calType = CalTyp;
20  u.nAMC = nAMC;
21  u.orbitN = OrN;
22  amc13h_ = u.word;
23 }
uint64_t amc13h_
Definition: AMC13Event.h:90
uint64_t cb0
Definition: AMC13Event.h:22
uint8_t nAMC() const
Definition: AMC13Event.h:79
void gem::AMC13Event::setAMC13Trailer ( uint64_t  word)
inline

Definition at line 67 of file AMC13Event.h.

References gem::CDFHeader::word.

67 { amc13t_ = word; }
uint64_t word
uint64_t amc13t_
Definition: AMC13Event.h:91
void AMC13Event::setAMC13Trailer ( uint8_t  Blk_NoT,
uint8_t  LV1_idT,
uint16_t  BX_idT 
)

Definition at line 25 of file AMC13Event.cc.

References amc13t_, and gem::AMC13Trailer::blkN.

25  {
26  AMC13Trailer u{0};
27  u.blkN = Blk_NoT;
28  u.lv1IdT = LV1_idT;
29  u.bxIdT = BX_idT;
30  amc13t_ = u.word;
31 }
uint64_t amc13t_
Definition: AMC13Event.h:91
void gem::AMC13Event::setCDFHeader ( uint64_t  word)
inline

Definition at line 59 of file AMC13Event.h.

References gem::CDFHeader::word.

59 { cdfh_ = word; }
uint64_t cdfh_
Definition: AMC13Event.h:89
uint64_t word
void AMC13Event::setCDFHeader ( uint8_t  Evt_ty,
uint32_t  LV1_id,
uint16_t  BX_id,
uint16_t  Source_id 
)

Definition at line 6 of file AMC13Event.cc.

References gem::CDFHeader::cb5, and cdfh_.

6  {
7  CDFHeader u{0};
8  u.cb5 = 0x5;
9  u.eventType = Evt_ty;
10  u.lv1Id = LV1_id;
11  u.bxId = BX_id;
12  u.sourceId = Source_id;
13  cdfh_ = u.word;
14 }
uint64_t cdfh_
Definition: AMC13Event.h:89
uint64_t cb5
Definition: AMC13Event.h:16
void gem::AMC13Event::setCDFTrailer ( uint64_t  word)
inline

Definition at line 71 of file AMC13Event.h.

References gem::CDFHeader::word.

71 { cdft_ = word; }
uint64_t cdft_
Definition: AMC13Event.h:92
uint64_t word
void AMC13Event::setCDFTrailer ( uint32_t  EvtLength)

Definition at line 33 of file AMC13Event.cc.

References gem::CDFTrailer::cbA, cdfh_, and cdft_.

33  {
34  CDFTrailer u{0};
35  u.cbA = 0xA;
36  u.eventType = CDFHeader{cdfh_}.eventType;
37  u.evtLength = EvtLength;
38  cdft_ = u.word;
39 }
uint64_t cdft_
Definition: AMC13Event.h:92
uint64_t cdfh_
Definition: AMC13Event.h:89
uint64_t cbA
Definition: AMC13Event.h:47
uint16_t gem::AMC13Event::sourceId ( ) const
inline

Definition at line 77 of file AMC13Event.h.

References gem::CDFHeader::sourceId.

77 { return CDFHeader{cdfh_}.sourceId; }
uint64_t cdfh_
Definition: AMC13Event.h:89

Member Data Documentation

uint64_t gem::AMC13Event::amc13h_
private

Definition at line 90 of file AMC13Event.h.

Referenced by setAMC13Header().

uint64_t gem::AMC13Event::amc13t_
private

Definition at line 91 of file AMC13Event.h.

Referenced by setAMC13Trailer().

std::vector<uint64_t> gem::AMC13Event::amcHeaders_
private

Definition at line 95 of file AMC13Event.h.

Referenced by addAMCheader().

std::vector<AMCdata> gem::AMC13Event::amcs_
private

Definition at line 97 of file AMC13Event.h.

uint64_t gem::AMC13Event::cdfh_
private

Definition at line 89 of file AMC13Event.h.

Referenced by setCDFHeader(), and setCDFTrailer().

uint64_t gem::AMC13Event::cdft_
private

Definition at line 92 of file AMC13Event.h.

Referenced by setCDFTrailer().