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 95 of file utils.h.

◆ FEDTTSBits

◆ READ_MODE

Enumerator
READ_MODE_INVALID 
SUMMARY 
FULL_DEBUG 
CBC_ERROR 

Definition at line 141 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 167 of file utils.h.

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

◆ trackerHeader_s

Enumerator
VERSION_S 
HEADER_FORMAT_S 
EVENT_TYPE_S 
GLIB_STATUS_S 
FRONTEND_STAT_S 
CBC_NUMBER_S 

Definition at line 176 of file utils.h.

Function Documentation

◆ extract64()

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

Definition at line 191 of file utils.h.

References data, gpuClustering::pixelStatus::mask, and edm::shift.

Referenced by Phase2Tracker::Phase2TrackerFEDHeader::dataFormatVersion(), Phase2Tracker::Phase2TrackerFEDHeader::debugMode(), Phase2Tracker::Phase2TrackerFEDHeader::eventType(), Phase2Tracker::Phase2TrackerFEDHeader::frontendStatus(), Phase2Tracker::Phase2TrackerFEDHeader::glibStatusCode(), and Phase2Tracker::Phase2TrackerFEDHeader::numberOfCBC().

191  {
192  // cout <<"IN "<< hex<< " " <<setfill('0') << setw(16) << data << "\n" ;
193  data = (data & mask) >> shift;
194  return data;
195  }
constexpr uint32_t mask
Definition: gpuClustering.h:24
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
static unsigned int const shift

◆ 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, 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 << " (";
36  printHexValue(value, 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:42

◆ operator<<() [2/4]

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

Definition at line 7 of file Phase2TrackerFEDDAQTrailer.cc.

References 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 << " (";
36  printHexValue(value, 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:42

◆ operator<<() [3/4]

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

Definition at line 107 of file utils.h.

References 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.

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

◆ operator<<() [4/4]

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

Definition at line 145 of file utils.h.

References CBC_ERROR, FULL_DEBUG, printHexValue(), and SUMMARY.

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

◆ printHex()

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

Definition at line 58 of file utils.h.

References 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().

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

◆ printHexValue()

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

Definition at line 42 of file utils.h.

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

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

◆ printHexWord()

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

Definition at line 49 of file utils.h.

References mps_fire::i, and printHexValue().

Referenced by printHex().

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

◆ printNibbleValue()

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

Definition at line 36 of file utils.h.

References relativeConstraints::value.

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

◆ 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 32 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 20 of file utils.h.

◆ STRIPS_PADDING

const int Phase2Tracker::STRIPS_PADDING = 2
static

Definition at line 27 of file utils.h.

Referenced by Phase2Tracker::Phase2TrackerFEDBuffer::findChannels().

◆ STRIPS_PER_CBC

const int Phase2Tracker::STRIPS_PER_CBC = 254
static

◆ TRIGGER_SIZE

const int Phase2Tracker::TRIGGER_SIZE = 0
static