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 21 of file TCDSRecord.h.

Member Typedef Documentation

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

Definition at line 107 of file TCDSRecord.h.

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

Definition at line 111 of file TCDSRecord.h.

Member Enumeration Documentation

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

Definition at line 25 of file TCDSRecord.h.

Enumerator
Unknown 
Reset 
Unlocked 
NoData 
Okay 

Definition at line 41 of file TCDSRecord.h.

41  {
42  Unknown = 0x00000000,
43  Reset = 0x0000dead,
44  Unlocked = 0xfa11010c,
45  NoData = 0xfa110acc,
46  Okay = 0x0000bea0
47  };

Constructor & Destructor Documentation

TCDSRecord::TCDSRecord ( )

Definition at line 7 of file TCDSRecord.cc.

7  :
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)
24 {}
uint16_t triggerTypeFlags_
Definition: TCDSRecord.h:152
uint64_t triggerCount_
Definition: TCDSRecord.h:140
uint32_t bstReceptionStatus_
Definition: TCDSRecord.h:147
uint32_t lumiSection_
Definition: TCDSRecord.h:149
uint16_t inputs_
Definition: TCDSRecord.h:153
uint64_t orbitNr_
Definition: TCDSRecord.h:139
uint32_t runNumber_
Definition: TCDSRecord.h:146
uint16_t eventType_
Definition: TCDSRecord.h:151
uint16_t bxid_
Definition: TCDSRecord.h:154
uint16_t nibblesPerLumiSection_
Definition: TCDSRecord.h:150
uint32_t fwVersion_
Definition: TCDSRecord.h:144
uint32_t nibble_
Definition: TCDSRecord.h:148
uint32_t recordVersion_
Definition: TCDSRecord.h:145
uint64_t macAddress_
Definition: TCDSRecord.h:142
uint32_t swVersion_
Definition: TCDSRecord.h:143
uint64_t eventNumber_
Definition: TCDSRecord.h:141
TCDSRecord::TCDSRecord ( const unsigned char *  rawData)

Definition at line 27 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_, fedh_struct::eventid, tcds::Header_v1::eventNumber, eventNumber_, eventType_, FED_EVTY_EXTRACT, tcds::Raw_v1::fedHeader, 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_, 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_, tcds::Header_v1::triggerTypeFlags, and triggerTypeFlags_.

28 {
29  tcds::Raw_v1 const* tcdsRaw =
30  reinterpret_cast<tcds::Raw_v1 const*>(rawData);
31 
32  orbitNr_ = (tcdsRaw->header.orbitHigh << 16) | tcdsRaw->header.orbitLow;
34  eventNumber_ = tcdsRaw->header.eventNumber;
35  macAddress_ = tcdsRaw->header.macAddress;
36  swVersion_ = tcdsRaw->header.swVersion;
37  fwVersion_ = tcdsRaw->header.fwVersion;
39  runNumber_ = tcdsRaw->header.runNumber;
41  nibble_ = tcdsRaw->header.nibble;
42  lumiSection_ = tcdsRaw->header.lumiSection;
46  inputs_ = tcdsRaw->header.inputs;
47  bxid_ = tcdsRaw->header.bxid;
48 
52 
53  bst_ = BSTRecord(tcdsRaw->bst);
54 
55  for (auto i = 0; i < tcds::l1aHistoryDepth_v1; ++i)
56  {
57  l1aHistory_.emplace_back(L1aInfo(tcdsRaw->l1aHistory.l1aInfo[i]));
58  }
59 
60  for (auto i = 0; i < tcds::bgoCount_v1; ++i)
61  {
62  lastBgos_.emplace_back(((uint64_t)(tcdsRaw->bgoHistory.lastBGo[i].orbithigh)<<32) | tcdsRaw->bgoHistory.lastBGo[i].orbitlow);
63  }
64 }
uint16_t triggerTypeFlags_
Definition: TCDSRecord.h:152
const uint16_t nibblesPerLumiSection
Definition: TCDSRaw.h:47
const uint16_t orbitLow
Definition: TCDSRaw.h:52
const uint64_t macAddress
Definition: TCDSRaw.h:34
const uint32_t lumiSection
Definition: TCDSRaw.h:46
L1aHistory l1aHistory_
Definition: TCDSRecord.h:157
const uint16_t bxid
Definition: TCDSRaw.h:51
const uint32_t activePartitions1
Definition: TCDSRaw.h:44
uint64_t triggerCount_
Definition: TCDSRecord.h:140
uint32_t bstReceptionStatus_
Definition: TCDSRecord.h:147
const uint8_t bgoCount_v1
Definition: TCDSRaw.h:108
uint32_t lumiSection_
Definition: TCDSRecord.h:149
const uint32_t bstReceptionStatus
Definition: TCDSRaw.h:42
uint16_t inputs_
Definition: TCDSRecord.h:153
uint64_t orbitNr_
Definition: TCDSRecord.h:139
uint32_t runNumber_
Definition: TCDSRecord.h:146
Class to contain L1 accept history information from TCDS FED.
Definition: L1aInfo.h:17
const fedh_t fedHeader
Definition: TCDSRaw.h:117
const uint64_t eventNumber
Definition: TCDSRaw.h:55
BSTRecord bst_
Definition: TCDSRecord.h:159
std::bitset< 96 > ActivePartitions
Definition: TCDSRecord.h:107
const uint32_t recordVersion
Definition: TCDSRaw.h:38
uint16_t eventType_
Definition: TCDSRecord.h:151
uint16_t bxid_
Definition: TCDSRecord.h:154
Class representing the Beam Synchronous Timing (BST) information included in the TCDS record...
Definition: BSTRecord.h:23
const uint32_t orbitHigh
Definition: TCDSRaw.h:53
const uint32_t activePartitions0
Definition: TCDSRaw.h:43
ActivePartitions activePartitions_
Definition: TCDSRecord.h:156
const struct BST_v1 bst
Definition: TCDSRaw.h:121
uint16_t nibblesPerLumiSection_
Definition: TCDSRecord.h:150
const struct LastBGo_v1 lastBGo[bgoCount_v1]
Definition: TCDSRaw.h:112
#define FED_EVTY_EXTRACT(a)
Definition: fed_header.h:38
std::vector< uint32_t > lastBgos_
Definition: TCDSRecord.h:161
const uint32_t fwVersion
Definition: TCDSRaw.h:36
const uint8_t l1aHistoryDepth_v1
Definition: TCDSRaw.h:71
const uint32_t nibble
Definition: TCDSRaw.h:45
unsigned long long uint64_t
Definition: Time.h:15
const uint16_t inputs
Definition: TCDSRaw.h:50
L1aInfo_v1 l1aInfo[l1aHistoryDepth_v1]
Definition: TCDSRaw.h:74
unsigned int eventid
Definition: fed_header.h:33
uint32_t fwVersion_
Definition: TCDSRecord.h:144
uint32_t nibble_
Definition: TCDSRecord.h:148
const uint32_t orbitlow
Definition: TCDSRaw.h:103
uint32_t recordVersion_
Definition: TCDSRecord.h:145
const uint32_t activePartitions2
Definition: TCDSRaw.h:41
const struct L1aHistory_v1 l1aHistory
Definition: TCDSRaw.h:120
const uint64_t triggerCount
Definition: TCDSRaw.h:54
const uint16_t triggerTypeFlags
Definition: TCDSRaw.h:48
const struct BGoHistory_v1 bgoHistory
Definition: TCDSRaw.h:122
const uint16_t orbithigh
Definition: TCDSRaw.h:104
const struct Header_v1 header
Definition: TCDSRaw.h:119
const uint32_t runNumber
Definition: TCDSRaw.h:39
const uint32_t swVersion
Definition: TCDSRaw.h:35
uint64_t macAddress_
Definition: TCDSRecord.h:142
uint32_t swVersion_
Definition: TCDSRecord.h:143
uint64_t eventNumber_
Definition: TCDSRecord.h:141
TCDSRecord::~TCDSRecord ( )
virtual

Definition at line 67 of file TCDSRecord.cc.

67 {}

Member Function Documentation

ActivePartitions TCDSRecord::getActivePartitions ( ) const
inline

Definition at line 108 of file TCDSRecord.h.

References activePartitions_.

Referenced by operator<<().

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

Definition at line 104 of file TCDSRecord.h.

References bst_.

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

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

Definition at line 101 of file TCDSRecord.h.

References bstReceptionStatus_.

Referenced by operator<<().

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

Definition at line 89 of file TCDSRecord.h.

References bxid_.

Referenced by operator<<().

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

Definition at line 98 of file TCDSRecord.h.

References eventNumber_.

Referenced by operator<<().

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

Definition at line 78 of file TCDSRecord.h.

References eventType_.

Referenced by operator<<().

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

Definition at line 112 of file TCDSRecord.h.

References l1aHistory_.

Referenced by operator<<().

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

Definition at line 60 of file TCDSRecord.h.

References fwVersion_.

Referenced by operator<<().

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

Definition at line 86 of file TCDSRecord.h.

References inputs_.

Referenced by operator<<().

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

Definition at line 113 of file TCDSRecord.h.

References l1aHistory_.

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

Definition at line 131 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

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

Definition at line 134 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

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

Definition at line 119 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

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

Definition at line 125 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

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

Definition at line 128 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

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

Definition at line 122 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

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

Definition at line 69 of file TCDSRecord.h.

References lumiSection_.

Referenced by operator<<().

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

Definition at line 54 of file TCDSRecord.h.

References macAddress_.

Referenced by operator<<().

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

Definition at line 72 of file TCDSRecord.h.

References nibble_.

Referenced by operator<<().

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

Definition at line 75 of file TCDSRecord.h.

References nibblesPerLumiSection_.

Referenced by operator<<().

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

Definition at line 92 of file TCDSRecord.h.

References orbitNr_.

Referenced by operator<<().

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

Definition at line 116 of file TCDSRecord.h.

References lastBgos_.

Referenced by operator<<().

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

Definition at line 63 of file TCDSRecord.h.

References recordVersion_.

Referenced by operator<<().

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

Definition at line 66 of file TCDSRecord.h.

References runNumber_.

Referenced by operator<<().

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

Definition at line 57 of file TCDSRecord.h.

References swVersion_.

Referenced by operator<<().

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

Definition at line 95 of file TCDSRecord.h.

References triggerCount_.

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

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

Definition at line 83 of file TCDSRecord.h.

References triggerTypeFlags_.

Referenced by operator<<().

83 { return triggerTypeFlags_; }
uint16_t triggerTypeFlags_
Definition: TCDSRecord.h:152

Member Data Documentation

ActivePartitions TCDSRecord::activePartitions_
private

Definition at line 156 of file TCDSRecord.h.

Referenced by getActivePartitions(), and TCDSRecord().

BSTRecord TCDSRecord::bst_
private

Definition at line 159 of file TCDSRecord.h.

Referenced by getBST(), and TCDSRecord().

uint32_t TCDSRecord::bstReceptionStatus_
private

Definition at line 147 of file TCDSRecord.h.

Referenced by getBstReceptionStatus(), and TCDSRecord().

uint16_t TCDSRecord::bxid_
private

Definition at line 154 of file TCDSRecord.h.

Referenced by getBXID(), and TCDSRecord().

uint64_t TCDSRecord::eventNumber_
private

Definition at line 141 of file TCDSRecord.h.

Referenced by getEventNumber(), and TCDSRecord().

uint16_t TCDSRecord::eventType_
private

Definition at line 151 of file TCDSRecord.h.

Referenced by getEventType(), and TCDSRecord().

uint32_t TCDSRecord::fwVersion_
private

Definition at line 144 of file TCDSRecord.h.

Referenced by getFwVersion(), and TCDSRecord().

uint16_t TCDSRecord::inputs_
private

Definition at line 153 of file TCDSRecord.h.

Referenced by getInputs(), and TCDSRecord().

L1aHistory TCDSRecord::l1aHistory_
private

Definition at line 157 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 149 of file TCDSRecord.h.

Referenced by getLumiSection(), and TCDSRecord().

uint64_t TCDSRecord::macAddress_
private

Definition at line 142 of file TCDSRecord.h.

Referenced by getMacAddress(), and TCDSRecord().

uint32_t TCDSRecord::nibble_
private

Definition at line 148 of file TCDSRecord.h.

Referenced by getNibble(), and TCDSRecord().

uint16_t TCDSRecord::nibblesPerLumiSection_
private

Definition at line 150 of file TCDSRecord.h.

Referenced by getNibblesPerLumiSection(), and TCDSRecord().

uint64_t TCDSRecord::orbitNr_
private

Definition at line 139 of file TCDSRecord.h.

Referenced by getOrbitNr(), and TCDSRecord().

uint32_t TCDSRecord::recordVersion_
private

Definition at line 145 of file TCDSRecord.h.

Referenced by getRecordVersion(), and TCDSRecord().

uint32_t TCDSRecord::runNumber_
private

Definition at line 146 of file TCDSRecord.h.

Referenced by getRunNumber(), and TCDSRecord().

uint32_t TCDSRecord::swVersion_
private

Definition at line 143 of file TCDSRecord.h.

Referenced by getSwVersion(), and TCDSRecord().

uint64_t TCDSRecord::triggerCount_
private

Definition at line 140 of file TCDSRecord.h.

Referenced by getTriggerCount(), and TCDSRecord().

uint16_t TCDSRecord::triggerTypeFlags_
private

Definition at line 152 of file TCDSRecord.h.

Referenced by getTriggerTypeFlags(), and TCDSRecord().