ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
Mon Class Reference

Tool to store LATOME mon header and footer data. More...

#include <Mon.h>

Collaboration diagram for Mon:

Public Member Functions

 Mon ()
 
 ~Mon ()
 
void fillPacketInfo (uint32_t word)
 
void fillHeaderSize (uint32_t word)
 
void fillRegion (uint32_t word)
 
void fillNStreams (uint32_t word)
 
void fillStreamNumber (uint32_t word)
 
void fillDataType (uint32_t word, int i)
 
void fillNBCs (uint32_t word, int i)
 
void fillTimeShift (uint32_t word, int i)
 
void fillNActiveSCs (uint32_t word)
 

Public Attributes

uint32_t LATOMEID = 0U
 
uint32_t extendedL1ID = 0U
 
uint32_t headerMarker
 
int nPackets = 0
 
int packetIndex = 0
 
int packetSize = 0
 
uint32_t debugMarker
 
int headerSize = MON_HEADER_SIZE
 
int region = 0
 
int nStreams
 
int streamNumber
 
std::array< int, 2 > dataType {}
 
std::array< int, 2 > nBCs {}
 
std::array< uint32_t, 2 > timeShift {}
 
int nActiveSCs = 0
 
int nthMONHWordPacketDetermined = 3
 
std::array< uint32_t, MON_HEADER_SIZEheaderRef = {0, 0, 0xFF1234FF, 0, 0xDEADBEEF, MON_HEADER_SIZE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
 
std::array< uint32_t, 2 > trailerRef = {0xC0FFEE00, 0xAAAAAAAA}
 

Detailed Description

Tool to store LATOME mon header and footer data.

Definition at line 19 of file Mon.h.

Constructor & Destructor Documentation

◆ Mon()

Mon::Mon ( )

Definition at line 11 of file Mon.cxx.

12  : headerMarker(0xFF1234FF), debugMarker(0xDEADBEEF), nStreams(NSTREAMS), streamNumber(STREAMNUMBER)
13 {}

◆ ~Mon()

Mon::~Mon ( )

Member Function Documentation

◆ fillDataType()

void Mon::fillDataType ( uint32_t  word,
int  i 
)

Definition at line 47 of file Mon.cxx.

47  {
48  dataType[i] = static_cast<int>(word);
49  switch (dataType[i]) {
50  case 0: return;
51  case 1: return;
52  case 2: return;
53  case 3: return;
54  case 0xff: return;
55  default:
56  std::cout << "Unknown calorimeter region word in mon header.\n";
57  }
58 }

◆ fillHeaderSize()

void Mon::fillHeaderSize ( uint32_t  word)

◆ fillNActiveSCs()

void Mon::fillNActiveSCs ( uint32_t  word)

Definition at line 69 of file Mon.cxx.

69  {
70  nActiveSCs = static_cast<int>(word);
71  if (nActiveSCs != NACTIVESCS) std::cout << "Number of BCs word in mon header is not the standard one.\n";
72 }

◆ fillNBCs()

void Mon::fillNBCs ( uint32_t  word,
int  i 
)

Definition at line 60 of file Mon.cxx.

60  {
61  nBCs[i] = static_cast<int>(word);
62  if (nBCs[i] != NBCS) std::cout << "Number of BCs word in mon header is not the standard one.\n";
63 }

◆ fillNStreams()

void Mon::fillNStreams ( uint32_t  word)

Definition at line 37 of file Mon.cxx.

37  {
38  nStreams = static_cast<int>(word);
39  if (nStreams != NSTREAMS) std::cout << "Number of streams word in mon header is not the standard one.\n";
40 }

◆ fillPacketInfo()

void Mon::fillPacketInfo ( uint32_t  word)

Definition at line 15 of file Mon.cxx.

15  {
16  nPackets = static_cast<int>((word & 0xff000000) >> 24);
17  packetIndex = static_cast<int>((word & 0xff0000) >> 16);
18  uint16_t sizeInBytes = static_cast<uint16_t>(word & 0xffff);
19  if (sizeInBytes % 4) std::cout << "ERROR: Packet size written in the mon header is not multiple of 4 (cannot be converted from [bytes] to [32 bit words])\n";
20  else packetSize = static_cast<int>(sizeInBytes / 4);
21 }

◆ fillRegion()

void Mon::fillRegion ( uint32_t  word)

Definition at line 23 of file Mon.cxx.

23  {
24  region = static_cast<int>(word);
25  switch (region) {
26  case 0: return;
27  case 1: return;
28  case 2: return;
29  case 3: return;
30  case 4: return;
31  case 5: return;
32  default:
33  std::cout << "Unknown calorimeter region word in mon header.\n";
34  }
35 }

◆ fillStreamNumber()

void Mon::fillStreamNumber ( uint32_t  word)

Definition at line 42 of file Mon.cxx.

42  {
43  streamNumber = static_cast<int>(word);
44  if (streamNumber != STREAMNUMBER) std::cout << "Stream number word in mon header is not the standard one.\n";
45 }

◆ fillTimeShift()

void Mon::fillTimeShift ( uint32_t  word,
int  i 
)

Definition at line 65 of file Mon.cxx.

65  {
66  timeShift[i] = word;
67 }

Member Data Documentation

◆ dataType

std::array<int, 2> Mon::dataType {}

Definition at line 45 of file Mon.h.

◆ debugMarker

uint32_t Mon::debugMarker

Definition at line 40 of file Mon.h.

◆ extendedL1ID

uint32_t Mon::extendedL1ID = 0U

Definition at line 35 of file Mon.h.

◆ headerMarker

uint32_t Mon::headerMarker

Definition at line 36 of file Mon.h.

◆ headerRef

std::array<uint32_t, MON_HEADER_SIZE> Mon::headerRef = {0, 0, 0xFF1234FF, 0, 0xDEADBEEF, MON_HEADER_SIZE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

Definition at line 50 of file Mon.h.

◆ headerSize

int Mon::headerSize = MON_HEADER_SIZE

Definition at line 41 of file Mon.h.

◆ LATOMEID

uint32_t Mon::LATOMEID = 0U

Definition at line 34 of file Mon.h.

◆ nActiveSCs

int Mon::nActiveSCs = 0

Definition at line 48 of file Mon.h.

◆ nBCs

std::array<int, 2> Mon::nBCs {}

Definition at line 46 of file Mon.h.

◆ nPackets

int Mon::nPackets = 0

Definition at line 37 of file Mon.h.

◆ nStreams

int Mon::nStreams

Definition at line 43 of file Mon.h.

◆ nthMONHWordPacketDetermined

int Mon::nthMONHWordPacketDetermined = 3

Definition at line 49 of file Mon.h.

◆ packetIndex

int Mon::packetIndex = 0

Definition at line 38 of file Mon.h.

◆ packetSize

int Mon::packetSize = 0

Definition at line 39 of file Mon.h.

◆ region

int Mon::region = 0

Definition at line 42 of file Mon.h.

◆ streamNumber

int Mon::streamNumber

Definition at line 44 of file Mon.h.

◆ timeShift

std::array<uint32_t, 2> Mon::timeShift {}

Definition at line 47 of file Mon.h.

◆ trailerRef

std::array<uint32_t, 2> Mon::trailerRef = {0xC0FFEE00, 0xAAAAAAAA}

Definition at line 51 of file Mon.h.


The documentation for this class was generated from the following files:
Mon::packetSize
int packetSize
Definition: Mon.h:39
Mon::region
int region
Definition: Mon.h:42
Mon::dataType
std::array< int, 2 > dataType
Definition: Mon.h:45
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
lumiFormat.i
int i
Definition: lumiFormat.py:85
Mon::nActiveSCs
int nActiveSCs
Definition: Mon.h:48
Mon::nBCs
std::array< int, 2 > nBCs
Definition: Mon.h:46
STREAMNUMBER
#define STREAMNUMBER
Definition: Mon.cxx:7
Mon::nStreams
int nStreams
Definition: Mon.h:43
Mon::headerMarker
uint32_t headerMarker
Definition: Mon.h:36
NBCS
#define NBCS
Definition: Mon.cxx:8
Mon::debugMarker
uint32_t debugMarker
Definition: Mon.h:40
Mon::nPackets
int nPackets
Definition: Mon.h:37
NACTIVESCS
#define NACTIVESCS
Definition: Mon.cxx:9
Mon::timeShift
std::array< uint32_t, 2 > timeShift
Definition: Mon.h:47
Mon::streamNumber
int streamNumber
Definition: Mon.h:44
Mon::packetIndex
int packetIndex
Definition: Mon.h:38
NSTREAMS
#define NSTREAMS
Definition: Mon.cxx:6