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 (uint32_t AMC_size, uint8_t Blk_No, uint8_t AMC_No, uint16_t BoardID)
 
void addAMCheader (uint64_t word)
 
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 (uint32_t EvtLength)
 
void setCDFTrailer (uint64_t word)
 
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

◆ AMC13Event()

gem::AMC13Event::AMC13Event ( )
inline

Definition at line 53 of file AMC13Event.h.

53 : cdfh_(0), amc13h_(0), amc13t_(0), cdft_(0) {}

◆ ~AMC13Event()

gem::AMC13Event::~AMC13Event ( )
inline

Definition at line 54 of file AMC13Event.h.

54  {
55  amcHeaders_.clear();
56  amcs_.clear();
57  }

References amcHeaders_, and amcs_.

Member Function Documentation

◆ addAMCheader() [1/2]

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.

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 }

References amcHeaders_.

◆ addAMCheader() [2/2]

void AMC13Event::addAMCheader ( uint64_t  word)

Definition at line 41 of file AMC13Event.cc.

41 { amcHeaders_.push_back(word); }

References amcHeaders_.

◆ addAMCpayload()

void gem::AMC13Event::addAMCpayload ( const AMCdata a)
inline

Definition at line 86 of file AMC13Event.h.

86 { amcs_.push_back(a); }

References a, and amcs_.

◆ bxId()

uint16_t gem::AMC13Event::bxId ( ) const
inline

Definition at line 75 of file AMC13Event.h.

75 { return CDFHeader{cdfh_}.bxId; }

References cdfh_.

◆ getAMC13Header()

uint64_t gem::AMC13Event::getAMC13Header ( ) const
inline

Definition at line 65 of file AMC13Event.h.

65 { return amc13h_; }

References amc13h_.

◆ getAMC13Trailer()

uint64_t gem::AMC13Event::getAMC13Trailer ( ) const
inline

Definition at line 69 of file AMC13Event.h.

69 { return amc13t_; }

References amc13t_.

◆ getAMCheaders()

const std::vector<uint64_t>* gem::AMC13Event::getAMCheaders ( ) const
inline

Definition at line 81 of file AMC13Event.h.

81 { return &amcHeaders_; }

References amcHeaders_.

◆ getAMCpayloads()

const std::vector<AMCdata>* gem::AMC13Event::getAMCpayloads ( ) const
inline

Definition at line 85 of file AMC13Event.h.

85 { return &amcs_; }

References amcs_.

◆ getCDFHeader()

uint64_t gem::AMC13Event::getCDFHeader ( ) const
inline

Definition at line 61 of file AMC13Event.h.

61 { return cdfh_; }

References cdfh_.

◆ getCDFTrailer()

uint64_t gem::AMC13Event::getCDFTrailer ( ) const
inline

Definition at line 73 of file AMC13Event.h.

73 { return cdft_; }

References cdft_.

◆ lv1Id()

uint32_t gem::AMC13Event::lv1Id ( ) const
inline

Definition at line 76 of file AMC13Event.h.

76 { return CDFHeader{cdfh_}.lv1Id; }

References cdfh_.

◆ nAMC()

uint8_t gem::AMC13Event::nAMC ( ) const
inline

Definition at line 79 of file AMC13Event.h.

79 { return AMC13Header{amc13h_}.nAMC; }

References amc13h_.

Referenced by setAMC13Header().

◆ setAMC13Header() [1/2]

void gem::AMC13Event::setAMC13Header ( uint64_t  word)
inline

Definition at line 63 of file AMC13Event.h.

63 { amc13h_ = word; }

References amc13h_.

◆ setAMC13Header() [2/2]

void AMC13Event::setAMC13Header ( uint8_t  CalTyp,
uint8_t  nAMC,
uint32_t  OrN 
)

Definition at line 16 of file AMC13Event.cc.

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 }

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

◆ setAMC13Trailer() [1/2]

void gem::AMC13Event::setAMC13Trailer ( uint64_t  word)
inline

Definition at line 67 of file AMC13Event.h.

67 { amc13t_ = word; }

References amc13t_.

◆ setAMC13Trailer() [2/2]

void AMC13Event::setAMC13Trailer ( uint8_t  Blk_NoT,
uint8_t  LV1_idT,
uint16_t  BX_idT 
)

Definition at line 25 of file AMC13Event.cc.

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 }

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

◆ setCDFHeader() [1/2]

void gem::AMC13Event::setCDFHeader ( uint64_t  word)
inline

Definition at line 59 of file AMC13Event.h.

59 { cdfh_ = word; }

References cdfh_.

◆ setCDFHeader() [2/2]

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.

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 }

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

◆ setCDFTrailer() [1/2]

void AMC13Event::setCDFTrailer ( uint32_t  EvtLength)

Definition at line 33 of file AMC13Event.cc.

33  {
34  CDFTrailer u{0};
35  u.cbA = 0xA;
36  u.eventType = CDFHeader{cdfh_}.eventType;
37  u.evtLength = EvtLength;
38  cdft_ = u.word;
39 }

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

◆ setCDFTrailer() [2/2]

void gem::AMC13Event::setCDFTrailer ( uint64_t  word)
inline

Definition at line 71 of file AMC13Event.h.

71 { cdft_ = word; }

References cdft_.

◆ sourceId()

uint16_t gem::AMC13Event::sourceId ( ) const
inline

Definition at line 77 of file AMC13Event.h.

77 { return CDFHeader{cdfh_}.sourceId; }

References cdfh_.

Member Data Documentation

◆ amc13h_

uint64_t gem::AMC13Event::amc13h_
private

Definition at line 90 of file AMC13Event.h.

Referenced by getAMC13Header(), nAMC(), and setAMC13Header().

◆ amc13t_

uint64_t gem::AMC13Event::amc13t_
private

Definition at line 91 of file AMC13Event.h.

Referenced by getAMC13Trailer(), and setAMC13Trailer().

◆ amcHeaders_

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

Definition at line 95 of file AMC13Event.h.

Referenced by addAMCheader(), getAMCheaders(), and ~AMC13Event().

◆ amcs_

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

Definition at line 97 of file AMC13Event.h.

Referenced by addAMCpayload(), getAMCpayloads(), and ~AMC13Event().

◆ cdfh_

uint64_t gem::AMC13Event::cdfh_
private

Definition at line 89 of file AMC13Event.h.

Referenced by bxId(), getCDFHeader(), lv1Id(), setCDFHeader(), setCDFTrailer(), and sourceId().

◆ cdft_

uint64_t gem::AMC13Event::cdft_
private

Definition at line 92 of file AMC13Event.h.

Referenced by getCDFTrailer(), and setCDFTrailer().

gem::AMC13Header::cb0
uint64_t cb0
Definition: AMC13Event.h:22
gem::AMC13Event::cdft_
uint64_t cdft_
Definition: AMC13Event.h:92
gem::AMC13Event::amcHeaders_
std::vector< uint64_t > amcHeaders_
Definition: AMC13Event.h:95
gem::AMC13Event::cdfh_
uint64_t cdfh_
Definition: AMC13Event.h:89
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
gem::AMC13Trailer::blkN
uint64_t blkN
Definition: AMC13Event.h:35
gem::AMC13Event::amcs_
std::vector< AMCdata > amcs_
Definition: AMC13Event.h:97
gem::CDFHeader::cb5
uint64_t cb5
Definition: AMC13Event.h:16
gem::CDFTrailer
Definition: AMC13Event.h:39
a
double a
Definition: hdecay.h:119
gem::CDFHeader
Definition: AMC13Event.h:8
gem::AMC13Trailer
Definition: AMC13Event.h:30
gem::CDFTrailer::cbA
uint64_t cbA
Definition: AMC13Event.h:47
gem::AMC13Event::amc13t_
uint64_t amc13t_
Definition: AMC13Event.h:91
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
gem::AMC13Event::amc13h_
uint64_t amc13h_
Definition: AMC13Event.h:90
gem::AMC13Event::nAMC
uint8_t nAMC() const
Definition: AMC13Event.h:79
gem::AMC13Header
Definition: AMC13Event.h:19