ATLAS Offline Software
Loading...
Searching...
No Matches
TgcByteStreamData.h File Reference
#include <cstring>
#include "AthenaKernel/errorcheck.h"
Include dependency graph for TgcByteStreamData.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TGC_BYTESTREAM_SOURCEID
 The struct for source ID in ByteStream. More...
struct  TGC_BYTESTREAM_ERRORS
 The struct for errors in ByteStream. More...
struct  TGC_BYTESTREAM_LOCALSTATUS
 The struct for local status in ByteStream. More...
struct  TGC_BYTESTREAM_FRAGMENTCOUNT
 The struct for fragment count in ByteStream. More...
struct  TGC_BYTESTREAM_READOUTHIT
 The struct for hit in ByteStream. More...
struct  TGC_BYTESTREAM_READOUTTRACKLET
 The struct for tracklet in ByteStream. More...
struct  TGC_BYTESTREAM_READOUTTRIPLETSTRIP
 The struct for triplet strip in ByteStream. More...
struct  TGC_BYTESTREAM_HIPT
 The struct for HiPt in ByteStream. More...
struct  TGC_BYTESTREAM_HIPT_INNER
 The struct for Inner trigger bits in ByteStream. More...
struct  TGC_BYTESTREAM_SL
 The struct for SL in ByteStream. More...
struct  TGC_BYTESTREAM_NSL_ROI
 structs for NewSL More...
struct  TGC_BYTESTREAM_NSW_POS
struct  TGC_BYTESTREAM_NSW_ANG
struct  TGC_BYTESTREAM_RPCBIS78_POS
struct  TGC_BYTESTREAM_RPCBIS78_COIN
struct  TGC_BYTESTREAM_NSL_EIFI
struct  TGC_BYTESTREAM_NSL_HIPT
struct  TGC_BYTESTREAM_NSL_TMDB

Functions

template<typename DEST, typename SRC>
DEST * my_pointer_cast (SRC *src)
 end of structs for NewSL
template<class T>
uint32_t toBS32 (T &data)
template<class T>
uint16_t toBS16 (T &data)
template<class T>
void fromBS32 (uint32_t data, T &s)
template<class T>
void fromBS16 (uint16_t data, T &s)
uint8_t low8 (uint32_t data)
uint16_t low16 (uint32_t data)
uint16_t high16 (uint32_t data)
uint16_t bcId (uint32_t data)
int fragmentCount (uint32_t data, int id)
uint32_t from16 (uint16_t high16, uint16_t low16)
uint32_t from8 (uint8_t high8, uint8_t highmid8, uint8_t lowmid8, uint8_t low8)
unsigned bcBitmap (uint16_t bcTag)
unsigned bcTag (unsigned bcBitMap)

Variables

const uint32_t TGC_BYTESTREAM_HEADER = 0xee1234ee
const uint32_t TGC_BYTESTREAM_HEADERSIZE = 0x9
const uint32_t TGC_BYTESTREAM_HEADERVERSION = 0x03000300
const uint32_t TGC_BYTESTREAM_STATUSSIZE = 0x5

Function Documentation

◆ bcBitmap()

unsigned bcBitmap ( uint16_t bcTag)
inline

Definition at line 351 of file TgcByteStreamData.h.

351 {
352 return (bcTag == 1
353 ? 4
354 : ((bcTag == 0 || bcTag == 2) ? 2 : (bcTag == 3 ? 1 : 0)));
355}
unsigned bcTag(unsigned bcBitMap)

◆ bcId()

uint16_t bcId ( uint32_t data)
inline

Definition at line 326 of file TgcByteStreamData.h.

326 {
327 return data & 0xfff;
328}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11

◆ bcTag()

unsigned bcTag ( unsigned bcBitMap)
inline

Definition at line 357 of file TgcByteStreamData.h.

357 {
358 return (bcBitMap == 4 ? 1 : (bcBitMap == 2 ? 2 : (bcBitMap == 1 ? 3 : 0)));
359}

◆ fragmentCount()

int fragmentCount ( uint32_t data,
int id )
inline

Definition at line 330 of file TgcByteStreamData.h.

330 {
332 fromBS32(data, counter);
333 if (counter.id != (unsigned int)id) {
334 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "TgcByteStreamData")
335 << "Requested count of frament " << id << ", data is for fragment "
336 << counter.id << endmsg;
337 return 0;
338 }
339 return counter.count;
340}
#define endmsg
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
void fromBS32(uint32_t data, T &s)
The struct for fragment count in ByteStream.

◆ from16()

uint32_t from16 ( uint16_t high16,
uint16_t low16 )
inline

Definition at line 342 of file TgcByteStreamData.h.

342 {
343 return (uint32_t)((high16 << 16) | low16);
344}
uint16_t low16(uint32_t data)
uint16_t high16(uint32_t data)

◆ from8()

uint32_t from8 ( uint8_t high8,
uint8_t highmid8,
uint8_t lowmid8,
uint8_t low8 )
inline

Definition at line 346 of file TgcByteStreamData.h.

347 {
348 return (uint32_t)((high8 << 24) | (highmid8 << 16) | (lowmid8 << 8) | low8);
349}
uint8_t low8(uint32_t data)

◆ fromBS16()

template<class T>
void fromBS16 ( uint16_t data,
T & s )
inline

Definition at line 314 of file TgcByteStreamData.h.

314 {
316}
DEST * my_pointer_cast(SRC *src)
end of structs for NewSL

◆ fromBS32()

template<class T>
void fromBS32 ( uint32_t data,
T & s )
inline

Definition at line 310 of file TgcByteStreamData.h.

310 {
312}

◆ high16()

uint16_t high16 ( uint32_t data)
inline

Definition at line 323 of file TgcByteStreamData.h.

323 {
324 return (uint16_t)(data >> 16);
325}

◆ low16()

uint16_t low16 ( uint32_t data)
inline

Definition at line 320 of file TgcByteStreamData.h.

320 {
321 return (uint16_t)(data & 0x0000ffff);
322}

◆ low8()

uint8_t low8 ( uint32_t data)
inline

Definition at line 317 of file TgcByteStreamData.h.

317 {
318 return (uint8_t)(data & 0x000000ff);
319}

◆ my_pointer_cast()

template<typename DEST, typename SRC>
DEST * my_pointer_cast ( SRC * src)

end of structs for NewSL

Definition at line 297 of file TgcByteStreamData.h.

297 {
298 void* ptr = src;
299 return reinterpret_cast<DEST*>(ptr);
300}
void * ptr(T *p)
Definition SGImplSvc.cxx:74
str DEST
Definition panic.py:3

◆ toBS16()

template<class T>
uint16_t toBS16 ( T & data)
inline

Definition at line 306 of file TgcByteStreamData.h.

306 {
308}

◆ toBS32()

template<class T>
uint32_t toBS32 ( T & data)
inline

Definition at line 302 of file TgcByteStreamData.h.

302 {
304}

Variable Documentation

◆ TGC_BYTESTREAM_HEADER

const uint32_t TGC_BYTESTREAM_HEADER = 0xee1234ee

Definition at line 12 of file TgcByteStreamData.h.

◆ TGC_BYTESTREAM_HEADERSIZE

const uint32_t TGC_BYTESTREAM_HEADERSIZE = 0x9

Definition at line 13 of file TgcByteStreamData.h.

◆ TGC_BYTESTREAM_HEADERVERSION

const uint32_t TGC_BYTESTREAM_HEADERVERSION = 0x03000300

Definition at line 14 of file TgcByteStreamData.h.

◆ TGC_BYTESTREAM_STATUSSIZE

const uint32_t TGC_BYTESTREAM_STATUSSIZE = 0x5

Definition at line 15 of file TgcByteStreamData.h.