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 50 of file AMC13Event.h.

Constructor & Destructor Documentation

gem::AMC13Event::AMC13Event ( )
inline

Definition at line 54 of file AMC13Event.h.

54 {}
gem::AMC13Event::~AMC13Event ( )
inline

Definition at line 55 of file AMC13Event.h.

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

Member Function Documentation

void AMC13Event::addAMCheader ( uint64_t  word)

Definition at line 44 of file AMC13Event.cc.

References amcHeaders_.

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

Definition at line 49 of file AMC13Event.cc.

References amcHeaders_.

50 {
51  // AMC Header word
52  // 55 - 32 | 27 - 20 | 19 - 16 | 15 - 0 |
53  // AMC_size | Blk_No | AMC_No | BoardID |
54  uint64_t word =
55  (static_cast<uint64_t>(AMC_size & 0x00ffffff) << 32) |
56  (static_cast<uint64_t>(Blk_No & 0xff) << 20) |
57  (static_cast<uint64_t>(AMC_No & 0x0f) << 16) |
58  (static_cast<uint64_t>(BoardID & 0xffff));
59  amcHeaders_.push_back(word);
60 }
std::vector< uint64_t > amcHeaders_
Definition: AMC13Event.h:93
unsigned long long uint64_t
Definition: Time.h:15
void gem::AMC13Event::addAMCpayload ( const AMCdata a)
inline

Definition at line 84 of file AMC13Event.h.

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

Definition at line 73 of file AMC13Event.h.

References gem::CDFHeader::bxId.

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

Definition at line 63 of file AMC13Event.h.

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

Definition at line 67 of file AMC13Event.h.

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

Definition at line 79 of file AMC13Event.h.

References gem::CDFHeader::word.

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

Definition at line 83 of file AMC13Event.h.

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

Definition at line 59 of file AMC13Event.h.

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

Definition at line 71 of file AMC13Event.h.

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

Definition at line 74 of file AMC13Event.h.

References gem::CDFHeader::lv1Id.

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

Definition at line 77 of file AMC13Event.h.

References gem::AMC13Header::nAMC.

Referenced by setAMC13Header().

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

Definition at line 61 of file AMC13Event.h.

References gem::CDFHeader::word.

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

Definition at line 17 of file AMC13Event.cc.

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

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

Definition at line 65 of file AMC13Event.h.

References gem::CDFHeader::word.

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

Definition at line 27 of file AMC13Event.cc.

References amc13t_, gem::AMC13Trailer::blkN, gem::AMC13Trailer::bxIdT, gem::AMC13Trailer::lv1IdT, and gem::AMC13Trailer::word.

28 {
29  AMC13Trailer u;
30  u.blkN = Blk_NoT;
31  u.lv1IdT = LV1_idT;
32  u.bxIdT = BX_idT;
33  amc13t_ = u.word;
34 }
uint64_t bxIdT
Definition: AMC13Event.h:33
uint64_t lv1IdT
Definition: AMC13Event.h:34
uint64_t amc13t_
Definition: AMC13Event.h:89
void gem::AMC13Event::setCDFHeader ( uint64_t  word)
inline

Definition at line 57 of file AMC13Event.h.

References gem::CDFHeader::word.

57 { cdfh_ = word;}
uint64_t cdfh_
Definition: AMC13Event.h:87
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::bxId, gem::CDFHeader::cb5, cdfh_, gem::CDFHeader::eventType, gem::CDFHeader::lv1Id, gem::CDFHeader::sourceId, and gem::CDFHeader::word.

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

Definition at line 69 of file AMC13Event.h.

References gem::CDFHeader::word.

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

Definition at line 36 of file AMC13Event.cc.

References gem::CDFTrailer::cbA, cdft_, gem::CDFTrailer::evtLength, and gem::CDFTrailer::word.

37 {
38  CDFTrailer u;
39  u.cbA = 0xA;
40  u.evtLength = EvtLength;
41  cdft_ = u.word;
42 }
uint64_t cdft_
Definition: AMC13Event.h:90
uint64_t cbA
Definition: AMC13Event.h:46
uint64_t evtLength
Definition: AMC13Event.h:45
uint64_t word
Definition: AMC13Event.h:40
uint16_t gem::AMC13Event::sourceId ( ) const
inline

Definition at line 75 of file AMC13Event.h.

References gem::CDFHeader::sourceId.

75 {return CDFHeader{cdfh_}.sourceId;}
uint64_t cdfh_
Definition: AMC13Event.h:87

Member Data Documentation

uint64_t gem::AMC13Event::amc13h_
private

Definition at line 88 of file AMC13Event.h.

Referenced by setAMC13Header().

uint64_t gem::AMC13Event::amc13t_
private

Definition at line 89 of file AMC13Event.h.

Referenced by setAMC13Trailer().

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

Definition at line 93 of file AMC13Event.h.

Referenced by addAMCheader().

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

Definition at line 95 of file AMC13Event.h.

uint64_t gem::AMC13Event::cdfh_
private

Definition at line 87 of file AMC13Event.h.

Referenced by setCDFHeader().

uint64_t gem::AMC13Event::cdft_
private

Definition at line 90 of file AMC13Event.h.

Referenced by setCDFTrailer().