CMS 3D CMS Logo

Classes | Enumerations | Functions
TotemSampicFrame.h File Reference
#include <vector>
#include <cstddef>
#include <cstdint>
#include <iomanip>
#include <bitset>
#include <iostream>
#include "EventFilter/CTPPSRawToDigi/interface/VFATFrame.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

Go to the source code of this file.

Classes

class  TotemSampicFrame
 

Enumerations

enum  TotemSampicConstant {
  hwId_Position = 0, controlBits0_Position = 1, controlBits1_Position = 2, controlBits2_Position = 3,
  controlBits3_Position = 4, controlBits4_Position = 5, controlBits5_Position = 6, fpgaTime_Position = 7,
  timestampA_Position = 12, timestampB_Position = 14, cellInfo_Position = 16, planeChannelId_Position = 18,
  reserved_Position = 19, boardId_Position = 0, l1ATimestamp_Position = 1, bunchNumber_Position = 6,
  orbitNumber_Position = 8, eventNumber_Position = 12, channelMap_Position = 16, l1ALatency_Position = 18,
  numberOfSamples_Position = 20, offsetOfSamples_Position = 21, fwVersion_Position = 22, pllInfo_Position = 23,
  numberOfSamples = 24, controlBits3 = 0x69, cellInfo_Mask = 0x3F
}
 

Functions

template<typename T >
T grayToBinary (const T &gcode_data)
 

Enumeration Type Documentation

◆ TotemSampicConstant

Enumerator
hwId_Position 
controlBits0_Position 
controlBits1_Position 
controlBits2_Position 
controlBits3_Position 
controlBits4_Position 
controlBits5_Position 
fpgaTime_Position 
timestampA_Position 
timestampB_Position 
cellInfo_Position 
planeChannelId_Position 
reserved_Position 
boardId_Position 
l1ATimestamp_Position 
bunchNumber_Position 
orbitNumber_Position 
eventNumber_Position 
channelMap_Position 
l1ALatency_Position 
numberOfSamples_Position 
offsetOfSamples_Position 
fwVersion_Position 
pllInfo_Position 
numberOfSamples 
controlBits3 
cellInfo_Mask 

Definition at line 21 of file TotemSampicFrame.h.

22  {
23  hwId_Position = 0, // hwId_Size = 1,
30  fpgaTime_Position = 7, // fpgaTime_Size = 5,
31  timestampA_Position = 12, // timestampA_Size = 2,
32  timestampB_Position = 14, // timestampB_Size = 2,
33  cellInfo_Position = 16, // cellInfo_Size = 2,
34  planeChannelId_Position = 18, // planeChannelId_Size = 1,
35  reserved_Position = 19, // reserved_Size = 5,
36 
37  boardId_Position = 0, // boardId_Size = 1,
38  l1ATimestamp_Position = 1, // l1ATimestamp_Size = 5,
39  bunchNumber_Position = 6, // bunchNumber_Size = 2,
40  orbitNumber_Position = 8, // orbitNumber_Size = 4,
41  eventNumber_Position = 12, // eventNumber_Size = 4,
42  channelMap_Position = 16, // channelMap_Size = 2,
43  l1ALatency_Position = 18, // l1ALatency_Size = 2,
44  numberOfSamples_Position = 20, // numberOfSamples_Size = 1,
45  offsetOfSamples_Position = 21, // offsetOfSamples_Size = 1,
46  fwVersion_Position = 22, // fwVersion_Size = 1,
47  pllInfo_Position = 23, // pllInfo_Size = 1,
48 
49  numberOfSamples = 24,
50  controlBits3 = 0x69,
51  cellInfo_Mask = 0x3F,
52 

Function Documentation

◆ grayToBinary()

template<typename T >
T grayToBinary ( const T gcode_data)

Definition at line 55 of file TotemSampicFrame.h.

56  {
57  // assign b[0] = g[0]
58  T binary = gcode_data & (0x0001 << (8 * sizeof(T) - 1)); // MSB is the same
59 
60  // assign b[i] = g[i] xor b[i-1]
61  for (unsigned short int i = 1; i < 8 * sizeof(T); ++i)
62  binary |= (gcode_data ^ (binary >> 1)) & (0x0001 << (8 * sizeof(T) - i - 1));
63 
64  return binary;

References mps_fire::i.

mps_fire.i
i
Definition: mps_fire.py:428
numberOfSamples_Position
Definition: TotemSampicFrame.h:48
l1ALatency_Position
Definition: TotemSampicFrame.h:47
boardId_Position
Definition: TotemSampicFrame.h:41
orbitNumber_Position
Definition: TotemSampicFrame.h:44
fpgaTime_Position
Definition: TotemSampicFrame.h:34
eventNumber_Position
Definition: TotemSampicFrame.h:45
timestampB_Position
Definition: TotemSampicFrame.h:36
controlBits5_Position
Definition: TotemSampicFrame.h:33
l1ATimestamp_Position
Definition: TotemSampicFrame.h:42
controlBits2_Position
Definition: TotemSampicFrame.h:30
reserved_Position
Definition: TotemSampicFrame.h:39
bunchNumber_Position
Definition: TotemSampicFrame.h:43
timestampA_Position
Definition: TotemSampicFrame.h:35
hwId_Position
Definition: TotemSampicFrame.h:27
fwVersion_Position
Definition: TotemSampicFrame.h:50
cellInfo_Mask
Definition: TotemSampicFrame.h:55
pllInfo_Position
Definition: TotemSampicFrame.h:51
controlBits0_Position
Definition: TotemSampicFrame.h:28
controlBits4_Position
Definition: TotemSampicFrame.h:32
controlBits1_Position
Definition: TotemSampicFrame.h:29
T
long double T
Definition: Basic3DVectorLD.h:48
offsetOfSamples_Position
Definition: TotemSampicFrame.h:49
channelMap_Position
Definition: TotemSampicFrame.h:46
controlBits3
Definition: TotemSampicFrame.h:54
controlBits3_Position
Definition: TotemSampicFrame.h:31
planeChannelId_Position
Definition: TotemSampicFrame.h:38
numberOfSamples
Definition: TotemSampicFrame.h:53
cellInfo_Position
Definition: TotemSampicFrame.h:37