CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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

Enumerator
READ_MODE_INVALID 
SUMMARY 
FULL_DEBUG 
CBC_ERROR 

Definition at line 144 of file utils.h.

Enumerator
VERSION_M 
HEADER_FORMAT_M 
EVENT_TYPE_M 
GLIB_STATUS_M 
FRONTEND_STAT_M 
CBC_NUMBER_M 

Definition at line 179 of file utils.h.

179  { VERSION_M = 0xF000000000000000,
180  HEADER_FORMAT_M = 0x0C00000000000000,
181  EVENT_TYPE_M = 0x03C0000000000000,
182  GLIB_STATUS_M = 0x003FFFFFFFFF0000,
183  FRONTEND_STAT_M = 0x000000000000FFFF,
184  CBC_NUMBER_M = 0xFFFF000000000000
185  };
Enumerator
VERSION_S 
HEADER_FORMAT_S 
EVENT_TYPE_S 
GLIB_STATUS_S 
FRONTEND_STAT_S 
CBC_NUMBER_S 

Definition at line 187 of file utils.h.

Function Documentation

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

Definition at line 203 of file utils.h.

References data.

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

204  {
205  // cout <<"IN "<< hex<< " " <<setfill('0') << setw(16) << data << "\n" ;
206  data = (data & mask) >> shift;
207  return data;
208  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
static unsigned int const shift
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().

8  {
9  switch (value) {
11  os << "Physics trigger";
12  break;
14  os << "Calibration trigger";
15  break;
17  os << "Test trigger";
18  break;
20  os << "Technical trigger";
21  break;
23  os << "Simulated event";
24  break;
26  os << "Traced event";
27  break;
29  os << "Error";
30  break;
32  os << "Unknown";
33  break;
34  default:
35  os << "Unrecognized";
36  os << " (";
37  printHexValue(value,os);
38  os << ")";
39  break;
40  }
41  return os;
42  }
void printHexValue(const uint8_t value, std::ostream &os)
Definition: utils.h:43
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.

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

Definition at line 109 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.

110  {
111  switch (value) {
112  case READOUT_MODE_SCOPE:
113  os << "Scope mode";
114  break;
116  os << "Virgin raw";
117  break;
119  os << "Processed raw";
120  break;
122  os << "Zero suppressed";
123  break;
125  os << "Zero suppressed lite";
126  break;
127  case READOUT_MODE_SPY:
128  os << "Spy channel";
129  break;
131  os << "Invalid";
132  break;
133  default:
134  os << "Unrecognized";
135  os << " (";
136  printHexValue(value,os);
137  os << ")";
138  break;
139  }
140  return os;
141  }
void printHexValue(const uint8_t value, std::ostream &os)
Definition: utils.h:43
std::ostream & Phase2Tracker::operator<< ( std::ostream &  os,
const READ_MODE &  value 
)
inline

Definition at line 154 of file utils.h.

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

155  {
156  switch (value) {
157  case SUMMARY:
158  os << "Summary mode";
159  break;
160  case FULL_DEBUG:
161  os << "Full debug mode";
162  break;
163  case CBC_ERROR:
164  os << "CBC error mode";
165  break;
166  default:
167  os << "Unrecognized mode";
168  os << " (";
169  printHexValue(value,os);
170  os << ")";
171  break;
172  }
173  return os;
174  }
void printHexValue(const uint8_t value, std::ostream &os)
Definition: utils.h:43
void Phase2Tracker::printHex ( const void *  pointer,
const size_t  lengthInBytes,
std::ostream &  os 
)
inline

Definition at line 60 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().

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

Definition at line 43 of file utils.h.

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

44  {
45  const std::ios_base::fmtflags originalFormatFlags = os.flags();
46  os << std::hex << std::setfill('0') << std::setw(2);
47  os << uint16_t(value);
48  os.flags(originalFormatFlags);
49  }
void Phase2Tracker::printHexWord ( const uint8_t *  pointer,
const size_t  lengthInBytes,
std::ostream &  os 
)
inline

Definition at line 51 of file utils.h.

References i, and printHexValue().

Referenced by printHex().

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

Definition at line 36 of file utils.h.

References 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  }
uint64_t Phase2Tracker::read64 ( int  offset,
const uint8_t *  buffer 
)
inline

Definition at line 197 of file utils.h.

References evf::evtn::offset().

Referenced by Phase2Tracker::Phase2TrackerFEDHeader::CBCStatus(), Phase2Tracker::Phase2TrackerFEDBuffer::Phase2TrackerFEDBuffer(), and Phase2Tracker::Phase2TrackerFEDHeader::Phase2TrackerFEDHeader().

198  {
199  return *reinterpret_cast<const uint64_t*>(buffer+offset);
200  }
unsigned int offset(bool)
unsigned long long uint64_t
Definition: Time.h:15

Variable Documentation

const uint16_t Phase2Tracker::CMS_FED_ID_MAX = static_cast<uint16_t>( FEDNumbering::MAXFEDID)
static
const uint16_t Phase2Tracker::FED_ID_MAX = static_cast<uint16_t>( FEDNumbering::MAXSiStripFEDID)
static
const uint16_t Phase2Tracker::FED_ID_MIN = static_cast<uint16_t>( FEDNumbering::MINSiStripFEDID)
static
const uint8_t Phase2Tracker::INVALID =0xFF
static

Definition at line 32 of file utils.h.

const int Phase2Tracker::MAX_CBC_PER_FE = 16
static
const int Phase2Tracker::MAX_FE_PER_FED = 16
static
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.

const int Phase2Tracker::STRIPS_PADDING = 2
static

Definition at line 27 of file utils.h.

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

const int Phase2Tracker::STRIPS_PER_CBC = 254
static
const int Phase2Tracker::TRIGGER_SIZE = 0
static