ATLAS Offline Software
Loading...
Searching...
No Matches
Mon Class Reference

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

#include <Mon.h>

Collaboration diagram for Mon:

Public Member Functions

 Mon (IMessageSvc *msgSvc)
 ~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}
MsgStream m_logstr

Detailed Description

Tool to store LATOME mon header and footer data.

Definition at line 20 of file Mon.h.

Constructor & Destructor Documentation

◆ Mon()

Mon::Mon ( IMessageSvc * msgSvc)

Definition at line 11 of file Mon.cxx.

13 m_logstr(msgSvc, "LArByteStream.Mon")
14{}
#define NSTREAMS
Definition Mon.cxx:6
#define STREAMNUMBER
Definition Mon.cxx:7
uint32_t debugMarker
Definition Mon.h:41
uint32_t headerMarker
Definition Mon.h:37
MsgStream m_logstr
Definition Mon.h:54
int streamNumber
Definition Mon.h:45
int nStreams
Definition Mon.h:44

◆ ~Mon()

Mon::~Mon ( )

Member Function Documentation

◆ fillDataType()

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

Definition at line 48 of file Mon.cxx.

48 {
49 dataType[i] = static_cast<int>(word);
50 switch (dataType[i]) {
51 case 0: return;
52 case 1: return;
53 case 2: return;
54 case 3: return;
55 case 0xff: return;
56 default:
57 m_logstr << MSG::ERROR << "Unknown calorimeter region word in mon header." << endmsg;
58 }
59}
#define endmsg
std::array< int, 2 > dataType
Definition Mon.h:46

◆ fillHeaderSize()

void Mon::fillHeaderSize ( uint32_t word)

◆ fillNActiveSCs()

void Mon::fillNActiveSCs ( uint32_t word)

Definition at line 70 of file Mon.cxx.

70 {
71 nActiveSCs = static_cast<int>(word);
72 if (nActiveSCs != NACTIVESCS) m_logstr << MSG::ERROR << "Number of BCs word in mon header is not the standard one." << endmsg;
73}
#define NACTIVESCS
Definition Mon.cxx:9
int nActiveSCs
Definition Mon.h:49

◆ fillNBCs()

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

Definition at line 61 of file Mon.cxx.

61 {
62 nBCs[i] = static_cast<int>(word);
63 if (nBCs[i] != NBCS) m_logstr << MSG::ERROR << "Number of BCs word in mon header is not the standard one." << endmsg;
64}
#define NBCS
Definition Mon.cxx:8
std::array< int, 2 > nBCs
Definition Mon.h:47

◆ fillNStreams()

void Mon::fillNStreams ( uint32_t word)

Definition at line 38 of file Mon.cxx.

38 {
39 nStreams = static_cast<int>(word);
40 if (nStreams != NSTREAMS) m_logstr << MSG::ERROR << "Number of streams word in mon header is not the standard one." << endmsg;
41}

◆ fillPacketInfo()

void Mon::fillPacketInfo ( uint32_t word)

Definition at line 16 of file Mon.cxx.

16 {
17 nPackets = static_cast<int>((word & 0xff000000) >> 24);
18 packetIndex = static_cast<int>((word & 0xff0000) >> 16);
19 uint16_t sizeInBytes = static_cast<uint16_t>(word & 0xffff);
20 if (sizeInBytes % 4) m_logstr << MSG::ERROR << "ERROR: Packet size written in the mon header is not multiple of 4 (cannot be converted from [bytes] to [32 bit words])" << endmsg;
21 else packetSize = static_cast<int>(sizeInBytes / 4);
22}
int packetSize
Definition Mon.h:40
int nPackets
Definition Mon.h:38
int packetIndex
Definition Mon.h:39
setWord1 uint16_t

◆ fillRegion()

void Mon::fillRegion ( uint32_t word)

Definition at line 24 of file Mon.cxx.

24 {
25 region = static_cast<int>(word);
26 switch (region) {
27 case 0: return;
28 case 1: return;
29 case 2: return;
30 case 3: return;
31 case 4: return;
32 case 5: return;
33 default:
34 m_logstr << MSG::ERROR << "Unknown calorimeter region word in mon header." << endmsg;
35 }
36}
int region
Definition Mon.h:43

◆ fillStreamNumber()

void Mon::fillStreamNumber ( uint32_t word)

Definition at line 43 of file Mon.cxx.

43 {
44 streamNumber = static_cast<int>(word);
45 if (streamNumber != STREAMNUMBER) m_logstr << MSG::ERROR << "Stream number word in mon header is not the standard " << endmsg;
46}

◆ fillTimeShift()

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

Definition at line 66 of file Mon.cxx.

66 {
67 timeShift[i] = word;
68}
std::array< uint32_t, 2 > timeShift
Definition Mon.h:48

Member Data Documentation

◆ dataType

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

Definition at line 46 of file Mon.h.

46{};

◆ debugMarker

uint32_t Mon::debugMarker

Definition at line 41 of file Mon.h.

◆ extendedL1ID

uint32_t Mon::extendedL1ID = 0U

Definition at line 36 of file Mon.h.

◆ headerMarker

uint32_t Mon::headerMarker

Definition at line 37 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 51 of file Mon.h.

51{0, 0, 0xFF1234FF, 0, 0xDEADBEEF, MON_HEADER_SIZE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
#define MON_HEADER_SIZE
Definition Mon.h:18

◆ headerSize

int Mon::headerSize = MON_HEADER_SIZE

Definition at line 42 of file Mon.h.

◆ LATOMEID

uint32_t Mon::LATOMEID = 0U

Definition at line 35 of file Mon.h.

◆ m_logstr

MsgStream Mon::m_logstr

Definition at line 54 of file Mon.h.

◆ nActiveSCs

int Mon::nActiveSCs = 0

Definition at line 49 of file Mon.h.

◆ nBCs

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

Definition at line 47 of file Mon.h.

47{};

◆ nPackets

int Mon::nPackets = 0

Definition at line 38 of file Mon.h.

◆ nStreams

int Mon::nStreams

Definition at line 44 of file Mon.h.

◆ nthMONHWordPacketDetermined

int Mon::nthMONHWordPacketDetermined = 3

Definition at line 50 of file Mon.h.

◆ packetIndex

int Mon::packetIndex = 0

Definition at line 39 of file Mon.h.

◆ packetSize

int Mon::packetSize = 0

Definition at line 40 of file Mon.h.

◆ region

int Mon::region = 0

Definition at line 43 of file Mon.h.

◆ streamNumber

int Mon::streamNumber

Definition at line 45 of file Mon.h.

◆ timeShift

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

Definition at line 48 of file Mon.h.

48{};

◆ trailerRef

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

Definition at line 52 of file Mon.h.

52{0xC0FFEE00, 0xAAAAAAAA};

The documentation for this class was generated from the following files: