CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
TCDSRecord Class Reference

Class to contain information from TCDS FED. More...

#include <TCDSRecord.h>

Public Types

typedef std::bitset< 96 > ActivePartitions
 
enum  BGo {
  LumiNibble = 0, BC0 = 1, TestEnable = 2, PrivateGap = 3,
  PrivateOrbit = 4, Resync = 5, HardReset = 6, EC0 = 7,
  OC0 = 8, Start = 9, Stop = 10, StartOfGap = 11,
  WarningTestEnable = 13
}
 
enum  BSTstatus {
  Unknown = 0x00000000, Reset = 0x0000dead, Unlocked = 0xfa11010c, NoData = 0xfa110acc,
  Okay = 0x0000bea0
}
 
typedef std::vector< L1aInfoL1aHistory
 

Public Member Functions

ActivePartitions getActivePartitions () const
 
const BSTRecordgetBST () const
 
uint32_t getBstReceptionStatus () const
 
uint16_t getBXID () const
 
uint64_t getEventNumber () const
 
uint16_t getEventType () const
 
const L1aHistorygetFullL1aHistory () const
 
uint32_t getFwVersion () const
 
uint16_t getInputs () const
 
const L1aInfogetL1aHistoryEntry (const uint8_t entry) const
 
uint32_t getLastEventCounter0 () const
 
uint32_t getLastHardReset () const
 
uint32_t getLastOrbitCounter0 () const
 
uint32_t getLastResync () const
 
uint32_t getLastStart () const
 
uint32_t getLastTestEnable () const
 
uint32_t getLumiSection () const
 
uint64_t getMacAddress () const
 
uint32_t getNibble () const
 
uint16_t getNibblesPerLumiSection () const
 
uint64_t getOrbitNr () const
 
uint32_t getOrbitOfLastBgo (const uint16_t bgo) const
 
uint32_t getRecordVersion () const
 
uint32_t getRunNumber () const
 
uint32_t getSwVersion () const
 
uint64_t getTriggerCount () const
 
uint16_t getTriggerTypeFlags () const
 
 TCDSRecord ()
 
 TCDSRecord (const unsigned char *rawData)
 
virtual ~TCDSRecord ()
 

Private Attributes

ActivePartitions activePartitions_
 
BSTRecord bst_
 
uint32_t bstReceptionStatus_
 
uint16_t bxid_
 
uint64_t eventNumber_
 
uint16_t eventType_
 
uint32_t fwVersion_
 
uint16_t inputs_
 
L1aHistory l1aHistory_
 
std::vector< uint32_t > lastBgos_
 
uint32_t lumiSection_
 
uint64_t macAddress_
 
uint32_t nibble_
 
uint16_t nibblesPerLumiSection_
 
uint64_t orbitNr_
 
uint32_t recordVersion_
 
uint32_t runNumber_
 
uint32_t swVersion_
 
uint64_t triggerCount_
 
uint16_t triggerTypeFlags_
 

Detailed Description

Class to contain information from TCDS FED.

Author
Remi Mommsen - Fermilab

Definition at line 19 of file TCDSRecord.h.

Member Typedef Documentation

typedef std::bitset<96> TCDSRecord::ActivePartitions

Definition at line 103 of file TCDSRecord.h.

typedef std::vector<L1aInfo> TCDSRecord::L1aHistory

Definition at line 107 of file TCDSRecord.h.

Member Enumeration Documentation

Enumerator
LumiNibble 
BC0 
TestEnable 
PrivateGap 
PrivateOrbit 
Resync 
HardReset 
EC0 
OC0 
Start 
Stop 
StartOfGap 
WarningTestEnable 

Definition at line 21 of file TCDSRecord.h.

Enumerator
Unknown 
Reset 
Unlocked 
NoData 
Okay 

Definition at line 37 of file TCDSRecord.h.

37  {
38  Unknown = 0x00000000,
39  Reset = 0x0000dead,
40  Unlocked = 0xfa11010c,
41  NoData = 0xfa110acc,
42  Okay = 0x0000bea0
43  };

Constructor & Destructor Documentation

TCDSRecord::TCDSRecord ( )

Definition at line 7 of file TCDSRecord.cc.

8  : orbitNr_(0),
9  triggerCount_(0),
10  eventNumber_(0),
11  macAddress_(0),
12  swVersion_(0),
13  fwVersion_(0),
14  recordVersion_(0),
15  runNumber_(0),
17  nibble_(0),
18  lumiSection_(0),
20  eventType_(0),
22  inputs_(0),
23  bxid_(0) {}
uint16_t triggerTypeFlags_
Definition: TCDSRecord.h:146
uint64_t triggerCount_
Definition: TCDSRecord.h:134
uint32_t bstReceptionStatus_
Definition: TCDSRecord.h:141
uint32_t lumiSection_
Definition: TCDSRecord.h:143
uint16_t inputs_
Definition: TCDSRecord.h:147
uint64_t orbitNr_
Definition: TCDSRecord.h:133
uint32_t runNumber_
Definition: TCDSRecord.h:140
uint16_t eventType_
Definition: TCDSRecord.h:145
uint16_t bxid_
Definition: TCDSRecord.h:148
uint16_t nibblesPerLumiSection_
Definition: TCDSRecord.h:144
uint32_t fwVersion_
Definition: TCDSRecord.h:138
uint32_t nibble_
Definition: TCDSRecord.h:142
uint32_t recordVersion_
Definition: TCDSRecord.h:139
uint64_t macAddress_
Definition: TCDSRecord.h:136
uint32_t swVersion_
Definition: TCDSRecord.h:137
uint64_t eventNumber_
Definition: TCDSRecord.h:135
TCDSRecord::TCDSRecord ( const unsigned char *  rawData)

Definition at line 25 of file TCDSRecord.cc.

References tcds::Header_v1::activePartitions0, tcds::Header_v1::activePartitions1, tcds::Header_v1::activePartitions2, activePartitions_, tcds::bgoCount_v1, tcds::Raw_v1::bgoHistory, tcds::Raw_v1::bst, bst_, tcds::Header_v1::bstReceptionStatus, bstReceptionStatus_, tcds::Header_v1::bxid, bxid_, watchdog::const, tcds::Header_v1::eventNumber, eventNumber_, eventType_, tcds::Header_v1::fwVersion, fwVersion_, tcds::Raw_v1::header, mps_fire::i, tcds::Header_v1::inputs, inputs_, tcds::Raw_v1::l1aHistory, l1aHistory_, tcds::l1aHistoryDepth_v1, tcds::L1aHistory_v1::l1aInfo, tcds::BGoHistory_v1::lastBGo, lastBgos_, FEDHeader::length, tcds::Header_v1::lumiSection, lumiSection_, tcds::Header_v1::macAddress, macAddress_, tcds::Header_v1::nibble, nibble_, tcds::Header_v1::nibblesPerLumiSection, nibblesPerLumiSection_, tcds::Header_v1::orbitHigh, tcds::LastBGo_v1::orbithigh, tcds::Header_v1::orbitLow, tcds::LastBGo_v1::orbitlow, orbitNr_, tcds::Header_v1::recordVersion, recordVersion_, tcds::Header_v1::runNumber, runNumber_, tcds::Header_v1::swVersion, swVersion_, tcds::Header_v1::triggerCount, triggerCount_, FEDHeader::triggerType(), tcds::Header_v1::triggerTypeFlags, and triggerTypeFlags_.

25  {
26  tcds::Raw_v1 const* tcdsRaw = reinterpret_cast<tcds::Raw_v1 const*>(rawData + FEDHeader::length);
27  const FEDHeader fedHeader(rawData);
28 
29  orbitNr_ = (tcdsRaw->header.orbitHigh << 16) | tcdsRaw->header.orbitLow;
31  eventNumber_ = tcdsRaw->header.eventNumber;
32  macAddress_ = tcdsRaw->header.macAddress;
33  swVersion_ = tcdsRaw->header.swVersion;
34  fwVersion_ = tcdsRaw->header.fwVersion;
36  runNumber_ = tcdsRaw->header.runNumber;
38  nibble_ = tcdsRaw->header.nibble;
39  lumiSection_ = tcdsRaw->header.lumiSection;
41  eventType_ = fedHeader.triggerType();
43  inputs_ = tcdsRaw->header.inputs;
44  bxid_ = tcdsRaw->header.bxid;
45 
49 
50  bst_ = BSTRecord(tcdsRaw->bst);
51 
52  for (auto i = 0; i < tcds::l1aHistoryDepth_v1; ++i) {
53  l1aHistory_.emplace_back(L1aInfo(tcdsRaw->l1aHistory.l1aInfo[i]));
54  }
55 
56  for (auto i = 0; i < tcds::bgoCount_v1; ++i) {
57  lastBgos_.emplace_back(((uint64_t)(tcdsRaw->bgoHistory.lastBGo[i].orbithigh) << 32) |
58  tcdsRaw->bgoHistory.lastBGo[i].orbitlow);
59  }
60 }
uint16_t triggerTypeFlags_
Definition: TCDSRecord.h:146
const uint16_t nibblesPerLumiSection
Definition: TCDSRaw.h:43
const uint16_t orbitLow
Definition: TCDSRaw.h:48
static const uint32_t length
Definition: FEDHeader.h:54
const uint64_t macAddress
Definition: TCDSRaw.h:30
const uint32_t lumiSection
Definition: TCDSRaw.h:42
L1aHistory l1aHistory_
Definition: TCDSRecord.h:151
const uint16_t bxid
Definition: TCDSRaw.h:47
const uint32_t activePartitions1
Definition: TCDSRaw.h:40
uint64_t triggerCount_
Definition: TCDSRecord.h:134
uint32_t bstReceptionStatus_
Definition: TCDSRecord.h:141
const uint8_t bgoCount_v1
Definition: TCDSRaw.h:100
uint32_t lumiSection_
Definition: TCDSRecord.h:143
const uint32_t bstReceptionStatus
Definition: TCDSRaw.h:38
uint16_t inputs_
Definition: TCDSRecord.h:147
uint64_t orbitNr_
Definition: TCDSRecord.h:133
uint32_t runNumber_
Definition: TCDSRecord.h:140
Class to contain L1 accept history information from TCDS FED.
Definition: L1aInfo.h:16
const uint64_t eventNumber
Definition: TCDSRaw.h:51
BSTRecord bst_
Definition: TCDSRecord.h:153
std::bitset< 96 > ActivePartitions
Definition: TCDSRecord.h:103
const uint32_t recordVersion
Definition: TCDSRaw.h:34
uint16_t eventType_
Definition: TCDSRecord.h:145
uint16_t bxid_
Definition: TCDSRecord.h:148
Class representing the Beam Synchronous Timing (BST) information included in the TCDS record...
Definition: BSTRecord.h:22
const uint32_t orbitHigh
Definition: TCDSRaw.h:49
const uint32_t activePartitions0
Definition: TCDSRaw.h:39
ActivePartitions activePartitions_
Definition: TCDSRecord.h:150
const struct BST_v1 bst
Definition: TCDSRaw.h:110
uint16_t nibblesPerLumiSection_
Definition: TCDSRecord.h:144
const struct LastBGo_v1 lastBGo[bgoCount_v1]
Definition: TCDSRaw.h:103
std::vector< uint32_t > lastBgos_
Definition: TCDSRecord.h:155
const uint32_t fwVersion
Definition: TCDSRaw.h:32
const uint8_t l1aHistoryDepth_v1
Definition: TCDSRaw.h:66
const uint32_t nibble
Definition: TCDSRaw.h:41
unsigned long long uint64_t
Definition: Time.h:13
const uint16_t inputs
Definition: TCDSRaw.h:46
L1aInfo_v1 l1aInfo[l1aHistoryDepth_v1]
Definition: TCDSRaw.h:68
uint32_t fwVersion_
Definition: TCDSRecord.h:138
uint32_t nibble_
Definition: TCDSRecord.h:142
const uint32_t orbitlow
Definition: TCDSRaw.h:95
uint32_t recordVersion_
Definition: TCDSRecord.h:139
const uint32_t activePartitions2
Definition: TCDSRaw.h:37
const struct L1aHistory_v1 l1aHistory
Definition: TCDSRaw.h:109
const uint64_t triggerCount
Definition: TCDSRaw.h:50
const uint16_t triggerTypeFlags
Definition: TCDSRaw.h:44
const struct BGoHistory_v1 bgoHistory
Definition: TCDSRaw.h:111
const uint16_t orbithigh
Definition: TCDSRaw.h:96
const struct Header_v1 header
Definition: TCDSRaw.h:108
const uint32_t runNumber
Definition: TCDSRaw.h:35
const uint32_t swVersion
Definition: TCDSRaw.h:31
uint64_t macAddress_
Definition: TCDSRecord.h:136
uint32_t swVersion_
Definition: TCDSRecord.h:137
uint64_t eventNumber_
Definition: TCDSRecord.h:135
TCDSRecord::~TCDSRecord ( )
virtual

Definition at line 62 of file TCDSRecord.cc.

62 {}

Member Function Documentation

ActivePartitions TCDSRecord::getActivePartitions ( ) const
inline

Definition at line 104 of file TCDSRecord.h.

References activePartitions_.

Referenced by operator<<().

104 { return activePartitions_; }
ActivePartitions activePartitions_
Definition: TCDSRecord.h:150
const BSTRecord& TCDSRecord::getBST ( ) const
inline

Definition at line 100 of file TCDSRecord.h.

References bst_.

Referenced by ECALpedestalPCLworker::analyze(), DQMProvInfo::analyzeLhcInfo(), ecaldqm::TrigPrimTask::beginEvent(), and operator<<().

100 { return bst_; }
BSTRecord bst_
Definition: TCDSRecord.h:153
uint32_t TCDSRecord::getBstReceptionStatus ( ) const
inline

Definition at line 97 of file TCDSRecord.h.

References bstReceptionStatus_.

Referenced by operator<<().

97 { return bstReceptionStatus_; }
uint32_t bstReceptionStatus_
Definition: TCDSRecord.h:141
uint16_t TCDSRecord::getBXID ( ) const
inline

Definition at line 85 of file TCDSRecord.h.

References bxid_.

Referenced by operator<<().

85 { return bxid_; }
uint16_t bxid_
Definition: TCDSRecord.h:148
uint64_t TCDSRecord::getEventNumber ( ) const
inline

Definition at line 94 of file TCDSRecord.h.

References eventNumber_.

Referenced by operator<<().

94 { return eventNumber_; }
uint64_t eventNumber_
Definition: TCDSRecord.h:135
uint16_t TCDSRecord::getEventType ( ) const
inline

Definition at line 74 of file TCDSRecord.h.

References eventType_.

Referenced by operator<<().

74 { return eventType_; }
uint16_t eventType_
Definition: TCDSRecord.h:145
const L1aHistory& TCDSRecord::getFullL1aHistory ( ) const
inline

Definition at line 108 of file TCDSRecord.h.

References l1aHistory_.

Referenced by operator<<().

108 { return l1aHistory_; }
L1aHistory l1aHistory_
Definition: TCDSRecord.h:151
uint32_t TCDSRecord::getFwVersion ( ) const
inline

Definition at line 56 of file TCDSRecord.h.

References fwVersion_.

Referenced by operator<<().

56 { return fwVersion_; }
uint32_t fwVersion_
Definition: TCDSRecord.h:138
uint16_t TCDSRecord::getInputs ( ) const
inline

Definition at line 82 of file TCDSRecord.h.

References inputs_.

Referenced by operator<<().

82 { return inputs_; }
uint16_t inputs_
Definition: TCDSRecord.h:147
const L1aInfo& TCDSRecord::getL1aHistoryEntry ( const uint8_t  entry) const
inline

Definition at line 109 of file TCDSRecord.h.

References l1aHistory_.

109 { return l1aHistory_.at(entry); }
L1aHistory l1aHistory_
Definition: TCDSRecord.h:151
uint32_t TCDSRecord::getLastEventCounter0 ( ) const
inline

Definition at line 127 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

127 { return lastBgos_.at(BGo::EC0); }
std::vector< uint32_t > lastBgos_
Definition: TCDSRecord.h:155
uint32_t TCDSRecord::getLastHardReset ( ) const
inline

Definition at line 130 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

130 { return lastBgos_.at(BGo::HardReset); }
std::vector< uint32_t > lastBgos_
Definition: TCDSRecord.h:155
uint32_t TCDSRecord::getLastOrbitCounter0 ( ) const
inline

Definition at line 115 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

115 { return lastBgos_.at(BGo::OC0); }
std::vector< uint32_t > lastBgos_
Definition: TCDSRecord.h:155
uint32_t TCDSRecord::getLastResync ( ) const
inline

Definition at line 121 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

121 { return lastBgos_.at(BGo::Resync); }
std::vector< uint32_t > lastBgos_
Definition: TCDSRecord.h:155
uint32_t TCDSRecord::getLastStart ( ) const
inline

Definition at line 124 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

124 { return lastBgos_.at(BGo::Start); }
std::vector< uint32_t > lastBgos_
Definition: TCDSRecord.h:155
uint32_t TCDSRecord::getLastTestEnable ( ) const
inline

Definition at line 118 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

118 { return lastBgos_.at(BGo::TestEnable); }
std::vector< uint32_t > lastBgos_
Definition: TCDSRecord.h:155
uint32_t TCDSRecord::getLumiSection ( ) const
inline

Definition at line 65 of file TCDSRecord.h.

References lumiSection_.

Referenced by operator<<().

65 { return lumiSection_; }
uint32_t lumiSection_
Definition: TCDSRecord.h:143
uint64_t TCDSRecord::getMacAddress ( ) const
inline

Definition at line 50 of file TCDSRecord.h.

References macAddress_.

Referenced by operator<<().

50 { return macAddress_; }
uint64_t macAddress_
Definition: TCDSRecord.h:136
uint32_t TCDSRecord::getNibble ( ) const
inline

Definition at line 68 of file TCDSRecord.h.

References nibble_.

Referenced by operator<<().

68 { return nibble_; }
uint32_t nibble_
Definition: TCDSRecord.h:142
uint16_t TCDSRecord::getNibblesPerLumiSection ( ) const
inline

Definition at line 71 of file TCDSRecord.h.

References nibblesPerLumiSection_.

Referenced by operator<<().

71 { return nibblesPerLumiSection_; }
uint16_t nibblesPerLumiSection_
Definition: TCDSRecord.h:144
uint64_t TCDSRecord::getOrbitNr ( ) const
inline

Definition at line 88 of file TCDSRecord.h.

References orbitNr_.

Referenced by operator<<().

88 { return orbitNr_; }
uint64_t orbitNr_
Definition: TCDSRecord.h:133
uint32_t TCDSRecord::getOrbitOfLastBgo ( const uint16_t  bgo) const
inline

Definition at line 112 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

112 { return lastBgos_.at(bgo); }
std::vector< uint32_t > lastBgos_
Definition: TCDSRecord.h:155
uint32_t TCDSRecord::getRecordVersion ( ) const
inline

Definition at line 59 of file TCDSRecord.h.

References recordVersion_.

Referenced by operator<<().

59 { return recordVersion_; }
uint32_t recordVersion_
Definition: TCDSRecord.h:139
uint32_t TCDSRecord::getRunNumber ( ) const
inline

Definition at line 62 of file TCDSRecord.h.

References runNumber_.

Referenced by operator<<().

62 { return runNumber_; }
uint32_t runNumber_
Definition: TCDSRecord.h:140
uint32_t TCDSRecord::getSwVersion ( ) const
inline

Definition at line 53 of file TCDSRecord.h.

References swVersion_.

Referenced by operator<<().

53 { return swVersion_; }
uint32_t swVersion_
Definition: TCDSRecord.h:137
uint64_t TCDSRecord::getTriggerCount ( ) const
inline

Definition at line 91 of file TCDSRecord.h.

References triggerCount_.

Referenced by L1TValidationEventFilter::filter(), and operator<<().

91 { return triggerCount_; }
uint64_t triggerCount_
Definition: TCDSRecord.h:134
uint16_t TCDSRecord::getTriggerTypeFlags ( ) const
inline

Definition at line 79 of file TCDSRecord.h.

References triggerTypeFlags_.

Referenced by operator<<().

79 { return triggerTypeFlags_; }
uint16_t triggerTypeFlags_
Definition: TCDSRecord.h:146

Member Data Documentation

ActivePartitions TCDSRecord::activePartitions_
private

Definition at line 150 of file TCDSRecord.h.

Referenced by getActivePartitions(), and TCDSRecord().

BSTRecord TCDSRecord::bst_
private

Definition at line 153 of file TCDSRecord.h.

Referenced by getBST(), and TCDSRecord().

uint32_t TCDSRecord::bstReceptionStatus_
private

Definition at line 141 of file TCDSRecord.h.

Referenced by getBstReceptionStatus(), and TCDSRecord().

uint16_t TCDSRecord::bxid_
private

Definition at line 148 of file TCDSRecord.h.

Referenced by getBXID(), and TCDSRecord().

uint64_t TCDSRecord::eventNumber_
private

Definition at line 135 of file TCDSRecord.h.

Referenced by getEventNumber(), and TCDSRecord().

uint16_t TCDSRecord::eventType_
private

Definition at line 145 of file TCDSRecord.h.

Referenced by getEventType(), and TCDSRecord().

uint32_t TCDSRecord::fwVersion_
private

Definition at line 138 of file TCDSRecord.h.

Referenced by getFwVersion(), and TCDSRecord().

uint16_t TCDSRecord::inputs_
private

Definition at line 147 of file TCDSRecord.h.

Referenced by getInputs(), and TCDSRecord().

L1aHistory TCDSRecord::l1aHistory_
private

Definition at line 151 of file TCDSRecord.h.

Referenced by getFullL1aHistory(), getL1aHistoryEntry(), and TCDSRecord().

std::vector<uint32_t> TCDSRecord::lastBgos_
private
uint32_t TCDSRecord::lumiSection_
private

Definition at line 143 of file TCDSRecord.h.

Referenced by getLumiSection(), and TCDSRecord().

uint64_t TCDSRecord::macAddress_
private

Definition at line 136 of file TCDSRecord.h.

Referenced by getMacAddress(), and TCDSRecord().

uint32_t TCDSRecord::nibble_
private

Definition at line 142 of file TCDSRecord.h.

Referenced by getNibble(), and TCDSRecord().

uint16_t TCDSRecord::nibblesPerLumiSection_
private

Definition at line 144 of file TCDSRecord.h.

Referenced by getNibblesPerLumiSection(), and TCDSRecord().

uint64_t TCDSRecord::orbitNr_
private

Definition at line 133 of file TCDSRecord.h.

Referenced by getOrbitNr(), and TCDSRecord().

uint32_t TCDSRecord::recordVersion_
private

Definition at line 139 of file TCDSRecord.h.

Referenced by getRecordVersion(), and TCDSRecord().

uint32_t TCDSRecord::runNumber_
private

Definition at line 140 of file TCDSRecord.h.

Referenced by getRunNumber(), and TCDSRecord().

uint32_t TCDSRecord::swVersion_
private

Definition at line 137 of file TCDSRecord.h.

Referenced by getSwVersion(), and TCDSRecord().

uint64_t TCDSRecord::triggerCount_
private

Definition at line 134 of file TCDSRecord.h.

Referenced by getTriggerCount(), and TCDSRecord().

uint16_t TCDSRecord::triggerTypeFlags_
private

Definition at line 146 of file TCDSRecord.h.

Referenced by getTriggerTypeFlags(), and TCDSRecord().