CMS 3D CMS Logo

Classes | Enumerations | Functions | Variables
Phase2Tracker Namespace Reference

Classes

class  FEDDAQHeader
 
class  FEDDAQTrailer
 
class  Phase2TrackerCommissioningDigiProducer
 
class  Phase2TrackerDigiProducer
 
class  Phase2TrackerFEDBuffer
 
class  Phase2TrackerFEDChannel
 
class  Phase2TrackerFEDHeader
 
class  Phase2TrackerFEDRawChannelUnpacker
 
class  Phase2TrackerFEDZSChannelUnpacker
 

Enumerations

enum  FEDDAQEventType {
  DAQ_EVENT_TYPE_PHYSICS = 0x1, DAQ_EVENT_TYPE_CALIBRATION = 0x2, DAQ_EVENT_TYPE_TEST = 0x3, DAQ_EVENT_TYPE_TECHNICAL = 0x4,
  DAQ_EVENT_TYPE_SIMULATED = 0x5, DAQ_EVENT_TYPE_TRACED = 0x6, DAQ_EVENT_TYPE_ERROR = 0xF, DAQ_EVENT_TYPE_INVALID = INVALID
}
 
enum  FEDReadoutMode {
  READOUT_MODE_INVALID = INVALID, READOUT_MODE_SCOPE = 0x1, READOUT_MODE_VIRGIN_RAW = 0x2, READOUT_MODE_PROC_RAW = 0x6,
  READOUT_MODE_ZERO_SUPPRESSED = 0xA, READOUT_MODE_ZERO_SUPPRESSED_LITE = 0xC, READOUT_MODE_SPY = 0xE
}
 
enum  FEDTTSBits {
  TTS_DISCONNECTED0 = 0x0, TTS_WARN_OVERFLOW = 0x1, TTS_OUT_OF_SYNC = 0x2, TTS_BUSY = 0x4,
  TTS_READY = 0x8, TTS_ERROR = 0x12, TTS_DISCONNECTED1 = 0xF, TTS_INVALID = INVALID
}
 
enum  READ_MODE { READ_MODE_INVALID = INVALID, SUMMARY = 0, FULL_DEBUG = 1, CBC_ERROR = 2 }
 
enum  trackerHeader_m {
  VERSION_M = 0xF000000000000000, HEADER_FORMAT_M = 0x0C00000000000000, EVENT_TYPE_M = 0x03C0000000000000, GLIB_STATUS_M = 0x003FFFFFFFFF0000,
  FRONTEND_STAT_M = 0x000000000000FFFF, CBC_NUMBER_M = 0xFFFF000000000000
}
 
enum  trackerHeader_s {
  VERSION_S = 60, HEADER_FORMAT_S = 58, EVENT_TYPE_S = 54, GLIB_STATUS_S = 16,
  FRONTEND_STAT_S = 0, CBC_NUMBER_S = 48
}
 

Functions

uint64_t extract64 (trackerHeader_m mask, trackerHeader_s shift, uint64_t data)
 
std::ostream & operator<< (std::ostream &os, const FEDDAQEventType &value)
 
std::ostream & operator<< (std::ostream &os, const FEDTTSBits &value)
 
std::ostream & operator<< (std::ostream &os, const FEDReadoutMode &value)
 
std::ostream & operator<< (std::ostream &os, const READ_MODE &value)
 
void printHex (const void *pointer, const size_t lengthInBytes, std::ostream &os)
 
void printHexValue (const uint8_t value, std::ostream &os)
 
void printHexWord (const uint8_t *pointer, const size_t lengthInBytes, std::ostream &os)
 
void printNibbleValue (uint8_t value, std::ostream &os)
 
uint64_t read64 (int offset, const uint8_t *buffer)
 

Variables

static const uint16_t CMS_FED_ID_MAX = static_cast<uint16_t>(FEDNumbering::MAXFEDID)
 
static const uint16_t FED_ID_MAX = static_cast<uint16_t>(FEDNumbering::MAXSiStripFEDID)
 
static const uint16_t FED_ID_MIN = static_cast<uint16_t>(FEDNumbering::MINSiStripFEDID)
 
static const uint8_t INVALID = 0xFF
 
static const int MAX_CBC_PER_FE = 16
 
static const int MAX_FE_PER_FED = 16
 
static const uint16_t NUMBER_OF_FEDS = static_cast<uint16_t>(FED_ID_MAX - FED_ID_MIN + 1)
 
static const int STRIPS_PADDING = 2
 
static const int STRIPS_PER_CBC = 254
 
static const int TRIGGER_SIZE = 0
 

Enumeration Type Documentation

◆ FEDDAQEventType

◆ FEDReadoutMode

Enumerator
READOUT_MODE_INVALID 
READOUT_MODE_SCOPE 
READOUT_MODE_VIRGIN_RAW 
READOUT_MODE_PROC_RAW 
READOUT_MODE_ZERO_SUPPRESSED 
READOUT_MODE_ZERO_SUPPRESSED_LITE 
READOUT_MODE_SPY 

Definition at line 96 of file utils.h.

◆ FEDTTSBits

◆ READ_MODE

Enumerator
READ_MODE_INVALID 
SUMMARY 
FULL_DEBUG 
CBC_ERROR 

Definition at line 142 of file utils.h.

◆ trackerHeader_m

Enumerator
VERSION_M 
HEADER_FORMAT_M 
EVENT_TYPE_M 
GLIB_STATUS_M 
FRONTEND_STAT_M 
CBC_NUMBER_M 

Definition at line 168 of file utils.h.

168  {
169  VERSION_M = 0xF000000000000000,
170  HEADER_FORMAT_M = 0x0C00000000000000,
171  EVENT_TYPE_M = 0x03C0000000000000,
172  GLIB_STATUS_M = 0x003FFFFFFFFF0000,
173  FRONTEND_STAT_M = 0x000000000000FFFF,
174  CBC_NUMBER_M = 0xFFFF000000000000
175  };

◆ trackerHeader_s

Enumerator
VERSION_S 
HEADER_FORMAT_S 
EVENT_TYPE_S 
GLIB_STATUS_S 
FRONTEND_STAT_S 
CBC_NUMBER_S 

Definition at line 177 of file utils.h.

Function Documentation

◆ extract64()

uint64_t Phase2Tracker::extract64 ( trackerHeader_m  mask,
trackerHeader_s  shift,
uint64_t  data 
)
inline

◆ operator<<() [1/4]

std::ostream & Phase2Tracker::operator<< ( std::ostream &  os,
const FEDDAQEventType value 
)
inline

Definition at line 7 of file Phase2TrackerFEDDAQHeader.cc.

References DAQ_EVENT_TYPE_CALIBRATION, DAQ_EVENT_TYPE_ERROR, DAQ_EVENT_TYPE_INVALID, DAQ_EVENT_TYPE_PHYSICS, DAQ_EVENT_TYPE_SIMULATED, DAQ_EVENT_TYPE_TECHNICAL, DAQ_EVENT_TYPE_TEST, DAQ_EVENT_TYPE_TRACED, l1tGTMenu_BTagSeeds_cff::os, and printHexValue().

7  {
8  switch (value) {
10  os << "Physics trigger";
11  break;
13  os << "Calibration trigger";
14  break;
16  os << "Test trigger";
17  break;
19  os << "Technical trigger";
20  break;
22  os << "Simulated event";
23  break;
25  os << "Traced event";
26  break;
28  os << "Error";
29  break;
31  os << "Unknown";
32  break;
33  default:
34  os << "Unrecognized";
35  os << " (";
37  os << ")";
38  break;
39  }
40  return os;
41  }
Definition: value.py:1
void printHexValue(const uint8_t value, std::ostream &os)
Definition: utils.h:43

◆ operator<<() [2/4]

std::ostream & Phase2Tracker::operator<< ( std::ostream &  os,
const FEDTTSBits value 
)
inline

Definition at line 7 of file Phase2TrackerFEDDAQTrailer.cc.

References l1tGTMenu_BTagSeeds_cff::os, printHexValue(), TTS_BUSY, TTS_DISCONNECTED0, TTS_DISCONNECTED1, TTS_ERROR, TTS_INVALID, TTS_OUT_OF_SYNC, TTS_READY, and TTS_WARN_OVERFLOW.

7  {
8  switch (value) {
10  os << "Disconected 0";
11  break;
12  case TTS_WARN_OVERFLOW:
13  os << "Warning overflow";
14  break;
15  case TTS_OUT_OF_SYNC:
16  os << "Out of sync";
17  break;
18  case TTS_BUSY:
19  os << "Busy";
20  break;
21  case TTS_READY:
22  os << "Ready";
23  break;
24  case TTS_ERROR:
25  os << "Error";
26  break;
27  case TTS_INVALID:
28  os << "Invalid";
29  break;
30  case TTS_DISCONNECTED1:
31  os << "Disconected 1";
32  break;
33  default:
34  os << "Unrecognized";
35  os << " (";
37  os << ")";
38  break;
39  }
40  return os;
41  }
Definition: value.py:1
void printHexValue(const uint8_t value, std::ostream &os)
Definition: utils.h:43

◆ operator<<() [3/4]

std::ostream & Phase2Tracker::operator<< ( std::ostream &  os,
const FEDReadoutMode value 
)
inline

Definition at line 108 of file utils.h.

References l1tGTMenu_BTagSeeds_cff::os, printHexValue(), READOUT_MODE_INVALID, READOUT_MODE_PROC_RAW, READOUT_MODE_SCOPE, READOUT_MODE_SPY, READOUT_MODE_VIRGIN_RAW, READOUT_MODE_ZERO_SUPPRESSED, and READOUT_MODE_ZERO_SUPPRESSED_LITE.

108  {
109  switch (value) {
110  case READOUT_MODE_SCOPE:
111  os << "Scope mode";
112  break;
114  os << "Virgin raw";
115  break;
117  os << "Processed raw";
118  break;
120  os << "Zero suppressed";
121  break;
123  os << "Zero suppressed lite";
124  break;
125  case READOUT_MODE_SPY:
126  os << "Spy channel";
127  break;
129  os << "Invalid";
130  break;
131  default:
132  os << "Unrecognized";
133  os << " (";
135  os << ")";
136  break;
137  }
138  return os;
139  }
Definition: value.py:1
void printHexValue(const uint8_t value, std::ostream &os)
Definition: utils.h:43

◆ operator<<() [4/4]

std::ostream & Phase2Tracker::operator<< ( std::ostream &  os,
const READ_MODE value 
)
inline

Definition at line 146 of file utils.h.

References CBC_ERROR, FULL_DEBUG, l1tGTMenu_BTagSeeds_cff::os, printHexValue(), and SUMMARY.

146  {
147  switch (value) {
148  case SUMMARY:
149  os << "Summary mode";
150  break;
151  case FULL_DEBUG:
152  os << "Full debug mode";
153  break;
154  case CBC_ERROR:
155  os << "CBC error mode";
156  break;
157  default:
158  os << "Unrecognized mode";
159  os << " (";
161  os << ")";
162  break;
163  }
164  return os;
165  }
Definition: value.py:1
void printHexValue(const uint8_t value, std::ostream &os)
Definition: utils.h:43

◆ printHex()

void Phase2Tracker::printHex ( const void *  pointer,
const size_t  lengthInBytes,
std::ostream &  os 
)
inline

Definition at line 59 of file utils.h.

References l1tGTMenu_BTagSeeds_cff::os, AlCaHLTBitMon_ParallelJobs::p, printHexWord(), and w().

Referenced by Phase2Tracker::Phase2TrackerFEDHeader::dataFormatVersion(), Phase2Tracker::Phase2TrackerFEDHeader::debugMode(), Phase2Tracker::Phase2TrackerFEDBuffer::dump(), Phase2Tracker::FEDDAQHeader::print(), Phase2Tracker::FEDDAQTrailer::print(), and Phase2Tracker::Phase2TrackerFEDHeader::readoutMode().

59  {
60  const uint8_t* bytePointer = reinterpret_cast<const uint8_t*>(pointer);
61  //if there is one 64 bit word or less, print it out
62  if (lengthInBytes <= 8) {
63  printHexWord(bytePointer, lengthInBytes, os);
64  }
65  //otherwise, print word numbers etc
66  else {
67  //header
68  os << "word\tbyte\t \t\tbyte" << std::endl;
69  ;
70  const size_t words = lengthInBytes / 8;
71  const size_t extraBytes = lengthInBytes - 8 * words;
72  //print full words
73  for (size_t w = 0; w < words; w++) {
74  const size_t startByte = w * 8;
75  os << w << '\t' << startByte + 8 << '\t';
76  printHexWord(bytePointer + startByte, 8, os);
77  os << "\t\t" << startByte << std::endl;
78  }
79  //print part word, if any
80  if (extraBytes) {
81  const size_t startByte = words * 8;
82  os << words << '\t' << startByte + 8 << '\t';
83  //padding
84  size_t p = 8;
85  while (p-- > extraBytes) {
86  os << "00 ";
87  }
88  printHexWord(bytePointer + startByte, extraBytes, os);
89  os << "\t\t" << startByte << std::endl;
90  }
91  os << std::endl;
92  }
93  }
void printHexWord(const uint8_t *pointer, const size_t lengthInBytes, std::ostream &os)
Definition: utils.h:50
T w() const

◆ printHexValue()

void Phase2Tracker::printHexValue ( const uint8_t  value,
std::ostream &  os 
)
inline

Definition at line 43 of file utils.h.

References l1tGTMenu_BTagSeeds_cff::os.

Referenced by operator<<(), and printHexWord().

43  {
44  const std::ios_base::fmtflags originalFormatFlags = os.flags();
45  os << std::hex << std::setfill('0') << std::setw(2);
46  os << uint16_t(value);
47  os.flags(originalFormatFlags);
48  }
Definition: value.py:1

◆ printHexWord()

void Phase2Tracker::printHexWord ( const uint8_t *  pointer,
const size_t  lengthInBytes,
std::ostream &  os 
)
inline

Definition at line 50 of file utils.h.

References mps_fire::i, l1tGTMenu_BTagSeeds_cff::os, and printHexValue().

Referenced by printHex().

50  {
51  size_t i = lengthInBytes - 1;
52  do {
53  printHexValue(pointer[i], os);
54  if (i != 0)
55  os << " ";
56  } while (i-- != 0);
57  }
void printHexValue(const uint8_t value, std::ostream &os)
Definition: utils.h:43

◆ printNibbleValue()

void Phase2Tracker::printNibbleValue ( uint8_t  value,
std::ostream &  os 
)
inline

Definition at line 37 of file utils.h.

References l1tGTMenu_BTagSeeds_cff::os, and relativeConstraints::value.

37  {
38  const std::ios_base::fmtflags originalFormatFlags = os.flags();
39  os << std::hex << std::setw(1) << value;
40  os.flags(originalFormatFlags);
41  }

◆ read64()

uint64_t Phase2Tracker::read64 ( int  offset,
const uint8_t *  buffer 
)
inline

Variable Documentation

◆ CMS_FED_ID_MAX

const uint16_t Phase2Tracker::CMS_FED_ID_MAX = static_cast<uint16_t>(FEDNumbering::MAXFEDID)
static

◆ FED_ID_MAX

const uint16_t Phase2Tracker::FED_ID_MAX = static_cast<uint16_t>(FEDNumbering::MAXSiStripFEDID)
static

◆ FED_ID_MIN

const uint16_t Phase2Tracker::FED_ID_MIN = static_cast<uint16_t>(FEDNumbering::MINSiStripFEDID)
static

◆ INVALID

const uint8_t Phase2Tracker::INVALID = 0xFF
static

Definition at line 33 of file utils.h.

◆ MAX_CBC_PER_FE

const int Phase2Tracker::MAX_CBC_PER_FE = 16
static

◆ MAX_FE_PER_FED

const int Phase2Tracker::MAX_FE_PER_FED = 16
static

◆ NUMBER_OF_FEDS

const uint16_t Phase2Tracker::NUMBER_OF_FEDS = static_cast<uint16_t>(FED_ID_MAX - FED_ID_MIN + 1)
static

Definition at line 21 of file utils.h.

◆ STRIPS_PADDING

const int Phase2Tracker::STRIPS_PADDING = 2
static

◆ STRIPS_PER_CBC

const int Phase2Tracker::STRIPS_PER_CBC = 254
static

◆ TRIGGER_SIZE

const int Phase2Tracker::TRIGGER_SIZE = 0
static